# 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

$\sin(A)\cos(B)+\cos(A)\sin(B)=\sin(A+B)$ and

$\sin(A)\cos(B)-\cos(A)\sin(B)=\sin(A-B)$ Adding these two equations and dividing both sides by 2, we get

$\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

$\cos(A)\sin(B)={\frac {\sin(A+B)+\sin(A-B)}{2}}$ We also know that

$\cos(A)\cos(B)-\sin(A)\sin(B)=\cos(A+B)$ and

$\cos(A)\cos(B)+\sin(A)\sin(B)=\cos(A-B)$ Adding these two equations and dividing both sides by 2, we get

$\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

$\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 $C=A+B$ and $D=A-B$ . Then

$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:

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