This is from Calculus by Michael Spivak, 3rd Edition, Chapter 15, problem 1 (iv):
Differentiate $f(x) = \arcsin\left(\frac{1}{\sqrt{1 + x^2}}\right).$
Here's my attempt: \begin{align}f'(x) &= \left[\arcsin\left(\frac{1}{\sqrt{1 + x^2}}\right)\right]' \\ &= \arcsin'\left(\frac{1}{\sqrt{1 + x^2}}\right)\cdot \left(\frac{1}{\sqrt{1 + x^2}}\right)' \\ &= \frac{1}{\sqrt{1 - \left(\frac{1}{\sqrt{1 + x^2}}\right)^2}} \cdot \frac{-x}{(1+x^2)^{3/2}} \\ &= \frac{1}{\sqrt{1 - \frac{1}{1+x^2}}} \cdot \frac{-x}{(1+x^2)^{3/2}} \\ &= \frac{1}{\sqrt{\frac{1 + x^2 - 1}{1+x^2}}} \cdot \frac{-x}{(1+x^2)^{3/2}} \\ &= \frac{-x}{\frac{\sqrt{x^2}}{\sqrt{1+x^2}} \cdot \sqrt{1 + x^2}(1+x^2)} \\ &=\frac{-x}{|x|} \cdot \frac{1}{1+x^2}.\end{align}
Therefore $$f'(x) = \begin{cases} \dfrac{-1}{1+x^2}, & \text{if $x > 0$} \\[1ex] \dfrac{1}{1+x^2}, & \text{if $x < 0$} \end{cases} $$
In the Answer Book the published solution is $\frac{-1}{1+x^2}$.
It seems Spivak is discounting the possibility that $x < 0$. Why might this be? Is there a reason $x$ cannot be negative here? Did I make a mistake? Perhaps with this part of simplifying the denominator?
$$\sqrt{\frac{x^2}{1+x^2}} \cdot \sqrt{1 + x^2} = \sqrt {x^2} = |x|$$
I suspect there's something simple I'm not seeing. I'm just now encountering these inverse trigonometric functions, so my understanding isn't very solid yet.
Edit: This error could have become a misleading, possibly demoralizing waste of time, but thanks your insightful answers it's instead proven to be more instructive than the first 3 (omitted, correct) parts of the problem.
Let us verify in another way:
Let $y=\arcsin\dfrac1{\sqrt{1+x^2}}\implies\dfrac\pi2\ge y\ge0$
and $x^2=\csc^2y-1$
If $x\ge0, y=\text{arccot}x=\dfrac\pi2-\arctan x$
If $x<0, x=-\cot y, $
Consequently, $y=\cdots=\dfrac\pi2-\arctan(-x)=\dfrac\pi2+\arctan x$