# Evaluate $\int\sin^{-1}(\cos x)dx$.

I solved it like this using the integration by parts but the answer is $\displaystyle\frac{\pi x}{2} - \frac {x^2}{2}$.

How did $\sin^{-1}(\cos x)$ get replaced by $\pi$?

Attempt: \begin{align} \int\sin^{-1}(\cos x)dx &=\sin^{-1}(\cos x) \int1dx-\int\left(\int1dx\cdot\frac {dy}{dx}\sin^{-1}{\cos x}\right)dx\\ &=x\sin^{-1}(\cos x)-\frac {x^2}{2} \end{align}

• Use that $y=\sin^{-1}(\cos x)$ implis $\sin y=\cos x$, so (for suitable range restrictions) $y=\frac \pi2-x$. – Hagen von Eitzen Aug 20 '16 at 9:11

## 2 Answers

HINT:

Let $\sin^{-1}(\cos x)=y\implies-\dfrac\pi2\le y\le\dfrac\pi2\ \ \ \ (1)$

and $\sin y=\cos x=\sin\left(\dfrac\pi2-x\right)$

$$y=n\pi+(-1)^n\left(\dfrac\pi2-x\right)$$ where $n$ is an integer such that $(1)$ is satisfied.

Or $\cos x=\sin y=\cos\left(\dfrac\pi2-y\right)$

$x=2m\pi\pm\left(\dfrac\pi2-y\right)$

$\iff\dfrac\pi2-y=\pm(2m\pi-x)$ where $m$ is an integer such that $(1)$ is satisfied.

$$I=\int\sin^{-1}(\cos x)dx=\int\big(\frac{\pi}{2}-\cos^{-1}(\cos x)\big)dx$$ $$y=\cos^{-1}(\cos x)\implies\cos y=\cos x\implies y=2n\pi\pm{x}$$ $$I=\frac{\pi x}{2}-\int(2n\pi\pm{x})dx=\color{red}{\frac{\pi x}{2}-2n\pi x\pm\frac{x^2}{2}+C}$$ If $0\leq x\leq\pi$, then $\cos^{-1}(\cos x)=x$ $$I=\int(\frac{\pi}{2}-x)dx=\frac{\pi x}{2}-\frac{x^2}{2}+C$$