# Calculate integrals 2 [closed]

I have to calculate this integrals

$$I_1 = \int _0^2\:\frac{\arctan \left(x\right)}{x^2+2x+2}dx$$ $$I_2 = \lim _{n\to \infty }\int _0^n\:\frac{\arctan x}{x^2+x+1}dx$$

I have a hint on the first one, the substitution $x = \frac{2-t}{1+2t}$, but I can't understand how it was conceived.

## closed as off-topic by Did, Daniel W. Farlow, user91500, user223391, NamasteApr 19 '17 at 23:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, Daniel W. Farlow, user91500, Community, Namaste
If this question can be reworded to fit the rules in the help center, please edit the question.

• for $|ab|<1$, $\displaystyle \arctan(a)+\arctan(b)=\arctan\left(\tfrac{a+b}{1-ab}\right)$ – FDP Apr 15 '17 at 10:28
• @FDP How can I use this ? – Liviu Apr 15 '17 at 10:30
• Perform your change of variable and apply this formula from the right to the left. – FDP Apr 15 '17 at 10:34
• if you perform a change of variable to simplify the denominator you would make the argument of arctan(x) more difficult to deal with. But if you could write this arctan stuff as a sum of arctan(x) and arctan(constant) you earn something most of the time. – FDP Apr 15 '17 at 10:44
• Other reason is, with your change of variable $\dfrac{1}{x^2+2x+2}dx=-\dfrac{1}{t^2+2t+2}dt$ – FDP Apr 15 '17 at 10:53

\begin{align} I_2=\int_0^{+\infty} \dfrac{\arctan x}{x^2+x+1}dx=\int_0^{1} \dfrac{\arctan x}{x^2+x+1}dx+\int_1^{+\infty} \dfrac{\arctan x}{x^2+x+1}dx \end{align}

In the second integral perform the change of variable $y=\dfrac{1}{x}$,

\begin{align} I_2&=\int_0^{1} \dfrac{\arctan x}{x^2+x+1}dx+\int_0^{1} \dfrac{\arctan\left(\tfrac{1}{x}\right)}{x^2+x+1}dx\\ &=\int_0^{1} \dfrac{\left(\arctan x+\arctan\left(\tfrac{1}{x}\right)\right)}{x^2+x+1}dx\\ &=\int_0^{1} \dfrac{\tfrac{\pi}{2}}{x^2+x+1}dx\\ &=\dfrac{\pi}{2} \int_0^{1} \dfrac{1}{\left(x+\tfrac{1}{2}\right)^2+\tfrac{3}{4}}dx\\ &=\dfrac{\pi}{2}\times \dfrac{2}{\sqrt{3}}\left[\arctan\left(\tfrac{2x+1}{\sqrt{3}}\right)\right]_0^1\\ &=\dfrac{\pi}{\sqrt{3}}\left(\arctan(\sqrt{3})-\arctan\left(\tfrac{1}{\sqrt{3}}\right)\right)\\ &=\dfrac{\pi}{\sqrt{3}}\left(\dfrac{\pi}{3}-\dfrac{\pi}{6})\right)\\ &=\boxed{\dfrac{\pi^2}{6\sqrt{3}}} \end{align}

Other important relation for arctan function:

If $x>0$ then,

$\arctan x+\arctan\left(\tfrac{1}{x}\right)=\dfrac{\pi}{2}$

If $x<0$ replace $\dfrac{\pi}{2}$ by $-\dfrac{\pi}{2}$

And remember too that, for all $x$ real,

$\arctan(-x)=-\arctan(x)$

• Thank you very much for the solution and also the the relations for $\arctan$ ! – Liviu Apr 15 '17 at 11:41
• i have left behind I_1 that is more harder to deal with but you have a road map to compute it. Just follow it. – FDP Apr 15 '17 at 11:47
• Very clever solution. Good job. – user12345 Apr 15 '17 at 13:04

In $I_1$ apply the change of variable $x=\dfrac{2-t}{1+2t}$,

Observe that $t=\dfrac{2-x}{1+2x}$,

\begin{align}I_1=\int_0^2 \dfrac{\arctan\left(\tfrac{2-t}{1+2t}\right)}{t^2+2t+2}dt \end{align}

If $t\in [0;2[$ then $0<2t< 1$ therefore,

\begin{align}I_1=\int_0^2 \dfrac{\arctan(2)}{t^2+2t+2}dt-I_1 \end{align}

Therefore,

\begin{align}I_1&=\dfrac{1}{2}\int_0^2 \dfrac{\arctan(2)}{t^2+2t+2}dt\\ &=\dfrac{\arctan(2)}{2}\Big[\arctan\left(x+1\right)\Big]_0^2\\ &=\boxed{\dfrac{\arctan(2)\arctan(3)}{2}-\dfrac{\arctan(2)}{8}\pi} \end{align}

• Thank you for solving this too ! This is a multiple choice problem and I have to get to the answer $\frac{1}{2} \arctan 2 \cdot \arctan \frac{1}{2}$, how could I rewrite your answer ? – Liviu Apr 15 '17 at 14:19
• Probably you have to omit the last line of my computation of $I_1$ and use the addition formula for arctan i have mentionned above. (i haven't yet tried to get your result) – FDP Apr 15 '17 at 14:30
• There is no absolute value in the arctan addition formula the condition is $ab<1$ – FDP Apr 15 '17 at 15:08
• Anyway if you had to decide if it's the good unique answer a good approximation is enough to decide. No need to get a closed form/exact value. – FDP Apr 15 '17 at 15:30
• Yes, I would have guessed from the choices anyway in the end – Liviu Apr 15 '17 at 15:51


However,

\begin{align} \int{\ln\pars{t} \over z - t}\,\dd t & \,\,\,\stackrel{\tau\ =\ t/z}{=}\,\,\, \int{\ln\pars{z\tau} \over 1 - \tau}\,\dd\tau = -\ln\pars{1 - \tau}\ln\pars{z\tau} + \int{\ln\pars{1 - \tau} \over \tau}\,\dd\tau \\[5mm] & = -\ln\pars{1 - \tau}\ln\pars{z\tau} - \,\mrm{Li}_{2}\pars{\tau} = \bbx{\ds{-\ln\pars{1 - {t \over z}}\ln\pars{t} - \,\mrm{Li}_{2}\pars{t \over z}}}\label{2}\tag{2} \end{align}

With \eqref{2}, \eqref{1} becomes \begin{align} &\int_{0}^{2}{\arctan\pars{x} \over x^{2} + 2x + 2}\,\dd x \\[5mm] = &\ {1 \over 2}\,\Re\left\lbrack% -\ln\pars{1 - {1 + 2\ic \over -\ic}}\ln\pars{1 + 2\ic} - \,\mrm{Li}_{2}\pars{1 + 2\ic \over -\ic} + \,\mrm{Li}_{2}\pars{1 \over -\ic}\right. \\[5mm] &\left.\phantom{=} + \ln\pars{1 - {1 + 2\ic \over 2 - \ic}}\ln\pars{1 + 2\ic} + \,\mrm{Li}_{2}\pars{1 + 2\ic \over 2 - \ic} - \mrm{Li}_{2}\pars{1 \over 2 - \ic}\right] \\[1cm] & = {1 \over 8}\bracks{\pi -4\,\mrm{arccot}\pars{3}}\arctan\pars{2} - {1 \over 8}\,\ln^{2}\pars{5} - \,{1 \over 2}\,\Re\mrm{Li}_{2}\pars{-2 + \ic} + {1 \over 2}\,\Re\mrm{Li}_{2}\pars{\ic} \\[5mm] & \phantom{=}+ {1 \over 2}\,\Re\mrm{Li}_{2}\pars{\ic} - {1 \over 2}\,\Re\mrm{Li}_{2}\pars{2 + \ic \over 5} \\[5mm] & = \bbx{\ds{{1 \over 8}\bracks{\pi -4\,\mrm{arccot}\pars{3}}\arctan\pars{2} - {1 \over 8}\,\ln^{2}\pars{5} -\,{\pi^{2} \over 48} - {1 \over 2}\,\Re\mrm{Li}_{2}\pars{-2 + \ic} - {1 \over 2}\,\Re\mrm{Li}_{2}\pars{2 + \ic \over 5}}} \\[5mm] &\ \approx 0.2567 \end{align}