# Finding $\int_0^{\frac{\pi}{2}}\arctan\left(\sin x\right)dx$

$$\int_0^{\frac{\pi}{2}}\arctan\left(\sin x\right)dx$$

I try to solve it, but failed. Who can help me to find it?

I encountered this integral when trying to solve $\displaystyle{\int_0^\pi\frac{x\cos(x)}{1+\sin^2(x)}\,dx}$.

• Wolfram Alpha chokes on this, and its simplification of $\text{arctan}(\sin x)$ doesn't help much either. – Rory Daulton Dec 2 '14 at 12:31
• @RoryDaulton Mathematica says $$\frac{1}{8} \left(\pi ^2-4 \sinh ^{-1}(1)^2\right)$$ – Aditya Hase Dec 2 '14 at 12:33
• To the OP, where did you encounter this problem? E.g. math contest, calculus text or other? It's not idle curiosity- knowing the source often gives an indication of the expected level of technical knowledge required to solve it. – Deepak Dec 2 '14 at 12:39
• I encounter it when trying to solve a integral"Integrate[x*Cos[x]/(1+(Sin[x])^2),{x,0,Pi}]@Deepak" – gcy-rolle Dec 2 '14 at 12:57
• math.stackexchange.com/questions/855517/… – Pranav Arora Dec 2 '14 at 15:48

Actually I didn't post my answer as I was unable to continue it where I left but after Pranav provided link I'm posting it

$$\sin x=u\iff \frac{\,\mathrm du}{\sqrt{1-u^2}}=\,\mathrm dx$$

$$\int_0^{{\pi/2}}\arctan\left(\sin x\right)\,\mathrm dx=\int_0^{1}\frac{\arctan(u)}{\sqrt{1-u^2}}\,\mathrm du$$

Now consider parametric integral $$I(\alpha)=\int_0^{1}\frac{\arctan(\alpha t)}{\sqrt{1-t^2}}\,\mathrm dt$$

Then \begin{align} I'(\alpha)&= \int_{0}^{1} \frac{t}{(1+\alpha^{2}t^{2})\sqrt{1-t^{2}}} \,\mathrm dt\\ &= \frac{1}{\alpha \sqrt{1+\alpha^{2}}} \text{artanh} \left[ \frac{\alpha}{\sqrt{1+\alpha^{2}}} \right]\\ &= \frac{1}{\alpha \sqrt{1+\alpha^{2}}} \text{arsinh}(\alpha) .\end{align} Now for further process see this

• $\text{arcsinh}'a=\dfrac1{\sqrt{1+a^2}}$ for the same reason that $\arcsin'x=\dfrac1{\sqrt{1-x^2}}$. – Lucian Dec 2 '14 at 16:24
• Why repeat RV's answer? – M.N.C.E. Dec 2 '14 at 16:30
• Awesome!Your answer make me clearly understand. Thank you very much!@Integrator – gcy-rolle Dec 3 '14 at 1:52
• Your answer shows how to get from the current question to the supposed "original". I don't think this question should be closed since your part of the answer is not covered in the "original" question. – robjohn Dec 5 '14 at 0:19
• I have added part of my answer here. It offers an alternate approach to evaluating $\int_0^1\frac1{\alpha\sqrt{1+\alpha^2}}\mathrm{arcsinh}(\alpha) \,\mathrm{d}\alpha$. – robjohn Dec 5 '14 at 13:30

Integrating by parts, we get $$\int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x =\frac{2k}{2k+1}\int_0^{\pi/2}\sin^{2k-1}(x)\,\mathrm{d}x\tag{1}$$ Therefore, by induction, we have $$\int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x =\frac{2^k\,k!}{(2k+1)!!}\tag{2}$$ Thus, \begin{align} \int_0^{\pi/2}\arctan(\sin(x))\,\mathrm{d}x &=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x\tag{3a}\\ &=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\frac{2^k\,k!}{(2k+1)!!}\tag{3b}\\ &=\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^2}\frac{4^k}{\binom{2k}{k}}\tag{3c} \end{align} Explanation:
$\text{(3a)}$: use the series for $\arctan(x)$
$\text{(3b)}$: use $(2)$
$\text{(3c)}$: rewrite $\text{(3b)}$ using central binomial coefficients

In this answer, it is shown that $$\sum_{n=0}^\infty\frac{(-4)^n}{(2n+1)^2\binom{2n}{n}} =\frac{\pi^2}8-\frac12\mathrm{arcsinh}^2(1)\tag{4}$$ Therefore, combining $(3)$ and $(4)$, we have $$\int_0^{\pi/2}\arctan(\sin(x))\,\mathrm{d}x =\frac{\pi^2}8-\frac12\mathrm{arcsinh}^2(1)\tag{5}$$

• Excellent! Thank you very much@robjohn. – gcy-rolle Dec 7 '14 at 12:47

Using the integral definition of the arctangent function, we may write $$\arctan{\left(\sin{x}\right)}=\int_{0}^{1}\mathrm{d}y\,\frac{\sin{x}}{1+y^2\sin^2{x}},$$

thus, transforming the integral into a double integral. Changing the order of integration, we find:

\begin{align} \mathcal{I} &=\int_{0}^{\frac{\pi}{2}}\arctan{\left(\sin{x}\right)}\,\mathrm{d}x\\ &=\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\int_{0}^{1}\mathrm{d}y\,\frac{\sin{x}}{1+y^2\sin^2{x}}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\,\frac{\sin{x}}{1+y^2\sin^2{x}}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\,\frac{\sin{x}}{1+y^2\left(1-\cos^2{x}\right)}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{1}\frac{\mathrm{d}t}{1+y^2-y^2t^2}\\ &=\int_{0}^{1}\mathrm{d}y\,\frac{\tanh^{-1}{\left(\frac{y}{\sqrt{1+y^2}}\right)}}{y\sqrt{1+y^2}}\\ &=\int_{0}^{1}\mathrm{d}y\,\frac{\sinh^{-1}{\left(y\right)}}{y\sqrt{1+y^2}}\\ &=\int_{0}^{\sinh^{-1}{(1)}}\mathrm{d}u\,\frac{u}{\sinh{(u)}}\\ &=-\sinh^{-1}{(1)}^2-\int_{0}^{\sinh^{-1}{(1)}}\mathrm{d}u\,\ln{\left(\tanh{\frac{u}{2}}\right)}\\ &=-\sinh^{-1}{(1)}^2-2\int_{0}^{\frac{1}{1+\sqrt{2}}}\mathrm{d}w\,\frac{\ln{\left(w\right)}}{1-w^2}.\\ \end{align}

At this point, the resolution of the last integral in terms of dilogarithms is a straightforward matter.

• This is Excellent! I also enjoyed the previous treatment! – Math-fun Dec 2 '14 at 20:26
• what a skillful answer!Thank you@David H – gcy-rolle Dec 3 '14 at 1:57

Hint: Letting $t=\sin x$, the integral becomes $F(1)$, where $F(a)=\displaystyle\int_0^1\frac{\arctan(at)}{\sqrt{1-t^2}}dx$. Evaluate $F'(a)$.

• thank you,@Lucian. Your answer is same with @integrator.However, all of you solve my question,thank you! – gcy-rolle Dec 3 '14 at 1:59