When I showed to my brother how I proved \begin{equation} \int_{0}^{\!\Large \frac{\pi}{2}} \ln \left(x^{2} + \ln^2\cos x\right) \, \mathrm{d}x=\pi\ln\ln2 \end{equation} using the following theorem by Mr. Olivier Oloa \begin{equation}{\large\int_{0}^{\!\Large \frac{\pi}{2}}} \frac{\cos \left( s \arctan \left(-\frac{x}{\ln \cos x}\right)\right)}{(x^2+\ln^2\! \cos x)^{\Large\frac{s}{2}}}\, \mathrm{d}x = \frac{\pi}{2}\frac{1}{\ln^{\Large s}\!2}\qquad,\;\text{for }-1<s<1.\end{equation} He showed me the following interesting formula

\begin{equation} \int_{0}^{\!\Large \frac{\pi}{2}} x\csc^2(x)\arctan \left(\alpha \tan x\right)\, \mathrm{d}x =\frac{\pi}{2}\, \ln\left(\left[1 + \alpha\right]^{1 + \alpha} \over \alpha^\alpha\right)\,,\qquad \mbox{for}\ \alpha > 0\tag{✪}. \end{equation}

I tried several values of $\alpha$ to check its validity (since he always messes around with me) and the numerical results match the output of Mathematica $9$. The problem is how to prove this formula since he didn't tell me (as always). I tried Feynman's integration trick and I arrived to the following result: \begin{equation}\partial_\alpha\int_{0}^{\!\Large \frac{\pi}{2}} x\csc^2(x)\arctan \left(\alpha \tan x\right)\, \mathrm{d}x = \int_{0}^{\!\Large \frac{\pi}{2}} \frac{x\cot x}{\cos^2x+\alpha^2 \sin^2 x}\, \mathrm{d}x\end{equation} but I am having difficulty to crack the very last integral. Could anyone here please help me to prove the formula $(✪)$ preferably with elementary ways (high school methods)? Any help would be greatly appreciated. Thank you.

  • $\begingroup$ Just correct your work and finish the integral alone. It's easy. $\endgroup$ Oct 16, 2014 at 14:11
  • $\begingroup$ @Chris'ssis Thanks. I'll try $\endgroup$ Oct 16, 2014 at 14:22
  • $\begingroup$ Mathematica can find a closed form for the indefinite integral corresponding to $(✪)$ in terms of elementary functions and dilogarithms. Then you can prove its correctness by a direct differentiation. $\endgroup$ Oct 16, 2014 at 16:41
  • $\begingroup$ @VladimirReshetnikov and could we have some nice dilogarithm special value identitity via this approach? $\endgroup$
    – user153012
    Oct 16, 2014 at 18:36
  • 1
    $\begingroup$ @user153012 I'm afraid, no. Dilogarithms disappear when you take limits of the antiderivative at lower and upper bounds $0, \pi/2$. $\endgroup$ Oct 16, 2014 at 18:59

3 Answers 3


This approach is similar to Ron Gordon's answer. We introduce a new variable $\beta$ before differentiating.

By substitution $\tan x=u$, $$\int_{0}^{\!\Large \frac{\pi}{2}} x\csc^2(x)\arctan \left(\! \alpha \tan x\right)\, \mathrm{d}x=\int_{0}^{\infty}\frac{\tan^{-1}u\tan^{-1}\alpha u}{u^2}\,\mathrm{d}u$$

We will prove $$\int_0^{\infty}\frac{\tan^{-1}\alpha u\tan^{-1}\beta u}{u^2}\,\mathrm{d}u=\frac\pi2\log\left(\frac{(\alpha+\beta)^{\alpha+\beta}}{\alpha^\alpha\beta^\beta}\right)\tag{1}$$

Differentiation gives \begin{align}\partial_\alpha\partial_\beta\int_0^{\infty}\frac{\tan^{-1}\alpha u\tan^{-1}\beta u}{u^2}\,\mathrm{d}u&=\int_{0}^{\infty}\frac{\mathrm{d}u}{(1+\alpha^2 u^2)(1+\beta^2 u^2)}\\&=\frac1{\alpha^2-\beta^2}\int_{0}^{\infty}\frac{\alpha^2}{1+\alpha^2u^2}-\frac{\beta^2}{1+\beta^2u^2}\,\mathrm{d}u\\&=\frac1{\alpha^2-\beta^2}\int_{0}^{\infty}\frac{\alpha}{1+u^2}-\frac{\beta}{1+u^2}\,\mathrm{d}u\\&=\frac\pi{2(\alpha+\beta)}\end{align} for $\alpha\ne\beta$. The case $\alpha=\beta$ can be proved by letting $\alpha\to\beta$. Then $$\partial_\beta\int_0^{\infty}\frac{\tan^{-1}\alpha u\tan^{-1}\beta u}{u^2}\,\mathrm{d}u=\frac{\pi}{2}(\log(\alpha+\beta)-C_1(\beta))$$ If $\alpha\to0$ we have $0=\frac\pi2(\log\beta-C_1(\beta))$ so $C_1(\beta)=\log\beta$. Integrating by $\beta$,$$\int_0^{\infty}\frac{\tan^{-1}\alpha u\tan^{-1}\beta u}{u^2}\,\mathrm{d}u=\frac{\pi}{2}((\alpha+\beta)\log(\alpha+\beta)-\beta\log\beta-C_2(\alpha))$$ Let $\beta\to0$ and we find $C_2(\alpha)=\alpha\log\alpha$. Thus $(1)$ is proven and putting $\beta=1$ gives the conclusion $$\int_{0}^{\!\Large \frac{\pi}{2}} x\csc^2(x)\arctan \left(\! \alpha \tan x\right)\, \mathrm{d}x=\frac\pi2\log\left(\frac{(\alpha+1)^{\alpha+1}}{\alpha^\alpha}\right)$$

  • $\begingroup$ Nice answer, but in what way is my answer not as elementary as yours? $\endgroup$
    – Ron Gordon
    Oct 17, 2014 at 10:55
  • 1
    $\begingroup$ @RonGordon The last part where you decide $C$. I'm not aware of any elementary way of computing $\displaystyle\int_0^{\pi/2}\log\sin x dx$. I know three ways(fourier expansion of $\log\sin x$, differentiating the beta function, cauchy's integral formula) but none of them are 'high school methods'. Is there actually an elementary solution that I missed? $\endgroup$
    – karvens
    Oct 17, 2014 at 12:20
  • 1
    $\begingroup$ To me, 'high school methods' term means without using residue method. If you're looking the easy way to evaluate $C$, you may refer to: math.stackexchange.com/q/690644/133248. It's obviously a high school method in general meaning (ô‿ô) CC: Mr. @RonGordon $\endgroup$ Oct 17, 2014 at 13:20
  • $\begingroup$ Thanks for the link! So it was easier than I thought. @RonGordon Sorry for the confusion I've caused... $\endgroup$
    – karvens
    Oct 17, 2014 at 13:26
  • $\begingroup$ @karvens: I disagree. See the addendum to my answer below. The simple technique I employ is hardly original and is used elsewhere in this site. (I see Anastasiya noted this as well.) $\endgroup$
    – Ron Gordon
    Oct 17, 2014 at 19:07

Note that $$ \begin{align} 1-(1-\alpha^2)\sin^2(x) &=1+(1-\alpha^2)\frac{e^{2ix}-2+e^{-2ix}}{4}\\ &=\frac{1-\alpha^2}4\left[e^{2ix}+2\frac{1+\alpha^2}{1-\alpha^2}+e^{-2ix}\right]\\ &=\frac{1-\alpha^2}4e^{-2ix}\left[e^{2ix}+\frac{1+\alpha}{1-\alpha}\right]\left[e^{2ix}+\frac{1-\alpha}{1+\alpha}\right]\\ &=\frac{(1+\alpha)^2}4\left[1+\frac{1-\alpha}{1+\alpha}e^{2ix}\right]\left[1+\frac{1-\alpha}{1+\alpha}e^{-2ix}\right]\tag{1} \end{align} $$ Taking $\frac12$ of the log of $(1)$ yields $$ \frac12\log\left(1-(1-\alpha^2)\sin^2(x)\right) =\log\left(\frac{\alpha+1}2\right)-\sum_{n=1}^\infty\left(\frac{\alpha-1}{\alpha+1}\right)^n\frac{\cos(2nx)}n\tag{2} $$ Subtracting $\log(\alpha)$ from $(2)$ and sending $\alpha\to\infty$ gives $$ \log(\sin(x))=-\log(2)-\sum_{n=1}^\infty\frac{\cos(2nx)}n\tag{3} $$ Now, we are ready to tackle the integral given. Taking the derivative, using partial fractions, integrating by parts, then applying $(2)$ and $(3)$, yields $$ \begin{align} &\frac{\mathrm{d}}{\mathrm{d}\alpha}\int_0^{\pi/2}x\csc^2(x)\arctan(\alpha\tan(x))\,\mathrm{d}x\\ &=\int_0^{\pi/2}\frac{x}{\sin(x)}\frac{1}{1-(1-\alpha^2)\sin^2(x)}\,\mathrm{d}\sin(x)\tag{4a}\\ &=\int_0^{\pi/2}\left[\frac1{\sin(x)}-\frac{\raise{5mu}{\frac12}\sqrt{1-\alpha^2}}{1+\sqrt{1-\alpha^2}\sin(x)}+\frac{\raise{5mu}{\frac12}\sqrt{1-\alpha^2}}{1-\sqrt{1-\alpha^2}\sin(x)}\right]x\,\mathrm{d}\sin(x)\tag{4b}\\ &=\int_0^{\pi/2}x\,\mathrm{d}\left[\log(\sin(x))-\tfrac12\log\left(1-(1-\alpha^2)\sin^2(x)\right)\right]\tag{4c}\\ &=-\frac\pi2\log(\alpha)-\int_0^{\pi/2}\left[\log(\sin(x))-\tfrac12\log\left(1-(1-\alpha^2)\sin^2(x)\right)\right]\mathrm{d}x\tag{4d}\\ &=-\frac\pi2\log(\alpha)+\frac\pi2\log(2)+\frac\pi2\log\left(\frac{\alpha+1}2\right)\tag{4e}\\ &=\frac\pi2\log\left(\frac{\alpha+1}\alpha\right)\tag{4} \end{align} $$ Explanation:
$\mathrm{(4a)}$: differentiate with respect to $\alpha$
$\mathrm{(4b)}$: partial fractions
$\mathrm{(4c)}$: prepare to integrate by parts
$\mathrm{(4d)}$: integrate by parts
$\mathrm{(4e)}$: apply $(2)$ and $(3)$ noting that $\int_0^{\pi/2}\frac{\cos(2nx)}{n}\,\mathrm{d}x=\left[\frac{\sin(2nx)}{2n^2}\right]_0^{\pi/2}=0$

Integrating $(4)$ gives $$ \int_0^{\pi/2}x\csc^2(x)\arctan(\alpha\tan(x))\,\mathrm{d}x =\frac\pi2\log\left(\frac{(\alpha+1)^{\alpha+1}}{\alpha^\alpha}\right)\tag{5} $$

  • $\begingroup$ Nice answer. Very clever expansion. Thank you for your answer, +1 of course ≥Ö‿Ö≤ $\endgroup$ Oct 17, 2014 at 13:22

This integral may be done by observing the following: Let

$$I(\alpha) = \int_0^{\pi/2} dx \, x\, \csc^2{x} \, \arctan{\left ( \alpha \tan{x}\right)} $$

Then $I(\alpha)$ satisfies the differential equation

$$\begin{align}\frac{d}{d\alpha}\left ( \frac{I(\alpha)}{\alpha} \right ) &= -\frac1{\alpha^2} \int_0^{\pi/2} dx \frac{\arctan{\left (\alpha \tan{x} \right )}}{\tan{x}} \\ &= -\frac1{\alpha^2} \int_0^{\infty} du \frac{\arctan{\alpha u}}{u (1+u^2)} \\ &= -\frac1{\alpha^2} J(\alpha)\end{align}$$

One may prove this by integrating the original integral by parts on the one hand, and differentiating with respect to $\alpha$ on the other.

The integral on the RHS may be evaluated by, again, differentiating with respect to $\alpha$ as follows:

$$\begin{align} J'(\alpha) &= \int_0^{\infty} \frac{du}{(1+u^2) (1+\alpha^2 u^2)}\end{align}$$

This integral is easily done using partial fractions; the result is

$$J'(\alpha) = \frac{\pi}{2} \frac1{1+\alpha}$$

which implies that

$$J(\alpha) = \frac{\pi}{2} \log{(1+\alpha)}$$

because $J(0)=0$. We are now left to solve

$$\frac{d}{d\alpha}\left ( \frac{I(\alpha)}{\alpha} \right ) = -\frac{\pi}{2} \frac{\log{(1+\alpha)}}{\alpha^2}$$

This reduces to a simple integration by parts, the result of which is

$$I(\alpha) = \frac{\pi}{2} \left [(1+\alpha) \log{(1+\alpha)} - \alpha \log{\alpha} \right ] + C \alpha $$

Now we just need to show that $C=0$. This is equivalent to showing that

$$\int_0^{\pi/2} dx \frac{x^2}{\sin^2{x}} = \pi \log{2} $$

which is indeed true, as the integral may be shown, by integrating by parts, to be

$$-2 \int_0^{\pi/2} dx \log{\sin{x}} = -\int_0^{\pi} dx \log{\sin{x}}$$

which is indeed $\pi \log{2}$.


This last integral may in fact be done by elementary methods. For example, consider that

$$\begin{align}\int_0^{\pi} dx \log{\sin{x}} &= 2 \int_0^{\pi/2} dx \, \log{\sin{2 x}} \\ &= 2 \int_0^{\pi/2} dx \, \log{(2 \sin{x} \cos{x})} \\ &= \pi \log{2} + 2 \int_0^{\pi/2} dx \, \log{\sin{x}} + 2 \int_0^{\pi/2} dx \, \log{\cos{x}} \\&= \pi \log{2} + 4 \int_0^{\pi/2} dx \, \log{\sin{x}} \\&= \pi \log{2} + 2 \int_0^{\pi} dx \, \log{\sin{x}}\end{align}$$

A simple rearrangement proves the result.

  • $\begingroup$ @Anastasiya-Romanova herself is already smart so his brother obviously smarter than her. No doubt. +1 for your solution, excellent work as always! $\endgroup$
    – Venus
    Oct 16, 2014 at 18:13
  • $\begingroup$ Thanks for the answer Mr. Ron G, +1. I tried to make my own answer but right now I'm in school & the class is going to start. @Venus I take that as a compliment although ... Nevermind, forget it $\endgroup$ Oct 17, 2014 at 0:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .