Integral of $$$\frac{x^{2} e^{- x}}{2}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{x^{2} e^{- x}}{2}\, dx$$$.
Solution
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(x \right)} = x^{2} e^{- x}$$$:
$${\color{red}{\int{\frac{x^{2} e^{- x}}{2} d x}}} = {\color{red}{\left(\frac{\int{x^{2} e^{- x} d x}}{2}\right)}}$$
For the integral $$$\int{x^{2} e^{- x} 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^{- x} dx$$$.
Then $$$\operatorname{du}=\left(x^{2}\right)^{\prime }dx=2 x dx$$$ (steps can be seen ») and $$$\operatorname{v}=\int{e^{- x} d x}=- e^{- x}$$$ (steps can be seen »).
Therefore,
$$\frac{{\color{red}{\int{x^{2} e^{- x} d x}}}}{2}=\frac{{\color{red}{\left(x^{2} \cdot \left(- e^{- x}\right)-\int{\left(- e^{- x}\right) \cdot 2 x d x}\right)}}}{2}=\frac{{\color{red}{\left(- x^{2} e^{- x} - \int{\left(- 2 x e^{- x}\right)d x}\right)}}}{2}$$
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)} = x e^{- x}$$$:
$$- \frac{x^{2} e^{- x}}{2} - \frac{{\color{red}{\int{\left(- 2 x e^{- x}\right)d x}}}}{2} = - \frac{x^{2} e^{- x}}{2} - \frac{{\color{red}{\left(- 2 \int{x e^{- x} d x}\right)}}}{2}$$
For the integral $$$\int{x e^{- x} 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^{- x} dx$$$.
Then $$$\operatorname{du}=\left(x\right)^{\prime }dx=1 dx$$$ (steps can be seen ») and $$$\operatorname{v}=\int{e^{- x} d x}=- e^{- x}$$$ (steps can be seen »).
The integral becomes
$$- \frac{x^{2} e^{- x}}{2} + {\color{red}{\int{x e^{- x} d x}}}=- \frac{x^{2} e^{- x}}{2} + {\color{red}{\left(x \cdot \left(- e^{- x}\right)-\int{\left(- e^{- x}\right) \cdot 1 d x}\right)}}=- \frac{x^{2} e^{- x}}{2} + {\color{red}{\left(- x e^{- x} - \int{\left(- e^{- x}\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=-1$$$ and $$$f{\left(x \right)} = e^{- x}$$$:
$$- \frac{x^{2} e^{- x}}{2} - x e^{- x} - {\color{red}{\int{\left(- e^{- x}\right)d x}}} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} - {\color{red}{\left(- \int{e^{- x} d x}\right)}}$$
Let $$$u=- x$$$.
Then $$$du=\left(- x\right)^{\prime }dx = - dx$$$ (steps can be seen »), and we have that $$$dx = - du$$$.
The integral becomes
$$- \frac{x^{2} e^{- x}}{2} - x e^{- x} + {\color{red}{\int{e^{- x} d x}}} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} + {\color{red}{\int{\left(- 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=-1$$$ and $$$f{\left(u \right)} = e^{u}$$$:
$$- \frac{x^{2} e^{- x}}{2} - x e^{- x} + {\color{red}{\int{\left(- e^{u}\right)d u}}} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} + {\color{red}{\left(- \int{e^{u} d u}\right)}}$$
The integral of the exponential function is $$$\int{e^{u} d u} = e^{u}$$$:
$$- \frac{x^{2} e^{- x}}{2} - x e^{- x} - {\color{red}{\int{e^{u} d u}}} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} - {\color{red}{e^{u}}}$$
Recall that $$$u=- x$$$:
$$- \frac{x^{2} e^{- x}}{2} - x e^{- x} - e^{{\color{red}{u}}} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} - e^{{\color{red}{\left(- x\right)}}}$$
Therefore,
$$\int{\frac{x^{2} e^{- x}}{2} d x} = - \frac{x^{2} e^{- x}}{2} - x e^{- x} - e^{- x}$$
Simplify:
$$\int{\frac{x^{2} e^{- x}}{2} d x} = \left(- \frac{x^{2}}{2} - x - 1\right) e^{- x}$$
Add the constant of integration:
$$\int{\frac{x^{2} e^{- x}}{2} d x} = \left(- \frac{x^{2}}{2} - x - 1\right) e^{- x}+C$$
Answer
$$$\int \frac{x^{2} e^{- x}}{2}\, dx = \left(- \frac{x^{2}}{2} - x - 1\right) e^{- x} + C$$$A