How do you find the 1st and 2nd derivative of #y=x^2e^x-4xe^x+2e^x#?

1 Answer
Oct 20, 2016

# dy/dx= e^x(x^2-2x-2) # or #x^2e^x-2xe^x-2e^x#
# :. (d^2y)/dx^2= e^x(x^2-4) # or #x^2e^x-4e^x#

Explanation:

Use the product rule: # d/dxuv= u(dv)/dx+v(du)/dx #

So # y = x^2e^x-4xe^x+2e^x #
# :. y = (x^2-4x+2)e^x #

The product rule gives:

# dy/dx= (x^2-4x+2)d/dxe^x+e^xd/dx(x^2-4x+2) #
# :. dy/dx= (x^2-4x+2)e^x+e^x(2x-4) #
# :. dy/dx= e^x(x^2-4x+2+2x-4) #
# :. dy/dx= e^x(x^2-2x-2) #

Applying the product rule again:
# (d^2y)/dx^2 = (x^2-2x-2)d/dxe^x+e^xd/dx(x^2-2x-2) #
# :. (d^2y)/dx^2= (x^2-2x-2)e^x+e^x(2x-2) #
# :. (d^2y)/dx^2= e^x(x^2-2x-2+2x-2) #
# :. (d^2y)/dx^2= e^x(x^2-4) #