# Closed-form of $\int_0^{\pi/2}\frac{\sin^2x\arctan\left(\cos^2x\right)}{\sin^4x+\cos^4x}\,dx$

I have just seen two active posts about integrals of inverse trigonometric function, $\arctan(x)$, here on MSE. So I decide to post this question. This integral comes from a friend of mine (it's not a homework problem) and we have tried to evaluate it but no success so far. I have discussed it in chatroom with @Chris'ssis but she gave me a horrible closed-form without proof. You may have a look here and here. My friend doesn't know the closed-form either. Here is the problem:

$$\int_0^{\pi/2}\frac{\sin^2x\arctan\left(\cos^2x\right)}{\sin^4x+\cos^4x}\,dx$$

Any idea? Any help would be appreciated. Thanks in advance.

• Seriously. What is the point? Commented Dec 2, 2014 at 17:19
• @LTS Doing exercise before calculus final exams Commented Dec 2, 2014 at 17:21
• This is a test prep question? Some advice on that test - skip questions that look like this. They aren't worth it. Do anything you can for this monster at the end. Commented Dec 2, 2014 at 17:23
• @AlfredYerger Yes, I know that. I'm just wondering about it. Commented Dec 2, 2014 at 17:25
• It can be rewritten as $~I~=~\displaystyle\frac12~\int_0^\infty\frac{\sqrt x}{x^2+1}\cot^{-1}(x+1)~dx,~$ or $$I~=~\frac12~\int_0^\infty\frac{\sqrt x}{(x+1)^2+1}\tan^{-1}x~dx~-~\frac14~\int_0^\infty\frac{\tan^{-1}x~\cot^{-1}(x+1)}{\sqrt x}dx.$$ Commented Dec 3, 2014 at 0:33

\newcommand{\al}[1]{\begin{align}#1\end{align}} \renewcommand{\Im}{\operatorname{Im}}Result:

$$I = \frac{\pi \left[2 \pi +\log \left(-4 \sqrt{17+13 \sqrt{2}}+8 \sqrt{2}+13\right)-4 \tan ^{-1}\left(\sqrt{\frac{1}{\sqrt{2}}-\frac{1}{2}}+\frac{1}{\sqrt{2}}+1\right)\right]}{8 \sqrt{2}} \\\approx 0.299397.$$

The evaluation of this integral by hand is not as tedious as I thought at first. It turns out I had already considered this integral last week, in a different form.

First substitute $\tan x = t$, as suggested by FDP in the comments. This gives $$I = \int_0^\infty dt \frac{t^2 \arctan \left( {\frac{1}{1+t^2}}\right)}{1+t^4}.$$ Now observe that $$\al{ \arctan \left( {\frac{1}{1+t^2}} \right) &= \Im \log(i + 1 + t^2) = \Im \left[\log(i+1) + \log\left(1 + \frac{1-i}{2} t^2\right) \right] \\&= \frac{\pi}{4} + \Im \log\left(1 + \frac{1-i}{2} t^2\right). }$$ The integral splits up into a trivial part and a less trivial part. We will now find the latter.

Consider the integral $$J(a) = \int_0^\infty dx \frac{x^2}{1+x^4} \log(1+a x^2).$$ We have $J(0) = 0$, and $$\al{ J'(a) &= \int_0^\infty dx \frac{x^4}{(1+x^4)(1+a x^2)} \\&= \frac{1}{1+a^2} \int_0^\infty dx \left[ \frac{1}{1+ a x^2} + \frac{a x^2 - 1}{1+x^4} \right] \\&= \frac{\pi /2}{1+a^2}\left[\frac{1}{\sqrt a} + \frac{a-1}{\sqrt2}\right]. }$$ This is straightforward to integrate with respect to $a$. (For the first term, just substitute $\sqrt a = u$ and use partial fractions.)

The result is $$J(a) = \frac{\pi}{2 \sqrt 2} \left[ \log \left(a+\sqrt{2} \sqrt{a}+1\right)+2 \arctan\left(\sqrt{2} \sqrt{a}+1\right) \right]$$ After plugging in the limit and tedious simplification (see Appendix to this answer), we obtain $$\Im J\left(\frac{1-i}{2} \right) = -\frac{\pi}{2 \sqrt{2}}\left\{\operatorname{arccoth}\left[\sqrt{7+5 \sqrt{2}}+\sqrt{2}+1\right] + \arctan\left[\frac{1}{41} \left(2 \sqrt{89 \sqrt{2}-119}+2 \sqrt{2}+7\right)\right] \right\}$$

Putting everything together, $$\al{ I &= \frac \pi 4 \int_0^\infty dt \frac{t^2}{1+t^4} + \Im \int_0^\infty dt \frac{t^2 \log\left(1 + \frac{1-i}{2} t^2\right)}{1+t^4} \\&= \frac{\pi^2}{8 \sqrt 2} + \Im J\left(\frac{1-i}{2} \right) \\&= \frac{\pi}{2 \sqrt{2}}\left\{ \frac \pi 4-\operatorname{arccoth}\left[\sqrt{7+5 \sqrt{2}}+\sqrt{2}+1\right] - \arctan\left[\frac{1}{41} \left(2 \sqrt{89 \sqrt{2}-119}+2 \sqrt{2}+7\right)\right] \right\}. }$$

This is numerically equal to the claimed result, which I obtained via a completely different route.

Throughout I have not worried explicitly about choosing the correct branch of $\log$. If this led to any mistakes, please point it out to me.

Appendix Here I sketch how $\Im J\left(\frac{1-i}{2} \right)$ can be calculated. For example, consider the term $$\Im \log\left(1 + \frac{1-i}{2} + \sqrt 2 \sqrt{\frac{1-i}{2}} \right) = \Im \log\left(\frac 3 2 - \frac i 2 + 2^{1/4}\left(\cos \frac \pi 8 - i \sin \frac \pi 8 \right) \right).$$ Using the half-angle formulas for sine and cosine, we can write it as $$\al{ -\arctan \left(\frac{1+ \sqrt[4]{2} \sqrt{2-\sqrt{2}}}{3 + \sqrt[4]{2} \sqrt{2+\sqrt{2}}}\right) &= - \arctan\left(\frac{2 \sqrt{5 \sqrt{2}-7}+1}{7-2 \sqrt{2}}\right) \\&= - \arctan\left[\frac{1}{41} \left(2 \sqrt{89 \sqrt{2}-119}+2 \sqrt{2}+7\right)\right]. }$$ To obtain the first equality, multiply numerator and denominator by a certain factor to get rid of the fourth roots. For the second, multiply by another factor to get rid of all the roots. Of course this simplification is just for aesthetics.

Moral: introduce a parameter in such a way that the integral with respect to the parameter becomes simple, and use Mathematica to simplify the end result.

• OK, I hope it'll be soon. +1 Commented Dec 3, 2014 at 1:51
• integrand can be rewritten as: $\dfrac{\tan^2 x(1+\tan^2 x)\arctan(\cos^2 x)}{1+\tan^4 x}$ and recall $\dfrac{1}{\cos^2 x}=1+\tan^2 x$ and $\arctan x+\arctan\Big(\dfrac{1}{x}\Big)=\dfrac{\pi}{2}$ when $x>0$ Last point, $\dfrac{\sin^2 x}{\cos^4x+\sin^4 x}$ has a not too complex primitive.
– FDP
Commented Dec 5, 2014 at 1:45
• This leads to $\displaystyle \dfrac{\pi^2}{4\sqrt{2}}-\int_0^{+\infty}\dfrac{x^2\arctan(1+x^2)}{1+x^4}dx$
– FDP
Commented Dec 5, 2014 at 3:02
• @Venus I have completed my answer. Commented Dec 5, 2014 at 22:45
• @FDP Thank you for the suggestion, this put me on the right track. Commented Dec 5, 2014 at 22:53