Primitive of x squared by Exponential of a x

Theorem

 * $\ds \int x^2 e^{a x} \rd x = \frac {e^{a x} } a \paren {x^2 - \frac {2 x} a + \frac 2 {a^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^n e^{a x}$
 * Primitive of $x e^{a x} $