Integral of x2exx^{2} e^{- x}

The calculator will find the integral/antiderivative of x2exx^{2} e^{- x}, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as dxdx, dydy etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find x2exdx\int x^{2} e^{- x}\, dx.

Solution

For the integral x2exdx\int{x^{2} e^{- x} d x}, use integration by parts udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}.

Let u=x2\operatorname{u}=x^{2} and dv=exdx\operatorname{dv}=e^{- x} dx.

Then du=(x2)dx=2xdx\operatorname{du}=\left(x^{2}\right)^{\prime }dx=2 x dx (steps can be seen ») and v=exdx=ex\operatorname{v}=\int{e^{- x} d x}=- e^{- x} (steps can be seen »).

Thus,

x2exdx=(x2(ex)(ex)2xdx)=(x2ex(2xex)dx){\color{red}{\int{x^{2} e^{- x} d x}}}={\color{red}{\left(x^{2} \cdot \left(- e^{- x}\right)-\int{\left(- e^{- x}\right) \cdot 2 x d x}\right)}}={\color{red}{\left(- x^{2} e^{- x} - \int{\left(- 2 x e^{- x}\right)d x}\right)}}

Apply the constant multiple rule cf(x)dx=cf(x)dx\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx with c=2c=-2 and f(x)=xexf{\left(x \right)} = x e^{- x}:

x2ex(2xex)dx=x2ex(2xexdx)- x^{2} e^{- x} - {\color{red}{\int{\left(- 2 x e^{- x}\right)d x}}} = - x^{2} e^{- x} - {\color{red}{\left(- 2 \int{x e^{- x} d x}\right)}}

For the integral xexdx\int{x e^{- x} d x}, use integration by parts udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}.

Let u=x\operatorname{u}=x and dv=exdx\operatorname{dv}=e^{- x} dx.

Then du=(x)dx=1dx\operatorname{du}=\left(x\right)^{\prime }dx=1 dx (steps can be seen ») and v=exdx=ex\operatorname{v}=\int{e^{- x} d x}=- e^{- x} (steps can be seen »).

So,

x2ex+2xexdx=x2ex+2(x(ex)(ex)1dx)=x2ex+2(xex(ex)dx)- x^{2} e^{- x} + 2 {\color{red}{\int{x e^{- x} d x}}}=- x^{2} e^{- x} + 2 {\color{red}{\left(x \cdot \left(- e^{- x}\right)-\int{\left(- e^{- x}\right) \cdot 1 d x}\right)}}=- x^{2} e^{- x} + 2 {\color{red}{\left(- x e^{- x} - \int{\left(- e^{- x}\right)d x}\right)}}

Apply the constant multiple rule cf(x)dx=cf(x)dx\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx with c=1c=-1 and f(x)=exf{\left(x \right)} = e^{- x}:

x2ex2xex2(ex)dx=x2ex2xex2(exdx)- x^{2} e^{- x} - 2 x e^{- x} - 2 {\color{red}{\int{\left(- e^{- x}\right)d x}}} = - x^{2} e^{- x} - 2 x e^{- x} - 2 {\color{red}{\left(- \int{e^{- x} d x}\right)}}

Let u=xu=- x.

Then du=(x)dx=dxdu=\left(- x\right)^{\prime }dx = - dx (steps can be seen »), and we have that dx=dudx = - du.

Thus,

x2ex2xex+2exdx=x2ex2xex+2(eu)du- x^{2} e^{- x} - 2 x e^{- x} + 2 {\color{red}{\int{e^{- x} d x}}} = - x^{2} e^{- x} - 2 x e^{- x} + 2 {\color{red}{\int{\left(- e^{u}\right)d u}}}

Apply the constant multiple rule cf(u)du=cf(u)du\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du with c=1c=-1 and f(u)=euf{\left(u \right)} = e^{u}:

x2ex2xex+2(eu)du=x2ex2xex+2(eudu)- x^{2} e^{- x} - 2 x e^{- x} + 2 {\color{red}{\int{\left(- e^{u}\right)d u}}} = - x^{2} e^{- x} - 2 x e^{- x} + 2 {\color{red}{\left(- \int{e^{u} d u}\right)}}

The integral of the exponential function is eudu=eu\int{e^{u} d u} = e^{u}:

x2ex2xex2eudu=x2ex2xex2eu- x^{2} e^{- x} - 2 x e^{- x} - 2 {\color{red}{\int{e^{u} d u}}} = - x^{2} e^{- x} - 2 x e^{- x} - 2 {\color{red}{e^{u}}}

Recall that u=xu=- x:

x2ex2xex2eu=x2ex2xex2e(x)- x^{2} e^{- x} - 2 x e^{- x} - 2 e^{{\color{red}{u}}} = - x^{2} e^{- x} - 2 x e^{- x} - 2 e^{{\color{red}{\left(- x\right)}}}

Therefore,

x2exdx=x2ex2xex2ex\int{x^{2} e^{- x} d x} = - x^{2} e^{- x} - 2 x e^{- x} - 2 e^{- x}

Simplify:

x2exdx=(x22x2)ex\int{x^{2} e^{- x} d x} = \left(- x^{2} - 2 x - 2\right) e^{- x}

Add the constant of integration:

x2exdx=(x22x2)ex+C\int{x^{2} e^{- x} d x} = \left(- x^{2} - 2 x - 2\right) e^{- x}+C

Answer

x2exdx=(x22x2)ex+C\int x^{2} e^{- x}\, dx = \left(- x^{2} - 2 x - 2\right) e^{- x} + CA