1
$\begingroup$

Evaluate the following integral.

$$ \int x^2 e^x\ dx $$

What i have tried :

$ f^{'}(x) = e^x , f(x) = e^x , g(x) = x^2$

$$ \int x^2 e^x\ dx = e^x\ x^2 - \int e^x\ 2x\ dx $$

$ f^{'}(x) = e^x , f(x) = e^x , g(x) = 2x $

$$ \int x^2 e^x\ dx = e^x\ x^2 - e^x\ 2x - \int e^x\ x\ dx $$

$ f^{'}(x) = e^x , f(x) = e^x , g(x) = x $

$$ \int x^2 e^x\ dx = e^x\ x^2 - e^x\ 2x - x\ e^x - \int e^x \ dx $$

$$ \int x^2 e^x\ dx = e^x\ x^2 - e^x\ 2x - x\ e^x - e^x + C $$

The answer in the book is $ x^2e^x-2xe^x+2e^x+C $

What did i do wrong ?

$\endgroup$
1
  • $\begingroup$ Note that integration by parts is essentially the product rule for differentiation in integral form. $\frac d{dx} x^2e^x = 2xe^x+x^2e^x$, and $\frac d{dx} xe^x=e^x+xe^x$. Integrate these two expressions with respect to $x$ and you will see what I mean. $\endgroup$ Feb 9 '14 at 19:28
2
$\begingroup$

In your third line,

$$ \int x^2 e^x\ dx = e^x\ x^2 - e^x\ 2x - \int e^x\ x\ dx $$

you should have:

$$\int x^2 e^x\ dx = e^x\ x^2 -\Big(e^x\ 2x - \int 2e^x\, dx\Big)$$

Then, integrating on the right gives and distributing the negative gives us $$x^2e^x - 2xe^x + 2e^x$$

$\endgroup$
2
  • $\begingroup$ Yes, got it. Thank you :) $\endgroup$ Feb 9 '14 at 19:26
  • $\begingroup$ You're welcome! $\endgroup$
    – amWhy
    Feb 9 '14 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.