# How do you evaluate the integral ((x^2)+1) e^-x dx from 0 to 1?

Apr 11, 2018

$\frac{3}{e} \left(e - 2\right)$.

#### Explanation:

Let, $I = \int \left({x}^{2} + 1\right) {e}^{-} x \mathrm{dx}$.

Using the following Rule of Integration by Parts (IBP) :

IBP : $\int u v ' \mathrm{dx} = u v - \int v u ' \mathrm{dx}$.

We take, $u = {x}^{2} + 1 , \mathmr{and} , v ' = {e}^{-} x$.

$\therefore u ' = 2 x , \mathmr{and} , v = \int {e}^{-} x \mathrm{dx} = {e}^{-} \frac{x}{-} 1 = - {e}^{-} x$.

$\therefore I = - \left({x}^{2} + 1\right) {e}^{-} x - \int \left(- {e}^{-} x \cdot 2 x\right) \mathrm{dx}$,

$\Rightarrow I = - \left({x}^{2} + 1\right) {e}^{-} x + 2 {I}_{1} , \text{ where, } {I}_{1} = \int x {e}^{-} x \mathrm{dx}$.

We once again use IBP for ${I}_{1}$; this time, we choose,

$u = x , \mathmr{and} , v ' = {e}^{-} x \therefore u ' = 1 , \mathmr{and} , v = - {e}^{-} x$.

$\therefore {I}_{1} = - x {e}^{-} x - \int \left(- {e}^{-} x \cdot 1\right) \mathrm{dx}$,

$: {I}_{1} = - x {e}^{-} x - {e}^{-} x$.

Utilising ${I}_{1}$ in $I$, we get,

$I = - \left({x}^{2} + 1\right) {e}^{-} x + 2 \left\{- x {e}^{-} x - {e}^{-} x\right\}$,

$\Rightarrow I = - \left({x}^{2} + 2 x + 3\right) {e}^{-} x + C$.

$\therefore {\int}_{0}^{1} \left({x}^{2} + 1\right) {e}^{-} x \mathrm{dx} = - {\left[\left({x}^{2} + 2 x + 3\right) {e}^{-} x\right]}_{0}^{1}$,

$= - \left[\left(1 + 2 + 3\right) {e}^{-} 1 - \left(0 + 0 + 3\right) {e}^{-} 0\right]$.

$\Rightarrow {\int}_{0}^{1} \left({x}^{2} + 1\right) {e}^{-} x \mathrm{dx} = - \left(\frac{6}{e} - 3\right) = \frac{3}{e} \left(e - 2\right)$.

Enjoy Maths.!