Primitive of Sine of p x by Cosine of q x

Theorem

$\displaystyle \int \sin p x \cos q x \rd x = \frac {-\cos \left({p - q}\right) x} {2 \left({p - q}\right)} - \frac {\cos \left({p + q}\right) x} {2 \left({p + q}\right)} + C$

for $p, q \in \R: p \ne q$

Proof

 $\displaystyle \int \sin p x \cos q x \rd x$ $=$ $\displaystyle \int \left({\dfrac {\sin \left({p x + q x}\right) + \sin \left({p x - q x}\right)} 2}\right) \rd x$ Simpson's Formula for Sine by Cosine $\displaystyle$ $=$ $\displaystyle \frac 1 2 \int \sin \left({p - q}\right) x \rd x + \frac 1 2 \int \sin \left({p + q}\right) x \rd x$ Linear Combination of Integrals $\displaystyle$ $=$ $\displaystyle \frac 1 2 \frac {-\cos \left({p - q}\right) x} {p - q} - \frac 1 2 \frac {\cos \left({p + q}\right) x} {p + q} + C$ Primitive of $\cos a x$ $\displaystyle$ $=$ $\displaystyle \frac {-\cos \left({p - q}\right) x} {2 \left({p - q}\right)} - \frac {\cos \left({p + q}\right) x} {2 \left({p + q}\right)} + C$ simplifying

$\blacksquare$