How do you find the antiderivative of #(x^2)(e^x)dx#?

1 Answer
Nov 9, 2016

Answer:

# intx^2e^xdx = (x^2 - 2x + 2)e^x +C #

Explanation:

Integration of # int x^2e^x dx # will require two applications of Integration By Parts.

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

# intu(dv)/dxdx = uv - intv(du)/dxdx #, or less formally # intudv=uv-intvdu #

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^2e^x#, hopefully you can see that #x^2# simplifies when differentiated and #e^x# remains unchanged under differentiation or integration.

Let # { (u=x^2, => , (du)/dx=2x), ((dv)/dx=e^x, =>, v=e^x ) :}#

Then plugging into the IBP formula gives us:
# int(u)((dv)/dx)dx = (u)(v) - int(v)((du)/dx)dx (+C) #
# :. int(x^2)(e^x)dx = (x^2)(e^x) - int(e^x)(2x)dx +C #
# :. intx^2e^xdx = x^2e^x - 2intxe^xdx +C #

So We still have more work to do to find #intxe^xdx #, but this integral is simpler than the original # intx^2e^xdx # and we can find #intxe^xdx # with another application of IBP as follows:

Let # { (u=x, => , (du)/dx=x), ((dv)/dx=e^x, =>, v=e^x ) :}#

Then plugging into the IBP formula gives us:
# int(u)((dv)/dx)dx = (u)(v) - int(v)((du)/dx)dx #
# :. int(x)(e^x)dx = (x)(e^x) - int(e^x)(1)dx #
# :. int xe^x dx = xe^x - e^x #

Inserting this into our earlier result gives us:
# :. intx^2e^xdx = x^2e^x - 2{xe^x - e^x} +C #
# :. intx^2e^xdx = x^2e^x - 2xe^x + 2e^x +C #
# :. intx^2e^xdx = (x^2 - 2x + 2)e^x +C #