How do you compute $\int_{0}^{\pi}\sqrt{\sin^{-1}(\cos(x))\tan^{-1}(\cot(x))}dx$ I tried using the identity of $\frac{\pi}{2}-x$ and doing substitutions like $u=\cos(x)$, but I keep ending up with $0$.
Is there a concept I'm missing?
 A: If you graph this function, you get this. Use the area of a triangle formula to get your answer $\frac{\pi^2}{4}$
A: We must be careful with the domains.

*

*$\cos^{-1}(\cos x)=x$ ONLY when $x\in[0,\pi]$.

*$\cot^{-1}(\cot x)=x$ ONLY when $x\in[0,\pi]$.

So basically you have gotten lucky with the domain, as you are about to see.
$$\sin^{-1}(\cos x)=\frac{\pi}{2}-\cos^{-1}(\cos x)= \frac{\pi}{2}- x$$
$$\tan^{-1}(\cot x)=\frac{\pi}{2}-\cot^{-1}(\cot x)= \frac{\pi}{2}- x,$$ for $x\in[0,\pi]$, which is precisely the bounds of the integral. (If the bounds were outside $[0,\pi]$, then you might have had some problems.)
So you get the integral as $$\int_0^\pi\sqrt{\left(\frac{\pi}{2}-x\right)^2}dx=\int_0^\pi\bigg|\frac{\pi}{2}-x\bigg|dx$$ which, as user @KamalSaleh points out, is the area of TWO congruent isosceles right triangles, and is equal to $\dfrac{\pi^2}{4}$.

P.S. Here are the graphs of $\cos^{-1}(\cos x)$ and $\cot^{-1}(\cot x)$ respectively for better understanding. 

A: $$\int_{0}^{\pi}\sqrt{\sin^{-1}(\cos(x))\tan^{-1}(\cot(x))}dx$$
$$= \int_{0}^{\pi} \sqrt{\left(\frac{\pi}{2} - x\right)^2} dx$$
$$= \int_{0}^{\pi} \left|\frac{\pi}{2} - x\right| dx$$
$$= \int_{0}^{\pi/2} \left(\frac{\pi}{2} - x\right) ~dx + \int_{\pi/2}^\pi \left(x-\frac{\pi}{2}\right) ~dx$$
$$= \left[\frac{\pi}{2}x - \frac{1}{2}x^2\right]_0^{\pi/2} + \left[\frac{1}{2}x^2 - \frac{\pi}{2}x \right]_{\pi/2}^{\pi}$$
$$=\left(\frac{\pi^2}{4} - \frac{\pi^2}{8}\right) + \left(\frac{\pi^2}{2} - \frac{\pi^2}{2}\right) - \left( \frac{\pi^2}{8} - \frac{\pi^2}{4} \right)$$
$$=\frac{\pi^2}{4}$$
If you're getting 0, you may have forgotten the absolute value in going from $\sqrt{\left(\frac{\pi}{2} - x\right)^2}$ to $\left|\frac{\pi}{2} - x\right|$.
