# Need help with $\int_0^\pi\arctan^2\left(\frac{\sin x}{2+\cos x}\right)dx$

Please help me to evaluate this integral: $$\int_0^\pi\arctan^2\left(\frac{\sin x}{2+\cos x}\right)dx$$ Using substitution $x=2\arctan t$ it can be transformed to: $$\int_0^\infty\frac{2}{1+t^2}\arctan^2\left(\frac{2t}{3+t^2}\right)dt$$ Then I tried integration by parts, but without any success...

• Have you tried converting to complex exponential form or using Tangent Half Angle substitution? Dec 29 '15 at 23:49
• A related question : math.stackexchange.com/q/564816/84266 Dec 29 '15 at 23:51
• By the way, if you want, write \mathrm dx to generate $\mathrm dx$ as opposed to $dx$. Same applies to $t$. Apr 25 '18 at 4:57

A Fourier analytic approach. If $x\in(0,\pi)$, $$\begin{eqnarray*}\arctan\left(\frac{\sin x}{2+\cos x}\right) &=& \text{Im}\log(2+e^{ix})\\&=&\text{Im}\sum_{n\geq 1}\frac{(-1)^{n+1}}{n 2^n}\,e^{inx}\\&=&\sum_{n\geq 1}\frac{(-1)^{n+1}}{n 2^n}\,\sin(nx),\end{eqnarray*}$$ hence by Parseval's theorem:

$$\int_{0}^{\pi}\arctan^2\left(\frac{\sin x}{2+\cos x}\right)\,dx=\frac{\pi}{2}\sum_{n\geq 1}\frac{1}{n^2 4^n}=\color{red}{\frac{\pi}{2}\cdot\text{Li}_2\left(\frac{1}{4}\right)}.$$

As a side note, we may notice that $\text{Li}_2\left(\frac{1}{4}\right)$ is quite close to $\frac{1}{4}$.

By applying summation by parts twice we get:

$$\sum_{n\geq 1}\frac{1}{n^2 4^n} = \color{red}{\frac{1}{3}-\frac{1}{12}}+\sum_{n\geq 1}\frac{1}{9\cdot 4^n}\left(\frac{1}{n^2}-\frac{2}{(n+1)^2}+\frac{1}{(n+2)^2}\right)$$ and the last sum is positive but less than $\frac{11}{486}$, since $f:n\mapsto \frac{1}{n^2}-\frac{2}{(n+1)^2}+\frac{1}{(n+2)^2}$ is a positive decreasing function on $\mathbb{Z}^+$.

• Awesome sir..............+1 Dec 30 '15 at 13:58
• Hold on a minute, how does $$\arctan\left(\frac {\sin x}{2+\cos x}\right)=\Im\log(2-e^{ix})$$ Jun 24 '18 at 0:18
• @FrankW.: $$\arctan\left(\frac{\sin x}{2+\cos x}\right) = \text{arg}\left(2+\cos x+i\sin x\right) = \text{Im}\,\log(2\color{red}{+}e^{ix}),$$ there shouldn't be any mistake here, I remember to have checked the outcome numerically. Jun 24 '18 at 4:27
• @JackD'Aurizio Ah, I see. Thank you for the clarification Jun 24 '18 at 17:06

Generalizing Jack's answer. Take $$a\in\Bbb R\setminus\{0\}$$, and write $$J(a)=\int_0^\pi\arctan^2\left(\frac{\sin x}{a+\cos x}\right)dx.$$ From symmetry, we can write $$J(a)=\frac12\int_{-\pi}^\pi\arctan^2\left(\frac{\sin x}{a+\cos x}\right)dx$$ Then $$\arctan\left(\frac{\sin x}{a+\cos x}\right)=\Im\log(a+e^{ix})=\sum_{n\ge1}\frac{(-1)^{n+1}}{na^n}\sin(nx).$$ Then from Parseval's theorem, $$\frac1\pi\int_{-\pi}^\pi\arctan^2\left(\frac{\sin x}{a+\cos x}\right)dx=\sum_{n\ge1}\left(\frac{(-1)^{n+1}}{na^n}\right)^2,$$ so that $$J(a)=\frac\pi2\mathrm{Li}_2\left(\tfrac1{a^2}\right).$$ Unfortunately, your integral, given by $$J(2)=\frac\pi2\mathrm{Li}_2(1/4)$$, does not appear to have a closed form.