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