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