# How do you integrate int x^2e^(3x) by integration by parts method?

Dec 12, 2016

$\int {x}^{2} {e}^{3 x} \mathrm{dx} = \frac{1}{27} \left(9 {x}^{2} - 6 x + 2\right) {e}^{3 x} + C$

#### Explanation:

If you are studying maths, then you should learn the formula for Integration By Parts (IBP), and practice how to use it:

$\int u \frac{\mathrm{dv}}{\mathrm{dx}} \mathrm{dx} = u v - \int v \frac{\mathrm{du}}{\mathrm{dx}} \mathrm{dx}$, or less formally $\text{ } \int u \mathrm{dv} = u v - \int v \mathrm{du}$

I was taught to remember the less formal rule in word; "The integral of udv equals uv minus the integral of vdu". If you struggle to remember the rule, then it may help to see that it comes a s a direct consequence of integrating the Product Rule for differentiation.

Essentially we would like to identify one function that simplifies when differentiated, and identify one that simplifies when integrated (or is at least is integrable).

So for the integrand ${x}^{2} {e}^{3 x}$, hopefully you can see that ${x}^{2}$ simplifies when differentiated and ${e}^{3 x}$ effectively remains unchanged under differentiation or integration.

Let $\left\{\begin{matrix}u = {x}^{2} & \implies & \frac{\mathrm{du}}{\mathrm{dx}} = 2 x \\ \frac{\mathrm{dv}}{\mathrm{dx}} = {e}^{3 x} & \implies & v = \frac{1}{3} {e}^{3 x}\end{matrix}\right.$

Then plugging into the IBP formula gives us:

$\int \left(u\right) \left(\frac{\mathrm{dv}}{\mathrm{dx}}\right) \mathrm{dx} = \left(u\right) \left(v\right) - \int \left(v\right) \left(\frac{\mathrm{du}}{\mathrm{dx}}\right) \mathrm{dx}$
$\therefore \int {x}^{2} {e}^{3 x} \mathrm{dx} = \left({x}^{2}\right) \left(\frac{1}{3} {e}^{3 x}\right) - \int \left(\frac{1}{3} {e}^{3 x}\right) \left(2 x\right) \mathrm{dx}$
$\therefore \int {x}^{2} {e}^{3 x} \mathrm{dx} = \frac{{x}^{2} {e}^{3 x}}{3} - \frac{2}{3} \int x {e}^{3 x} \mathrm{dx}$ ..... [1]

So we have made progress and simplified the integral but we now need to apply IBP a second time to integrate $x {e}^{3 x}$

Let $\left\{\begin{matrix}u = x & \implies & \frac{\mathrm{du}}{\mathrm{dx}} = 1 \\ \frac{\mathrm{dv}}{\mathrm{dx}} = {e}^{3 x} & \implies & v = \frac{1}{3} {e}^{3 x}\end{matrix}\right.$

Then plugging into the IBP formula gives us:

$\int \left(u\right) \left(\frac{\mathrm{dv}}{\mathrm{dx}}\right) \mathrm{dx} = \left(u\right) \left(v\right) - \int \left(v\right) \left(\frac{\mathrm{du}}{\mathrm{dx}}\right) \mathrm{dx}$
$\therefore \int x {e}^{3 x} \mathrm{dx} = \left(x\right) \left(\frac{1}{3} {e}^{3 x}\right) - \int \left(\frac{1}{3} {e}^{3 x}\right) \left(1\right) \mathrm{dx}$
$\therefore \int x {e}^{3 x} \mathrm{dx} = \frac{x {e}^{3 x}}{3} - \frac{1}{3} \int {e}^{3 x} \mathrm{dx} + {C}_{1}$
$\therefore \int x {e}^{3 x} \mathrm{dx} = \frac{x {e}^{3 x}}{3} - \frac{1}{9} {e}^{3 x} + {C}_{1}$

Substituting this into [1] we get:

$\text{ } \int {x}^{2} {e}^{3 x} \mathrm{dx} = \frac{{x}^{2} {e}^{3 x}}{3} - \frac{2}{3} \left\{\frac{x {e}^{3 x}}{3} - \frac{1}{9} {e}^{3 x} + {C}_{1}\right\}$
$\therefore \int {x}^{2} {e}^{3 x} \mathrm{dx} = \frac{{x}^{2} {e}^{3 x}}{3} - \frac{2 x {e}^{3 x}}{9} + \frac{2 {e}^{3 x}}{27} + C$
$\therefore \int {x}^{2} {e}^{3 x} \mathrm{dx} = \frac{1}{27} \left(9 {x}^{2} - 6 x + 2\right) {e}^{3 x} + C$