# Primitive of x by Exponential of a x by Sine of b x

## Theorem

$\displaystyle \int x e^{a x} \sin b x \ \mathrm d x = \frac {x e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2} - \frac {e^{a x} \left({\left({a^2 - b^2}\right) \sin b x - 2 a b \cos 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:

 $\displaystyle u$ $=$ $\displaystyle x$ $\displaystyle \implies \ \$ $\displaystyle \frac {\mathrm d u} {\mathrm d x}$ $=$ $\displaystyle 1$ Derivative of Identity Function

and let:

 $\displaystyle \frac {\mathrm d v} {\mathrm d x}$ $=$ $\displaystyle e^{a x} \sin b x$ $\displaystyle \implies \ \$ $\displaystyle v$ $=$ $\displaystyle \frac {e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2}$ Primitive of $e^{a x} \sin b x$

Then:

 $\displaystyle \int x e^{a x} \sin bx \ \mathrm d x$ $=$ $\displaystyle x \left({\frac {e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2} }\right) - \int \left({\frac {e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2} }\right) \ \mathrm d x + C$ Integration by Parts $\displaystyle$ $=$ $\displaystyle \frac {x e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2}$ Linear Combination of Integrals $\displaystyle$  $\, \displaystyle - \,$ $\displaystyle \frac a {a^2 + b^2} \int e^{a x} \sin b x \ \mathrm d x + \frac b {a^2 + b^2} \int e^{a x} \cos b x \ \mathrm d x + C$ $\displaystyle$ $=$ $\displaystyle \frac {x e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2}$ $\displaystyle$  $\, \displaystyle - \,$ $\displaystyle \frac a {a^2 + b^2} \left({\frac {e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2} }\right)$ Primitive of $e^{a x} \sin b x$ $\displaystyle$  $\, \displaystyle + \,$ $\displaystyle \frac b {a^2 + b^2} \left({\frac {e^{a x} \left({a \cos b x + b \sin bx}\right)} {a^2 + b^2} }\right) + C$ Primitive of $e^{a x} \cos b x$ $\displaystyle$ $=$ $\displaystyle \frac {x e^{a x} \left({a \sin b x - b \cos bx}\right)} {a^2 + b^2} - \frac {e^{a x} \left({\left({a^2 - b^2}\right) \sin b x - 2 a b \cos bx}\right)} {\left({a^2 + b^2}\right)^2} + C$ simplifying

$\blacksquare$