Derivative of $\sec^{-1}(x)$ I'm struggling with problem below which I eagerly want to solve. Let me know from where this problem is, if possible (the origin source of textbook). your answers might really helpful to get through the struggles with which I confront.
Question
One way of defining $\sec^{-1}(x)$ that is sometimes used is to say that $y=\sec^{-1}(x)$ $\iff$ $\sec(y)=x$ and $y \in (0,\pi]$ (alternatively, y is between 0 and pi and is the same 0 and pi, y not 0)
show that, with this definition. $\frac{d}{dx}\sec^{-1}(x)=\frac{1}{|x|\sqrt{x^2-1}}$
 A: $y = \sec^{-1} x \implies x = \sec y \implies \frac{dx}{dy} = \tan y \sec y = \sec y\sqrt{\sec^{2}y - 1} = x\sqrt{ x^2 - 1}$...   
A: Since $\sec^{-1}(x)$ is the inverse of $\sec (x)$, we can use the derivate of inverse function rule (look here wiki). 
I assume $x>1$, then:
$( \sec^{-1}(x))'=\frac{1}{\sec'(\sec^{-1}(x))}=\frac{1}{\sec(\sec^{-1}(x))\tan(\sec^{-1}(x))}=\frac{1}{x\tan(\sec^{-1}(x))}=\frac{1}{x \sqrt {\sec ^2(\sec^{-1}(x))-1}}=\frac{1}{x \sqrt {x^2-1}}$.
I used these facts: $\sec^{-1}(\sec(x)))=x, \tan(x)=\pm\sqrt {\sec ^2(x)-1}$ and $\sec'(x)=\sec(x)\tan(x)$.
I have not been extremely careful about the absolute value, but I think you can make it more formal.
A: We already know:
$$\sec \left(\sec^{-1}\left(x\right)\right)=x$$
We want to take a derivative from both sides of this with respect to $x$(obviously the right hand side will give 1). To take the derivative I will use the Chain rule.
$$\frac{d}{dx} \sec \left(\sec^{-1}\left(x\right)\right)=\frac{d\sec \left(\sec^{-1}\left(x\right)\right)}{d\sec^{-1}\left(x\right)}\frac{d\sec^{-1}\left(x\right)}{dx}=1$$

We already know how to calculate the derivative $\frac{d\sec{y}}{dy}$:
$$\frac{d\sec{y}}{dy}=\frac{d}{dy}\frac{1}{\cos{y}}=\frac{\sin{y}}{\cos^2{y}}=\sin{y}\sec^2{y}$$

Let's use this in our derivative(note $\frac{d\sec^{-1}\left(x\right)}{dx}$ is what we are looking for):
$$\frac{d\sec \left(\sec^{-1}\left(x\right)\right)}{d\sec^{-1}\left(x\right)}=\sin\left(\sec^{-1}\left(x\right)\right)\sec^2\left( \sec^{-1}\left(x\right)\right)=x^2\sin\left(\sec^{-1}\left(x\right)\right)$$
Now, how are we supposed to calculate $\sin\left(\sec^{-1}\left(x\right)\right)$? I usually draw a triangle for these type of trigonometry identities.

Looking at the image we figure out: $\sin\left(\sec^{-1}\left(x\right)\right)=\frac{\sqrt{x^2-1}}{x}$

Now putting everything back into our first equation, we find out:
$$x \sqrt{x^2-1}\frac{d\sec^{-1}\left(x\right)}{dx}=1 \\
\Rightarrow \frac{d\sec^{-1}\left(x\right)}{dx}=\frac{1}{x \sqrt{x^2-1}}$$
