Integral of $$$x^{2} e^{- \frac{x}{2}}$$$

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

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ 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 $$$\int x^{2} e^{- \frac{x}{2}}\, dx$$$.

Solution

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

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

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

The integral can be rewritten as

$${\color{red}{\int{x^{2} e^{- \frac{x}{2}} d x}}}={\color{red}{\left(x^{2} \cdot \left(- 2 e^{- \frac{x}{2}}\right)-\int{\left(- 2 e^{- \frac{x}{2}}\right) \cdot 2 x d x}\right)}}={\color{red}{\left(- 2 x^{2} e^{- \frac{x}{2}} - \int{\left(- 4 x e^{- \frac{x}{2}}\right)d x}\right)}}$$

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

$$- 2 x^{2} e^{- \frac{x}{2}} - {\color{red}{\int{\left(- 4 x e^{- \frac{x}{2}}\right)d x}}} = - 2 x^{2} e^{- \frac{x}{2}} - {\color{red}{\left(- 4 \int{x e^{- \frac{x}{2}} d x}\right)}}$$

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

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

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

Thus,

$$- 2 x^{2} e^{- \frac{x}{2}} + 4 {\color{red}{\int{x e^{- \frac{x}{2}} d x}}}=- 2 x^{2} e^{- \frac{x}{2}} + 4 {\color{red}{\left(x \cdot \left(- 2 e^{- \frac{x}{2}}\right)-\int{\left(- 2 e^{- \frac{x}{2}}\right) \cdot 1 d x}\right)}}=- 2 x^{2} e^{- \frac{x}{2}} + 4 {\color{red}{\left(- 2 x e^{- \frac{x}{2}} - \int{\left(- 2 e^{- \frac{x}{2}}\right)d x}\right)}}$$

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

$$- 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 4 {\color{red}{\int{\left(- 2 e^{- \frac{x}{2}}\right)d x}}} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 4 {\color{red}{\left(- 2 \int{e^{- \frac{x}{2}} d x}\right)}}$$

Let $$$u=- \frac{x}{2}$$$.

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

Thus,

$$- 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} + 8 {\color{red}{\int{e^{- \frac{x}{2}} d x}}} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} + 8 {\color{red}{\int{\left(- 2 e^{u}\right)d u}}}$$

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

$$- 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} + 8 {\color{red}{\int{\left(- 2 e^{u}\right)d u}}} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} + 8 {\color{red}{\left(- 2 \int{e^{u} d u}\right)}}$$

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

$$- 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 16 {\color{red}{\int{e^{u} d u}}} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 16 {\color{red}{e^{u}}}$$

Recall that $$$u=- \frac{x}{2}$$$:

$$- 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 16 e^{{\color{red}{u}}} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 16 e^{{\color{red}{\left(- \frac{x}{2}\right)}}}$$

Therefore,

$$\int{x^{2} e^{- \frac{x}{2}} d x} = - 2 x^{2} e^{- \frac{x}{2}} - 8 x e^{- \frac{x}{2}} - 16 e^{- \frac{x}{2}}$$

Simplify:

$$\int{x^{2} e^{- \frac{x}{2}} d x} = 2 \left(- x^{2} - 4 x - 8\right) e^{- \frac{x}{2}}$$

Add the constant of integration:

$$\int{x^{2} e^{- \frac{x}{2}} d x} = 2 \left(- x^{2} - 4 x - 8\right) e^{- \frac{x}{2}}+C$$

Answer

$$$\int x^{2} e^{- \frac{x}{2}}\, dx = 2 \left(- x^{2} - 4 x - 8\right) e^{- \frac{x}{2}} + C$$$A


Please try a new game Rotatly