Primitive of x by Exponential of a x by Cosine of b x

Theorem

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

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:

Also see

 * Primitive of $x e^{a x} \sin b x$