How do you integrate int x^2e^x from 0 to 1 by integration by parts method?

Nov 4, 2016

${\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = e - 2$

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 $\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}^{x}$, hopefully you can see that ${x}^{2}$ simplifies when differentiated and e^x 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}^{x} & \implies & v = {e}^{x}\end{matrix}\right.$

Then plugging into the IBP formula gives us:
${\int}_{0}^{1} \left({x}^{2}\right) \left({e}^{x}\right) \mathrm{dx} = {\left[\left({x}^{2}\right) \left({e}^{x}\right)\right]}_{0}^{1} - {\int}_{0}^{1} \left({e}^{x}\right) \left(2 x\right) \mathrm{dx}$
$\therefore {\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = {\left[{x}^{2} {e}^{x}\right]}_{0}^{1} - 2 {\int}_{0}^{1} x {e}^{x} \mathrm{dx}$
$\therefore {\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = \left(1 {e}^{1} - 0\right) - 2 {\int}_{0}^{1} x {e}^{x} \mathrm{dx}$
$\therefore {\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = e - 2 {\int}_{0}^{1} x {e}^{x} \mathrm{dx}$ .... [1]

We will now need to apply IBP a second time to integrate $\int x {e}^{x} \mathrm{dx}$, and similarly $x$ will simplify if differentiated

Let $\left\{\begin{matrix}u = x & \implies & \frac{\mathrm{du}}{\mathrm{dx}} = 1 \\ \frac{\mathrm{dv}}{\mathrm{dx}} = {e}^{x} & \implies & v = {e}^{x}\end{matrix}\right.$
${\int}_{0}^{1} \left(x\right) \left({e}^{x}\right) \mathrm{dx} = {\left[\left(x\right) \left({e}^{x}\right)\right]}_{0}^{1} - {\int}_{0}^{1} \left({e}^{x}\right) \left(1\right) \mathrm{dx}$
$\therefore {\int}_{0}^{1} x {e}^{x} \mathrm{dx} = \left(1 {e}^{1} - 0\right) - {\int}_{0}^{1} {e}^{x} \mathrm{dx}$
$\therefore {\int}_{0}^{1} x {e}^{x} \mathrm{dx} = e - {\left[{e}^{x}\right]}_{0}^{1}$
$\therefore {\int}_{0}^{1} x {e}^{x} \mathrm{dx} = e - \left({e}^{1} - {e}^{0}\right)$
$\therefore {\int}_{0}^{1} x {e}^{x} \mathrm{dx} = 1$

Substituting this reulti nto [1] gives ud
${\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = e - 2 \left(1\right)$
Hence,
${\int}_{0}^{1} {x}^{2} {e}^{x} \mathrm{dx} = e - 2$

Nov 4, 2016

Use integration by parts twice, taking the x term as that which you derive, and the ${e}^{x}$ term as that which you "anti-derive" both times.

Explanation:

The method of integration by parts can take a little practice before the answers start to jump out at you. Usually, the most challenging part of this method is figuring out what to derive and what to "anti-derive." You may use different variables, but I will be using this form in my explanation:

$u v - \int v \mathrm{du}$

I will show how to find the anti-derivative first, then evaluate.

First, we need to recognize that the derivative of ${e}^{x}$ is just ${e}^{x}$. Because of this, we know that if we were to choose to derive the ${e}^{x}$ term and take the antiderivative of the ${x}^{2}$ term, we wouldn't get anywhere; we would just end up continually increasing the power of our x term. So, we can take ${x}^{2}$ as our term to derive and ${e}^{x}$ as our term to "anti-derive."

Thus, we can set $u = {x}^{2}$, and $\mathrm{du} = 2 x \mathrm{dx}$, and $\mathrm{dv} = {e}^{x} \mathrm{dx}$ where $v = {e}^{x}$.

That gives us:

${x}^{2} {e}^{x} - 2 \int \left(x {e}^{x}\right) \mathrm{dx}$

We still have that $x {e}^{x}$ situation, so we can then follow the above process again quite similarly. Note that I have chosen to take the constant, 2, outside of the integral.

$u = x$, $\mathrm{du} = \mathrm{dx}$, $\mathrm{dv} = {e}^{x} \mathrm{dx}$, $v = {e}^{x}$

That gives us:

x^2e^x-2[xe^x-int(e^x)dx]

(Don't forget the terms you found in the first usage of integration by parts, or the 2!)

We can find the integral of ${e}^{x}$, so we are through with integration by parts. Thus, we have:

${x}^{2} {e}^{x} - 2 x {e}^{x} + 2 {e}^{x}$

or ${e}^{x} \left({x}^{2} - 2 x + 2\right)$

To evaluate this with limits of integration from 0 to 1, we have:

${\left(1\right)}^{2} {e}^{1} - 2 \left(1\right) {e}^{1} + 2 {e}^{1}$-$\left[{\left(0\right)}^{2} {e}^{0} - 2 \left(0\right) {e}^{0} + 2 {e}^{0}\right]$

Because ${e}^{0} = 1$, we have:

$e - 2e+2 e - 0 + 0 - 2$

And so, our final answer is:

$e - 2$