Integral of $$$e^{- x} \operatorname{atan}{\left(e^{x} \right)}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int e^{- x} \operatorname{atan}{\left(e^{x} \right)}\, dx$$$.
Solution
Let $$$u=e^{x}$$$.
Then $$$du=\left(e^{x}\right)^{\prime }dx = e^{x} dx$$$ (steps can be seen »), and we have that $$$e^{x} dx = du$$$.
So,
$${\color{red}{\int{e^{- x} \operatorname{atan}{\left(e^{x} \right)} d x}}} = {\color{red}{\int{\frac{\operatorname{atan}{\left(u \right)}}{u^{2}} d u}}}$$
Let $$$v=\frac{1}{u}$$$.
Then $$$dv=\left(\frac{1}{u}\right)^{\prime }du = - \frac{1}{u^{2}} du$$$ (steps can be seen »), and we have that $$$\frac{du}{u^{2}} = - dv$$$.
So,
$${\color{red}{\int{\frac{\operatorname{atan}{\left(u \right)}}{u^{2}} d u}}} = {\color{red}{\int{\left(- \operatorname{acot}{\left(v \right)}\right)d v}}}$$
Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=-1$$$ and $$$f{\left(v \right)} = \operatorname{acot}{\left(v \right)}$$$:
$${\color{red}{\int{\left(- \operatorname{acot}{\left(v \right)}\right)d v}}} = {\color{red}{\left(- \int{\operatorname{acot}{\left(v \right)} d v}\right)}}$$
For the integral $$$\int{\operatorname{acot}{\left(v \right)} d v}$$$, use integration by parts $$$\int \operatorname{\omega} \operatorname{dp} = \operatorname{\omega}\operatorname{p} - \int \operatorname{p} \operatorname{d\omega}$$$.
Let $$$\operatorname{\omega}=\operatorname{acot}{\left(v \right)}$$$ and $$$\operatorname{dp}=dv$$$.
Then $$$\operatorname{d\omega}=\left(\operatorname{acot}{\left(v \right)}\right)^{\prime }dv=- \frac{1}{v^{2} + 1} dv$$$ (steps can be seen ») and $$$\operatorname{p}=\int{1 d v}=v$$$ (steps can be seen »).
The integral becomes
$$- {\color{red}{\int{\operatorname{acot}{\left(v \right)} d v}}}=- {\color{red}{\left(\operatorname{acot}{\left(v \right)} \cdot v-\int{v \cdot \left(- \frac{1}{v^{2} + 1}\right) d v}\right)}}=- {\color{red}{\left(v \operatorname{acot}{\left(v \right)} - \int{\left(- \frac{v}{v^{2} + 1}\right)d v}\right)}}$$
Let $$$w=v^{2} + 1$$$.
Then $$$dw=\left(v^{2} + 1\right)^{\prime }dv = 2 v dv$$$ (steps can be seen »), and we have that $$$v dv = \frac{dw}{2}$$$.
The integral can be rewritten as
$$- v \operatorname{acot}{\left(v \right)} + {\color{red}{\int{\left(- \frac{v}{v^{2} + 1}\right)d v}}} = - v \operatorname{acot}{\left(v \right)} + {\color{red}{\int{\left(- \frac{1}{2 w}\right)d w}}}$$
Apply the constant multiple rule $$$\int c f{\left(w \right)}\, dw = c \int f{\left(w \right)}\, dw$$$ with $$$c=- \frac{1}{2}$$$ and $$$f{\left(w \right)} = \frac{1}{w}$$$:
$$- v \operatorname{acot}{\left(v \right)} + {\color{red}{\int{\left(- \frac{1}{2 w}\right)d w}}} = - v \operatorname{acot}{\left(v \right)} + {\color{red}{\left(- \frac{\int{\frac{1}{w} d w}}{2}\right)}}$$
The integral of $$$\frac{1}{w}$$$ is $$$\int{\frac{1}{w} d w} = \ln{\left(\left|{w}\right| \right)}$$$:
$$- v \operatorname{acot}{\left(v \right)} - \frac{{\color{red}{\int{\frac{1}{w} d w}}}}{2} = - v \operatorname{acot}{\left(v \right)} - \frac{{\color{red}{\ln{\left(\left|{w}\right| \right)}}}}{2}$$
Recall that $$$w=v^{2} + 1$$$:
$$- v \operatorname{acot}{\left(v \right)} - \frac{\ln{\left(\left|{{\color{red}{w}}}\right| \right)}}{2} = - v \operatorname{acot}{\left(v \right)} - \frac{\ln{\left(\left|{{\color{red}{\left(v^{2} + 1\right)}}}\right| \right)}}{2}$$
Recall that $$$v=\frac{1}{u}$$$:
$$- \frac{\ln{\left(1 + {\color{red}{v}}^{2} \right)}}{2} - {\color{red}{v}} \operatorname{acot}{\left({\color{red}{v}} \right)} = - \frac{\ln{\left(1 + {\color{red}{\frac{1}{u}}}^{2} \right)}}{2} - {\color{red}{\frac{1}{u}}} \operatorname{acot}{\left({\color{red}{\frac{1}{u}}} \right)}$$
Recall that $$$u=e^{x}$$$:
$$- \frac{\ln{\left(1 + {\color{red}{u}}^{-2} \right)}}{2} - {\color{red}{u}}^{-1} \operatorname{acot}{\left({\color{red}{u}}^{-1} \right)} = - \frac{\ln{\left(1 + {\color{red}{e^{x}}}^{-2} \right)}}{2} - {\color{red}{e^{x}}}^{-1} \operatorname{acot}{\left({\color{red}{e^{x}}}^{-1} \right)}$$
Therefore,
$$\int{e^{- x} \operatorname{atan}{\left(e^{x} \right)} d x} = - \frac{\ln{\left(1 + e^{- 2 x} \right)}}{2} - e^{- x} \operatorname{acot}{\left(e^{- x} \right)}$$
Simplify:
$$\int{e^{- x} \operatorname{atan}{\left(e^{x} \right)} d x} = x - \frac{\ln{\left(e^{2 x} + 1 \right)}}{2} - e^{- x} \operatorname{atan}{\left(e^{x} \right)}$$
Add the constant of integration:
$$\int{e^{- x} \operatorname{atan}{\left(e^{x} \right)} d x} = x - \frac{\ln{\left(e^{2 x} + 1 \right)}}{2} - e^{- x} \operatorname{atan}{\left(e^{x} \right)}+C$$
Answer
$$$\int e^{- x} \operatorname{atan}{\left(e^{x} \right)}\, dx = \left(x - \frac{\ln\left(e^{2 x} + 1\right)}{2} - e^{- x} \operatorname{atan}{\left(e^{x} \right)}\right) + C$$$A