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

Theorem

 * $\ds \int x e^{a x} \cos b x \rd x = \frac {x e^{a x} \paren {a \cos b x + b \sin b x} } {a^2 + b^2} - \frac {e^{a x} \paren {\paren {a^2 - b^2} \cos b x - 2 a b \sin b x} } {\paren {a^2 + b^2}^2} + C$

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

let:

and let:

Then:

Also see

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