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

1 Answer
Jun 27, 2018

f(x)=e^(x-1)(x-1)+e^-x(x^2+2x+2)+7-e-10/e^2

Explanation:

intxe^(x-1)dx-intx^2e^-xdx

Let us now deal with only the first integral

intxe^(x-1)dx Let u=x-1 then du=dx

int(u+1)e^udu

Let w=u+1, dw=du , dv=e^u du, v=e^u

(u+1)e^u-inte^udu

(u+1)e^u-e^u+c_1

Substitute back in

xe^(x-1)-e^(x-1)+c_1

Now move onto the second integral

-intx^2e^-xdx

Let u=-x , u^2=x^2 , -du=dx

intu^2e^udu

Let w=u^2 , dw=2udu , dv=e^udu , v=e^u

u^2e^u-2intue^udu

Let w=u , dw=du , dv=e^udu , v=e^u

u^2e^u-2(ue^u-inte^udu)

u^2e^u-2ue^u+2e^u+c_2

Substitute

x^2e^-x+2xe^-x+2e^-x+c_2

Combine both Integrals

xe^(x-1)-e^(x-1)+c_1+ x^2e^-x+2xe^-x+2e^-x+c_2

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

Solve for C

7=e+e^-2(2^2+2(2)+2)+C

7=e+10e^-2+C

C=7-e-10/e^2

f(x)=e^(x-1)(x-1)+e^-x(x^2+2x+2)+7-e-10/e^2