# Trigonometric Factorization

How can I factorize this expression: $\sin(x) + \cos(y)$? I've entered this input in Mathemetica:

TrigFactor[Sin[x] + Cos[y]]


and the output was:

$$2\sin\left(\frac{\pi}{4} + \frac{x}{2} - \frac{y}{2}\right)\sin\left(\frac{\pi}{4} + \frac{x}{2} + \frac{y}{2}\right).$$

I don't know how to get step-by-step solution so I don't know how to get to this factored expression. Can someone please show me how?

-
Write the $\cos$ term in terms of $\sin$ (using the "Co-Function" identity $\cos u=\sin({\pi/2}-u)$); then use a "sum to product" formula. sosmath.com/trig/Trig5/trig5/trig5.html –  David Mitra Dec 14 '11 at 18:37
@DavidMitra: thx, I didn't see that :) –  kr85 Dec 14 '11 at 18:45
This one doesn't appear to be in Wikipedia's "list of trigonometric identities". –  Michael Hardy Dec 14 '11 at 19:56

We use the identities: $$\tag{1}\cos u =\sin\Bigl({\pi\over2}-u\Bigr)$$ and$$\tag {2}\sin u +\sin v= { 2}\sin\Bigl({u+v\over 2} \Bigr)\cos\Bigl({u-v\over 2} \Bigr).$$ We have, by (1): $$\sin x+\cos y= \color{maroon}{ \sin x +\sin \Bigl( {\pi\over2}-y\Bigr)}.$$ From (2):\eqalign{ \color{maroon}{ \sin x +\sin\Bigl ( {\pi\over2}-y\Bigr)}&= { 2}\sin\Bigl({{\pi\over2}+x-y\over 2} \Bigr)\cos\Bigl( {x-{\pi\over2}+ y\over 2}\Bigr )\cr &=\color{darkgreen}{{ 2}\sin\Bigl(\textstyle{{\pi\over4}+{x\over2}-{y\over 2}} \Bigr) \cos\Bigl(\textstyle {{x\over2}-{\pi\over4}+ {y\over 2}}\Bigr ) } . } Using (1) again:
$$\color{darkgreen}{ { 2}\sin\Bigl(\textstyle{{\pi\over4}+{x\over2}-{y\over 2}} \Bigr) \cos\Bigl(\textstyle {{x\over2}-{\pi\over4}+ {y\over 2}}\Bigr ) } = { 2}\sin\Bigl( \textstyle{{\pi\over4}+{x\over2}-{y\over 2}} \Bigr) \color{orange}{\sin\Bigl( { {\pi\over4 }-{x\over2}- {y\over 2}}\Bigr )}.$$ Since $\sin({\pi\over2}+\theta)=\sin({\pi\over2}-\theta)$: $$\color{orange}{\sin\Bigl( \textstyle{ {\pi\over4 }-{x\over2}- {y\over 2}}\Bigr ) } =\sin\Bigl( \textstyle{ {\pi\over4 }+{x\over2}+ {y\over 2}}\Bigr ) .$$