What is #f(x) = int (x-2)(e^x-1) dx# if #f(2 ) = 4 #?

1 Answer
Dec 5, 2016

#f(x) = (x-3)e^x-x^2/2+2x-e^2+2#

Explanation:

Develop the integrand:

#int(x-2)(e^x-1)dx = int(xe^x-2e^x-x+2)dx = int xe^xdx-2inte^xdx-intxdx+2intdx#

The only term that not immediate is the first, that can be integrated by parts:

#int xe^xdx = intx d(e^x) =xe^x-int e^x dx =(x-1)e^x#

So:

#f(x) = (x-1)e^x-2e^x-x^2/2+2x+C = (x-3)e^x-x^2/2+2x+C#

Posing #f(2)=4# we can determine #C#:

#(2-3)e^2-4/2+4=C#

#-e^2+2=C#

Finally:

#f(x) = (x-3)e^x-x^2/2+2x-e^2+2#