Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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. – 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
up vote 2 down vote accepted

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 ) . $$

Putting everything together gives your result.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.