8.3b. The reverse of the factor formula

Example question: $\displaystyle \int \sin 5x \cos 3x \; \mathrm{d}x$

Reversing the factor formula

The factor formulas are provided in the formula list MF26:
$\sin P + \sin Q \equiv 2 \sin \frac{1}{2} (P+Q) \cos \frac{1}{2} (P-Q) \\ \sin P - \sin Q \equiv 2 \cos \frac{1}{2} (P+Q) \sin \frac{1}{2} (P-Q) \\ \cos P + \cos Q \equiv 2 \cos \frac{1}{2} (P+Q) \cos \frac{1}{2} (P-Q) \\ \cos P - \cos Q \equiv -2 \sin \frac{1}{2} (P+Q) \sin \frac{1}{2} (P-Q) $
These formulas allow us to convert addition/subtraction of sine/cosine functions to a product. While this may be useful for other applications, integration of a product is not something we can perform generally.

Instead, we wish to reverse the formula: given a product of sine/cosine functions, we hope to convert them to addition/subtraction since we can integrate sums and differences separately.

The trick is to let $\frac{1}{2} (P+Q)$ be $A$ and $\frac{1}{2} (P-Q)$ be $B$. Then it can be easily shown that $A+B = P$ and $A-B = Q$. This gives us
$ \sin A \cos B = \frac{1}{2} \big ( \sin (A+B) + \sin (A-B) \big ) \\ \cos A \sin B = \frac{1}{2} \big ( \sin (A+B) - \sin (A-B) \big ) \\ \cos A \cos B = \frac{1}{2} \big ( \cos (A+B) + \cos (A-B) \big ) \\ \sin A \sin B = -\frac{1}{2} \big ( \cos (A+B) - \sin (A-B) \big )$

Applying this to our question gives us
$\displaystyle \int \sin 5x \cos 3x \; \mathrm{d}x = \int \frac{1}{2} ( \sin 8x + \sin 2x ) \; \mathrm{d}x = - \frac{ \cos 8x}{16} - \frac{\cos 2x}{4} +C$

A additional exercise: find $\displaystyle \int \sin 2x \sin x \; \mathrm{d}x$ $\displaystyle \frac{\sin x}{2} - \frac{\sin 3x}{6} + C$
Hover over or click on the integral for the answer.