# Calculating in closed form $\int_0^{\pi/2} \arctan\left(\sin ^3(x)\right) \, dx \ ?$

It's not hard to see that for powers like $1,2$, we have a nice closed form. What can be said about
the cubic version, that is

$$\int_0^{\pi/2} \arctan\left(\sin ^3(x)\right) \, dx \ ?$$

What are your ideas on it? Differentiation under the integral sign? Other ways?

Mathematica 9 says that

$$\int_0^{\pi/2} \arctan\left(\sin ^3(x)\right) \, dx=\frac{2}{3} \, _5F_4\left(\frac{1}{2},\frac{2}{3},1,1,\frac{4}{3};\frac{5}{6},\frac{7}{6},\frac{3}{2},\frac{3}{2};-1\right).$$

• i got the same result $$\frac{2}{3} \, _5F_4\left(\frac{1}{2},\frac{2}{3},1,1,\frac{4}{3}; \frac{5}{6},\frac{7}{6}, \frac{3}{2},\frac{3}{2};-1\right)$$ – Dr. Sonnhard Graubner Sep 4 '15 at 16:27
• So you're asking if that hypergeometric function can be simplified? – Vincenzo Oliva Sep 4 '15 at 16:30
• @VincenzoOliva: I bet so. In fact, the answer is affirmative. That $_5 F_4$ boils down to a combination of $_3 F_2$ functions. – Jack D'Aurizio Sep 4 '15 at 16:33
• @JackD'Aurizio: If I recall correctly, usually the OP looks for solutions avoiding any hypergeometric function, but that's nice nonetheless. – Vincenzo Oliva Sep 4 '15 at 16:36
• Mathematica also gives a huge expression involving polylog as the only non-elementary function. It can probably be simplified a lot... – mickep Sep 4 '15 at 17:28

Following @mickep's idea, we can simplify the integral as follows:

1. Legendre chi function and its integral representation. Define

$$\chi_2 (z) = \frac{\operatorname{Li}_2(z) - \operatorname{Li}_2(-z)}{2} = \sum_{n=0}^{\infty} \frac{z^{2n+1}}{(2n+1)^2}.$$

We can check that (e.g. see my previous posting) the following integral representation holds

$$\int_{0}^{\frac{\pi}{2}} \arctan(z \sin\theta) \, d\theta = 2\chi_2\Big( \tfrac{\sqrt{1+z^2}-1}{z}\Big). \tag{z \notin \pm i(1,\infty)}$$

Moreover, we have the following two identities, which can be easily checked by differentiating both sides.

\begin{align*} \chi_2(z) + \chi_2(\tfrac{1-z}{1+z}) &= \tfrac{1}{8}\pi^2 - \tfrac{1}{2}\log z \log(\tfrac{1-z}{1+z}), \\ \chi_2(z) + \chi_2(\tfrac{1}{z}) &= \tfrac{1}{4}\pi^2 + \tfrac{i}{2} \pi (\operatorname{sign}\Im z) \log z. \end{align*}

2. Decomposition of arctangent. Using @mickep's idea, if we let $\omega = e^{2\pi i/3}$, then we have

\begin{align*} \arctan(z^3) &= \frac{\log(1+iz^3) - \log(1-iz^3)}{2} \\ &= -\sum_{k=0}^{2} \frac{\log(1+i\omega^k z) - \log(1-i\omega^k z)}{2} \\ &= -\sum_{k=0}^{2} \arctan(\omega^k z). \end{align*}

3. Simplification of the integral using $\chi_2$. Combining two results, for $|z| \leq 1$ we have

\begin{align*} \int_{0}^{\frac{\pi}{2}} \arctan(z^3 \sin^3\theta) \, d\theta &= -2 \sum_{k=0}^{2} \chi_2\Big( \tfrac{\sqrt{1+\omega^{2k}z^k}-1}{\omega^k z}\Big). \end{align*}

Now let $\alpha = \frac{-1+i}{2}(\sqrt{3} - 1)$. Then it is straightforward to check that

$$\int_{0}^{\frac{\pi}{2}} \arctan(\sin^3\theta) \, d\theta = -2 (\chi_2(\sqrt{2} - 1) + \chi_2(\alpha) + \chi_2(\bar{\alpha}))$$

and that $\frac{1-\alpha}{1+\alpha} = -\bar{\alpha}^{-1}$. Using the identities invloving $\chi_2$, we find that

$$\chi_2(\alpha) + \chi_2(\bar{\alpha}) = -\tfrac{3}{32} \pi^2 + \tfrac{1}{8}\log^2(2+\sqrt{3}).$$

Combining altogether, we have

$$\int_{0}^{\frac{\pi}{2}} \arctan(\sin^3\theta) \, d\theta = \tfrac{1}{16}\pi^2 + \tfrac{1}{2}\log^2(1+\sqrt{2}) - \tfrac{1}{4}\log^2(2+\sqrt{3}).$$

Addendum: a possible way of generalization. For odd $n = 2m+1$ and $\omega = e^{2\pi i/n}$, we may write

$$\int_{0}^{\pi/2} \arctan(\sin^n t) \, dt = (-1)^m \sum_{k=0}^{n-1} \int_{0}^{\pi/2} \arctan(\omega^k \sin t) \, dt.$$

Pairing up the conjugate terms and simplifying, this is written as the following form

$$= (-1)^m 2 \chi_2(\sqrt{2}-1) + (-1)^m 2 \sum_{k=1}^{m} \epsilon_k (\chi_2(\alpha_k) + \chi_2(\bar{\alpha}_k)),$$

where $\epsilon_k \in \{-1, 1\}$ is appropriately chosen so that $\alpha_k$ is of the form

$$\alpha_k = x_k + iy_k \quad \text{with } y_k = \sqrt{1+\smash[b]{2x_k - x_k^2}}.$$

Indeed, $(\epsilon_k)$ and $\alpha_k$ are chosen as follows:

$$\epsilon_k = \begin{cases} 1 & \text{if } \Re(\omega^k) < 0, \\ -1 & \text{if } \Re(\omega^k) > 0, \end{cases} \quad\text{and} \quad \alpha_k = \begin{cases} \omega^{-k}(\sqrt{1+\omega^{2k}}-1) & \text{if } \Re(\omega^k) < 0, \\ -\omega^{k}(\sqrt{1+\omega^{-2k}}-1) & \text{if } \Re(\omega^k) > 0, \end{cases}$$

(In other words, we choose the sign $\epsilon_k$ so that $\epsilon_k \omega^k$ has always negative real parts.) Using the same idea as before, we can simplify

$$\chi_2(\alpha_k) + \chi_2(\bar{\alpha}_k) = -\tfrac{1}{8}\pi^2 + \tfrac{1}{2}\left(\tfrac{\pi}{2} + \arctan\Big(\tfrac{x_k}{y_k}\Big) \right)^2 + \tfrac{1}{8}\log^2(1+2x_k).$$

For example, with aid of Mathematica, we can check that

\begin{align*} \int_{0}^{\frac{\pi}{2}} \arctan(\sin^5 x) \, dx &= \tfrac{1}{8}\pi^2 - \tfrac{1}{2}\log^2\left(1+\sqrt{2}\right) \\ &\quad - \tfrac{1}{4} \log^2 \left(\tfrac{1}{2} \left(1+\sqrt{5}-\sqrt{2 (1+\smash[b]{\sqrt{5}})}\right)\right) \\ &\quad + \tfrac{1}{4} \log^2 \left(\tfrac{1}{2} \left(3+\sqrt{5}-\sqrt{10+6 \smash[b]{\sqrt{5}}}\right)\right) \\ &\quad +\left(\pi -\tan^{-1}\left(\sqrt{2+\smash[b]{\sqrt{5}}}\right) - \cot^{-1}(5^{1/4}) \right) \\ &\qquad \times \left(\cot^{-1}(5^{1/4}) - \tan^{-1}\left(\sqrt{2+\smash[b]{\sqrt{5}}}\right)\right) \end{align*}

• Ha! That is very neat. I've verified that it coincides with numerics... – mickep Sep 8 '15 at 18:31
• Very nice, indeed! :-) – user 1591719 Sep 8 '15 at 18:51
• "Easily"!!!!!!!!!!! – marty cohen Sep 8 '15 at 18:58

Just exploiting the arctangent Taylor series,

$$\begin{eqnarray*} \int_{0}^{\frac{\pi}{2}} \arctan(\sin^3 x)\,dx &=& \sum_{m\geq 0}\frac{(-1)^m}{2m+1}\int_{0}^{\frac{\pi}{2}}\sin^{6m+3}(x)\,dx\\ &=& \frac{3\sqrt{\pi}}{4}\sum_{m\geq 0}\frac{(-1)^m\,\Gamma\left(3m+2\right)}{(3m+\frac{3}{2})\Gamma\left(3m+\frac{5}{2}\right)}\end{eqnarray*}$$ so, at least in principle, we may compute the RHS by applying a discrete Fourier transform to the power series: $$\sum_{m\geq 0}\frac{x^m\, \Gamma(m+2)}{\left(m+\frac{3}{2}\right)\Gamma\left(m+\frac{5}{2}\right)}$$ that is just a $\phantom{}_{3} F_2$ hypergeometric function, namely $\frac{8}{9\sqrt{\pi}}\;\phantom{}_3 F_2\!\left(1,\frac{3}{2},2;\frac{5}{2},\frac{5}{2};x\right).$

• Nice solution, for sure ! – Claude Leibovici Sep 4 '15 at 16:36
• you have a free variable in the last line – DanielWainfleet Sep 4 '15 at 17:16
• @user254665: there is nothing wrong in that. The power series depends on $x$. – Jack D'Aurizio Sep 4 '15 at 17:19

This will be too long for a comment, but I am not able to give the solution, just a short form of the answer. I'll tell you how to get there (with your favorite CAS).

First, note that (using $x\mapsto \pi/2-x$) $$I=\int_0^{\pi/2}\arctan(\sin^3x)\,dx=\int_0^{\pi/2}\arctan(\cos^3x)\,dx$$ Thus, integrating by parts, \begin{aligned} I&=\frac{1}{2}\int_0^{\pi/2} 1\bigl(\arctan(\sin^3x)+\arctan(\cos^3x)\bigr)\,dx\\ &=\frac{1}{2}\Bigl[x\bigl(\arctan(\sin^3x)+\arctan(\cos^3x)\bigr)\Bigr]_0^{\pi/2}\\ &\quad -\frac{1}{2}\int_0^{\pi/2}x\Bigl(\frac{3\sin^2x\cos x}{1+\sin^6x}-\frac{3\cos^2x\sin x}{1+\cos^6 x}\Bigr)\,dx \end{aligned} The out-integrated part is $\pi^2/8$ or something like that, and the other part does the CAS take care of, and the result is \begin{aligned} I&=\frac{1}{2}\text{Li}_2(3-2\sqrt{2})-2\text{Li}_2(\sqrt{2}-1)-\text{Li}_2\bigl(-(\sqrt{3}-1)(1+i)/2\bigr)-\text{Li}_2\bigl(-(\sqrt{3}-1)(1-i)/2\bigr)\\ &\qquad+\text{Li}_2\bigl((\sqrt{3}-1)(1-i)/2\bigr)+\text{Li}_2\bigl((\sqrt{3}-1)(1+i)/2\bigr)\\ \end{aligned} Numerically, this evaluates to approximately $0.571665$.

I'm not too familiar with polylogarithms, so maybe someone else would like ty try to simplify this expression further.

• This looks nice (+1). My intuition says we can get even a nicer form. – user 1591719 Sep 5 '15 at 9:38
• @Chris'ssistheartist Have you considered writing $\arctan x=\Im \ln(1+i x)$ ? Then we just factorize $1+ix^3=i(x+i)(x+i\omega)(x+i\omega^2)$ (whence emerge the $\sqrt{3}$ terms) , which leads to $$\int_0^{\frac{\pi}{2}}\arctan (\sin^3 x)dx=\int_0^{\frac{\pi}{2}}\arctan(\cos^3 x)dx\\=\frac{\pi^2}{4}+\Im \int_0^{\frac{\pi}{2}} \left(\ln(i+\cos x)+\ln(i\omega+\cos x)+\ln(i\omega^2+\cos x)\right)dx$$. I think we can calculate these integrals using the results from this answer by Vladimir, but I haven't sorted it out fully yet. – nospoon Sep 5 '15 at 10:07
• Anyway, this approach can be easily generalized. – nospoon Sep 5 '15 at 10:11
• @nospoon oh, good idea. – user 1591719 Sep 5 '15 at 10:37