Problem with proof of derivate of $arcsecx$ Look at this proof for derivative of $arcsecx $
$$y=arcsecx  \Rightarrow secy=x$$
We have:
$$(secy) \prime =secytany$$
We take derivations from both parts with respect to $x $
$$y \prime = \frac{1}{secytany} =  \frac{1}{secy \sqrt{sec^2y-1} }  \Rightarrow y \prime = \frac{1}{x \sqrt{x^2-1} } $$
While the correct derivative is:
$$(arcsecx) \prime = \frac{1}{ |x| \sqrt{x^2-1} } $$
What is the problem with the proof above?

Hint:
$$
\tan y= \frac{\sin y}{\cos y}=\frac{\sqrt{1-\cos^2 y}}{\cos y}=\sec y \sqrt{1-\frac{1}{\sec ^2 y}} =
$$
$$
= \sec y \sqrt{\frac{\sec^2 y -1}{\sec^2 y}}=\frac{\sec y}{\color{red}{|\sec y|}}\sqrt{\sec^2 y-1}=\color{red}{\mbox{sign}(\sec y)}\sqrt{\sec^2 y-1}
$$
In simple words: the problem is that $\sqrt {a^2}=|a| $ 
