# Computing the integral $\int_{0}^{\pi/2} x\,\arccos\left(x^{2}\right)\,{\rm d}x$

How can the following integral be computed

$$\int_{0}^{\pi/2} x\,\arccos\left(x^{2}\right)\,{\rm d}x\quad{\large ?}$$

-
Did you really mean the arccosine, or perhaps you wanted the secant instead? – J. M. May 8 '11 at 12:48
Yes, I meant arccosine. – Kolya May 8 '11 at 12:55
Substitution works; let $u=x^2,\quad \mathrm du=2x\,\mathrm dx$, and then integrate by parts... – J. M. May 8 '11 at 12:59
@Kolya : But arccosine is defined only on $[-1, 1]$. – Sangchul Lee May 8 '11 at 13:00
@Américo: See here: URL encoding table. Or, here: shorter table. – cardinal May 8 '11 at 14:08

Let $\arccos$ denote the inverse cosine function. We start with the indefinite integral

$$I(x):=\int x\arccos \left( x^{2}\right) \mathrm{d}x.\qquad (1)$$

We integrate by substitution, making the change of variables $x^{2}=\cos \theta$

$$I(\theta )=-\frac{1}{2}\int \theta \cdot \sin \theta \ \mathrm{d}\theta \ ;$$

and integrate by parts (differentiating $\theta$ and integrating $\sin \theta$)

$$I(\theta )=-\frac{1}{2}\left( -\theta \cos \theta +\sqrt{1-\cos ^{2}\theta }\right)+C.$$

Hence

$$I(x)=\frac{1}{2}x^{2}\arccos \left( x^{2}\right) -\frac{1}{2}\sqrt{1-x^{4}}+C.\qquad (2)$$

Consequently

$$\begin{eqnarray*} I &:&=\int_{0}^{\pi /2}x\arccos \left( x^{2}\right) dx=\frac{1}{2}\left[ x^{2}\arccos \left( x^{2}\right) -\sqrt{1-x^{4}}\right] _{0}^{\pi /2} \\ &=&\frac{1}{2}\left[ \frac{\pi ^{2}}{4}\arccos \left( \frac{\pi ^{2}}{4}% \right) -\frac{1}{4}i\sqrt{\pi ^{4}-16}+1\right]. \end{eqnarray*}\qquad (3)$$

Since $\frac{\pi ^{2}}{4}>1$, $\arccos \left( \frac{\pi ^{2}}{4}\right)$ is not real. Now we apply the following relation (with $z$ complex, see Wolfram Math World, Inverse Cosine and my deduction below)

$$\begin{eqnarray*} \arccos z &=&\frac{1}{2}\pi +i\ln \left( iz+\sqrt{1-z^{2}}\right) \\ &=&\frac{1}{2}\pi +i\ln \left[ i\left( z+\sqrt{z^{2}-1}\right) \right]. \end{eqnarray*}\qquad (4)$$

For $z=\frac{\pi ^{2}}{4}$, we get:

$$\arccos \left( \frac{\pi ^{2}}{4}\right) =i\ln \left( \frac{1}{4}\pi ^{2}+\frac{1}{4}\sqrt{\pi ^{4}-16}\right),$$

because

$$\ln \left[ i\left( \frac{\pi ^{2}}{4}+\frac{1}{4}\sqrt{\pi ^{4}-16}\right) \right] =\ln \left( \frac{1}{4}\pi ^{2}+\frac{1}{4}\sqrt{\pi ^{4}-16}\right) +i\frac{\pi }{2}.$$

Thus

$$\begin{eqnarray*} I &=&\frac{1}{2}\left[ \frac{\pi ^{2}}{4}\left( i\ln \left( \frac{1}{4}\pi ^{2}+\frac{1}{4}\sqrt{\pi ^{4}-16}\right) \right) -\frac{1}{4}i\sqrt{\pi ^{4}-16}+1\right] \\ &=&\frac{1}{2}+\frac{1}{2}\left[ \frac{\pi ^{2}}{4} \ln \left( \frac{1% }{4}\pi ^{2}+\frac{1}{4}\sqrt{\pi ^{4}-16}\right) -\frac{1}{4}\sqrt{% \pi ^{4}-16}\right] i \\ &\approx &\frac{1}{2}+0.78743i. \end{eqnarray*}\qquad (5)$$

Remark: Above we have taken the principal value of the complex logarithm $\text{Log } w=\log |w|+i\arg(w)$. However sos440 commented that "the value of the integral depends on a path that we choose". In SWP, with Maple kernel, we got

$$I=\frac{1}{2}-\frac{1}{4}i\pi ^{2}\ln 2+\frac{1}{8}i\pi ^{2}\ln \left( \pi ^{2}+\sqrt{\pi ^{4}-16}\right) -\frac{1}{8}i\sqrt{\pi ^{4}-16},$$

which confirms the above computation and the Wolfram Alpha's $\approx 0.5+0.7874345i$.

Deduction of $(4)$. Since $\frac{1}{2}\pi =-i\ln i$, $(4)$ is equivalent to

$$\arccos z=i\ln \left( z+\sqrt{z^{2}-1}\right)$$

or

$$z=\cos \left[ i\ln \left( z+\sqrt{z^{2}-1}\right) \right].$$

Using the relation

$$\cos \left( i\alpha \right) =\frac{e^{-\alpha }+e^{\alpha }}{2}$$

for $\alpha =\ln \left( z+\sqrt{z^{2}-1}\right)$, we get

$$\begin{eqnarray*} \cos \left[ i\ln \left( z+\sqrt{z^{2}-1}\right) \right] &=&\frac{1}{2}\left[ e^{-\ln \left( z+\sqrt{z^{2}-1}\right) }+e^{\ln \left( z+\sqrt{z^{2}-1}% \right) }\right] \\ &=&\frac{1}{2}\left( \frac{1}{z+\sqrt{z^{2}-1}}+z+\sqrt{z^{2}-1}\right) \\ &=&\frac{1}{2}\left[ \frac{\left( z-\sqrt{z^{2}-1}\right) +\left( z+\sqrt{% z^{2}-1}\right) ^{2}\left( z-\sqrt{z^{2}-1}\right) }{\left( z+\sqrt{z^{2}-1}% \right) \left( z-\sqrt{z^{2}-1}\right) }\right] \\ &=&z, \end{eqnarray*}$$

because

$$\left( z+\sqrt{z^{2}-1}\right) \left( z-\sqrt{z^{2}-1}\right) =1$$

and

$$\frac{1}{2}\left[ \left( z-\sqrt{z^{2}-1}\right) +\left( z+\sqrt{z^{2}-1}% \right) ^{2}\left( z-\sqrt{z^{2}-1}\right) \right] =z.$$

It appears in p. 442 of What is a Closed-Form Number? by Timothy Y. Chowhere too in the form

$$\arccos x=-i\log \left( x+e^{\dfrac{\log \left( x^{2}-1\right) }{2}}\right).$$

-