Deriving Mollweide's Formula

For this post, A is alpha, B is beta, and Y is gamma, and represent the angles of the triangle. Little a, b, and c represent the sides opposite them, respectively. The form of the formula is:

Code:

`a - b sin(1/2[A - B]`

----- = -------------

c cos([1/2]Y)

There is a step in the derivation that I don't understand. Here is the derivation from my solutions book, and so this post doesn't get too protracted, I'll stop at the point that I don't understand:

a - b a b

----- = -- - --

c c c

= sin A sin B

---- - ----

sin Y sin Y

= sin A - sin B

-------------

sin Y

= 2sin( (A-B) / 2) cos( (A+B) / 2)

------------------------------ makes use of sum to product formula

sin (2Y/2)

= 2sin( (A-B) / 2) cos( (A+B) / 2)

--------------------------------

2sin(Y/2)cos(Y/2)

= sin( (A-B) / 2) cos(PI/2 - Y/2)

--------------------------------

sin(Y/2)cos(Y/2)

How does cos((A+B)/2) get turned into cos(PI/2 - Y/2)?