Primitive of x by Sine of a x

Theorem

 * $\displaystyle \int x \sin \left({a x}\right) \ \mathrm d x = \frac {\sin a x} {a^2} - \frac {x \cos \left({a x}\right)} a + C$

where $C$ is an arbitrary constant.

Proof
With a view to expressing the primitive in the form:
 * $\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

and let:

Then: