1-sin^2x/cosx = sin^2x/2sinx

Please help me figure out this one, can you show all the steps, I am really confused.

Your help is very much appreciated.

Thanks