Why is $[-\frac{\pi}{2}, \frac{\pi}{2} ]$ the set of values for $f(x) = \arctan \sqrt{x^2-1} + \arcsin \frac{1}{x}$? I am given the function:
$$f:D \rightarrow \mathbb{R} \hspace{3cm} f(x) = \arctan \sqrt{x^2-1} + \arcsin \frac{1}{x}$$
where $D$ is the maximum domain of the function. I am told that the set of values of the function is $\bigg [ -\dfrac{\pi}{2} 
,\dfrac{\pi}{2} \bigg ]$. How was this answer reached? I assume derivatives and limits have been used, but I am not sure. If you could show me the steps taken to reach this conclusion, or even just tell me what I need to do, I'd appreciate it.
 A: Hint
Let $\arctan\sqrt{x^2-1}=y,\dfrac\pi2>y\ge0,x=\pm\sec y$
If $x>0,x=\sec y$
$\arcsin\dfrac1x=\arcsin(\cos y)=\dfrac\pi2-\arccos(\cos y)=\dfrac\pi2-y$
If $x<0,x=-\sec y$
$\arcsin(-\cos y)=-\arcsin(\cos y)=?$
A: No need for any calculus here. Note that the domain $D$ is $(-\infty,-1]\cup [1,\infty)$. 
If $x\geq 1$ then 
$$\tan\left(\arcsin\left(\frac 1x\right)\right)=\frac 1{\sqrt{x^2-1}}=\cot\left(\arctan\left(\sqrt{x^2-1}\right)\right),$$
which shows $\arcsin\left(\frac 1x\right)+\arctan\left(\sqrt{x^2-1}\right)\equiv\frac{\pi}2$, which is thus the only value of $f$ on the positive component of the domain. 
On the negative component of the domain, $\tan\left(\arcsin\left(\frac 1x\right)\right)=-\frac 1{\sqrt{x^2-1}},$ so $\arcsin\left(\frac 1x\right)-\arctan\left(\sqrt{x^2-1}\right)\equiv\frac{\pi}2$, which means $f(x)$ can be identified with $\frac{\pi}2+2\arcsin(\frac 1x)$. On $(-\infty,-1]$ this takes on the same values as $\frac{\pi}2+2\arcsin x$ does on $[-1,0)$, namely $[-\pi/2,\pi/2)$, which gives the desired claim.
A: Note that the domain is $x^2\ge 1$ and
$$f'(x) = \frac1{x\sqrt{x^2-1}} \left( 1-\frac{|x|}{x}\right)$$
Thus, 
$$f(x\ge 1) = f(1)  = \frac{\pi}2$$
$$f(x\le -1) = f(-1) + \int_{-1}^x \frac{2dt}{t\sqrt{t^2-1}}
=-\frac\pi2-\int_{1}^{-\frac1x} \frac{2du}{\sqrt{1-u^2}}
=\frac\pi2+2\arcsin\frac1x$$
Since the range of $\arcsin\frac1x$ for $x\le -1$ is $[-\frac\pi2,0)$, the range of $f(x)$ is $[-\frac\pi2,\frac\pi2]$.
