# Trigonometry/For Enthusiasts/Transformation of products into sums

In this section, we shall see how to convert a product of two trigonometric functions into a sum or difference of two such functions, and vice versa.

## Product into sum

We have already seen that

${\displaystyle \sin(A)\cos(B)+\cos(A)\sin(B)=\sin(A+B)}$

and

${\displaystyle \sin(A)\cos(B)-\cos(A)\sin(B)=\sin(A-B)}$

Adding these two equations and dividing both sides by 2, we get

${\displaystyle \sin(A)\cos(B)={\frac {\sin(A+B)+\sin(A-B)}{2}}}$

Subtracting the second from the first equation and dividing both sides by 2, we get

${\displaystyle \cos(A)\sin(B)={\frac {\sin(A+B)+\sin(A-B)}{2}}}$

We also know that

${\displaystyle \cos(A)\cos(B)-\sin(A)\sin(B)=\cos(A+B)}$

and

${\displaystyle \cos(A)\cos(B)+\sin(A)\sin(B)=\cos(A-B)}$

Adding these two equations and dividing both sides by 2, we get

${\displaystyle \cos(A)\cos(B)={\frac {\cos(A+B)+\cos(A-B)}{2}}}$

Subtracting the first from the second equation and dividing both sides by 2, we get

${\displaystyle \sin(A)\sin(B)={\frac {\cos(A-B)-\cos(A+B)}{2}}}$

Thus we can express:

1. The product of a sine and cosine as the sum or difference of two sines;
2. The product of two cosines as the sum of two cosines;
3. The product of two sines as the difference of two sines.

## Sum into product

Let ${\displaystyle C=A+B}$ and ${\displaystyle D=A-B}$ . Then

${\displaystyle A={\frac {C+D}{2}}\ ;\ B={\frac {C-D}{2}}}$

Substituting into the above expressions and multiplying both sides by two in each of them, we have:

${\displaystyle \sin(C)+\sin(D)=2\sin \left({\frac {C+D}{2}}\right)\cos \left({\frac {C-D}{2}}\right)}$
${\displaystyle \sin(C)-\sin(D)=2\cos \left({\frac {C+D}{2}}\right)\sin \left({\frac {C-D}{2}}\right)}$
${\displaystyle \cos(C)+\cos(D)=2\cos \left({\frac {C+D}{2}}\right)\cos \left({\frac {C-D}{2}}\right)}$
${\displaystyle \cos(C)-\cos(D)=-2\sin \left({\frac {C+D}{2}}\right)\sin \left({\frac {C-D}{2}}\right)}$

Note the negative sign in the last formula.

These formulae are sometimes expressed in words, e.g.

cos plus cos = two cos half sum cos half diff.