Given $f(x) = \arcsin\left(\frac{2x}{1+x^2}\right)$, find $f'(1)$. 
Let
  $$
f(x) = \arcsin\left(\frac{2x}{1+x^2}\right).
$$
  What is the value of $f'(1)$? 

The function splits into 
$$
f(x) = \begin{cases} 
\phantom{\pi-\,}2\arctan(x), & \text{if $-1 \leq x \leq 1$},\\
\pi - 2\arctan(x), & \text{if $x > 1$}.
\end{cases}
$$
I differentiated the function corresponding to $1$ but my answer is coming to be $1$, but the book tells me the answer does not exist. How can we say the derivative doesn't exist?
 A: Note that $\arcsin$ is differentiable in $(-1,1)$, but it is not differentiable at $\pm1$. Since $\frac{2\times1}{1+1^2}=1$, it would be strange indeed if $f(x)=\arcsin\left(\frac{2x}{1+x^2}\right)$ was differentiable at $1$.
A: Notice that
\begin{align*}
    f'(x) &= \frac{1}{\sqrt{1-\left(\frac{2x}{1+x^2}\right)^2}}\frac{d}{dx}\left(\frac{2x}{1+x^2}\right)
    \\&= \frac{1}{\sqrt{\left(\frac{1+x^2}{1+x^2}\right)^2-\left(\frac{2x}{1+x^2}\right)^2}}\cdot\frac{(1+x^2)(2) - (2x)(2x)}{(1+x^2)^2}
    \\&= \sqrt{\frac{(1+x^2)^2}{(1-x^2)^2}}\cdot \frac{2(1-x^2)}{(1+x^2)^2}
\end{align*}
(Skipping a bit of the algebra here).  You would like to cancel the square and square root, and in the case of $(1+x^2)$, you can.  But $1-x^2$ could be positive or negative, so $\sqrt{(1-x^2)^2} = |1-x^2|$, not $1-x^2$.  Therefore
$$
    f'(x) = \frac{2}{1+x^2}\cdot \frac{1-x^2}{|1-x^2|}
$$
As $x\to 1$, the first factor tends to $2$, unambiguously.  But the second factor is $\pm 1$ depending on whether the numerator is positive or negative.  That is,
$$
    \lim_{x\to 1^-} f'(x) = 1\qquad\text{and}\qquad\lim_{x\to 1^+} f'(x) = -1
$$
It follows that $f$ cannot be differentiable at $1$.
A: Recall that
$$(\arcsin u)'=\frac1{\sqrt{1-u^2}}$$
and since the derivative tends to $\infty$ as $u\to 1^-$ the function is not differentiable at that point.
That case is similar to $f(x)=\sqrt x$ which has vertical tangent at $x=0$.
