What is f(x) = int xe^(x-3)dx if f(0)=-2 ?

Jan 2, 2016

$f \left(x\right) = x {e}^{x - 3} - {e}^{x - 3} + {e}^{-} 3 - 2$

Explanation:

$f \left(x\right) = \int x {e}^{x - 3} \mathrm{dx}$

$\int u \left(\mathrm{dv}\right) = u v - \int v \left(\mathrm{du}\right)$

Selecting $u$ and $\mathrm{dv}$ is the first step we should take.

Let $u = x$ and $\mathrm{dv} = {e}^{x - 3} \mathrm{dx}$

$u = x$
$\mathrm{du} = \mathrm{dx}$

$\mathrm{dv} = {e}^{x - 3} \mathrm{dx}$

$\int \mathrm{dv} = \int {e}^{x - 3} \mathrm{dx}$

$v = {e}^{x - 3}$

Now our integration becomes

$f \left(x\right) = \int x {e}^{x - 3} \mathrm{dx} = x {e}^{x - 3} - \int {e}^{x - 3} \mathrm{dx}$

$\int x {e}^{x - 3} \mathrm{dx} = x {e}^{x - 3} - {e}^{x - 3} + C$

$f \left(x\right) = x {e}^{x - 3} - {e}^{x - 3} + C$
Given $f \left(0\right) = - 2$
$f \left(0\right) = 0 {e}^{0 - 3} - {e}^{0 - 3} + C$
$- 2 = - {e}^{-} 3 + C$
${e}^{-} 3 - 2 = C$

$x {e}^{x - 3} - {e}^{x - 3} + {e}^{-} 3 - 2$

Jan 2, 2016

$f \left(x\right) = {\int}_{0}^{x} t {e}^{t - 3} \mathrm{dt} - 2$
$= x {e}^{x - 3} - {e}^{x - 3} + {e}^{- 3} - 2$

Explanation:

Instead of using indefinite integration (refer to the other answer by Karthik), one can also use definite integration for this question. The integration is mostly the same.