Tricky integral? $\int_0^{\frac{\pi}{2}}\arccos(\sin x)dx$ My answer doesn't match an online calculator

Yes, your result is correct. For $x\in[-1,1]$, $$\arccos(x)=\frac{\pi}{2}-\arcsin(x).$$ Hence $$\int_0^{\pi/2}\arccos(\sin(x))dx= \int_0^{\pi/2}\left(\frac{\pi}{2}-x\right)dx=\int_0^{\pi/2}tdt=\left[\frac{t^2}{2}\right]_0^{\pi/2}=\frac{\pi^2}{8}.$$

P.S. WA gives the correct result. Moreover $t\to \arccos(t)$ is positive in $[-1,1)$ so the given integral has to be POSITIVE!


It seems you're using integration by parts: \begin{alignat}{2} \int_0^{\pi/2}\arccos\sin x\,dx &=\Bigl[x\arccos\sin x\Bigr]_0^{\pi/2} &&+\int_0^{\pi/2} x\frac{\cos x}{\sqrt{1-\sin^2x}}\,dx \\[4px] &=0&&+\int_0^{\pi/2}x\,dx\\[4px] &=\Bigl[\frac{x^2}{2}\Bigr]_0^{\pi/2}=\frac{\pi^2}{8} \end{alignat}

However, note that it's not quite right to say that the antiderivative is like you write, because in general $$ \frac{\cos x}{\sqrt{1-\sin^2x}}=\frac{\cos x}{\lvert\cos x\rvert} $$

Indeed, if you differentiate $f(x)=\arccos\sin x$, $$ f'(x)=\frac{\cos x}{\lvert\cos x\rvert}= \begin{cases} 1 & -\pi/2+2k\pi < x < \pi/2+2k\pi \\[6px] -1 & \pi/2+2k\pi < x < 3\pi/2+2k\pi \end{cases} $$ Therefore $$ f(x)= \begin{cases} a_{k} + x & -\pi/2+2k\pi \le x \le \pi/2+2k\pi \\[6px] b_{k} - x & \pi/2+2k\pi \le x \le 3\pi/2+2k\pi \end{cases} $$ where the constants are chosen so that the function is continuous.

enter image description here


Essentially the same idea of the other answer, but using the covs $x = t + \pi/2$, $t = -s$ and the evenness of $\cos$: $$ \int_0^{\frac{\pi}2}\arccos(\sin(x))dx = \int_{-\frac{\pi}2}^0\arccos(\sin(t + \pi/2))dt = \int_{-\frac{\pi}2}^0\arccos(\cos(t))dt = $$ $$ \int_0^{\frac{\pi}2}(\arccos(\cos(-s))ds = \int_0^{\frac{\pi}2}(\arccos(\cos(s))ds = \int_0^{\frac{\pi}2}s\,ds= \frac{\pi^2}8. $$