TITLE: Why doesn't my derivation of the arcsec derivative formula not work?
QUESTION [7 upvotes]: We would like to find the derivative of $\operatorname{arcsec}(x) = y$. Rearranging this, we get $x = \sec(y)$. Taking the derivative of both sides, we get $1 = \sec(y)\tan(y)y^\prime$. Thus, $$y^\prime = \frac{1}{\sec(y)\tan(y)}.$$ Now, draw a right triangle with an acute angle $y$, hypotenuse $x$, and a side adjacent to angle $y$ with length $1$. By the Pythagorean theorem, the side opposite angle $y$ is equal to $\sqrt{x^2-1}$. Thus, we have $x = \sec(y)$, which we already knew and got from the triangle, and $$\tan(y) = \frac{1}{\sqrt{x^2-1}}$$ from the triangle we drew. We substitute these values in to our derivative expression to get $$y' = \frac{1}{x\sqrt{x^2-1}}.$$
However, $y^\prime$ should equal $$\frac1{|x|\sqrt{x^2-1}}$$ (note the absolute value). Since the difference occurred in the $|x|$ part, that means I must've done something wrong when I said $\sec(y) = x$, but I do not know why this assumption is wrong. Please correct my proof.

REPLY [0 votes]: Ted Shifrin has already explained the problem with your derivation, but if you're looking for a 'safer' way of finding the derivative then consider this: if $\DeclareMathOperator{\arcsec}{arcsec} y = \arcsec x$, then using the identity $\arcsec x = \arccos 1/x$, we see that
\begin{align}
\frac{dy}{dx}=\frac{d}{dx}\left(\arccos 1/x\right) &= -\frac{1}{\sqrt{1-\left(\frac{1}{x}\right)^2}} \cdot -\frac{1}{x^2} \\[4pt]
&= \frac{1}{x^2\sqrt{1-\frac{1}{x^2}}} \, .
\end{align}
{"set_name": "stack_exchange", "score": 7, "question_id": 3999672}