differentiability of $\tan^{-1}(\frac{1}{|x|})$ How to justify, the following function is differentiable at origin or not? 
$f(x) = \tan^{-1}\frac{1}{|x|}$ if $x \ne 0$, $f(x) = \frac{\pi}{2}$ if $x = 0$. 
Even though mod x is not behaves well at the origin, since we are composing the mod x with the nice function $\tan^{-1}(x)$, I am guessing that above defined $f$ is differentiable at 0. But how to show that rigorously?
I think my guess is correct.
Thanks in Advance. 
 A: First note that
$$
f(x)=\tan^{-1}\left(\frac1{|x|}\right)=\frac\pi2-\tan^{-1}(|x|)
$$
Then
$$
\lim_{h\to0^+}\frac{f(h)-f(0)}{h}=\lim_{h\to0^+}\frac{-\tan^{-1}(h)}{h}=-1
$$
and
$$
\lim_{h\to0^-}\frac{f(h)-f(0)}{h}=\lim_{h\to0^-}\frac{-\tan^{-1}(-h)}{h}=1
$$
Since the two limits don't match, the function is not differentiable at $x=0$.
Here is a plot that shows the slope of $1$ to the left and the slope of $-1$ to the right:
$\hspace{3.5cm}$
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$$
\color{#66f}{\large\totald{\arctan\pars{1/\verts{x}}}{x}}
={1 \over \pars{1/\verts{x}}^{2} + 1}\,
\pars{-\,{1 \over \verts{x}^{2}}}\sgn\pars{x}
=\color{#66f}{\large-\,{\sgn\pars{x} \over x^{2} + 1}}\,,\qquad x \not=0
$$

Note that
  $$
\lim_{x\ \to\ 0^{-}}\totald{\arctan\pars{1/\verts{x}}}{x} = 1
\quad\mbox{and}\quad
\lim_{x\ \to\ 0^{+}}\totald{\arctan\pars{1/\verts{x}}}{x} = -1
$$

Namely,
$$\left.\totald{\arctan\pars{1/\verts{x}}}{x}\right\vert_{\,x\ =\ 0^{-}}
\not=\left.\totald{\arctan\pars{1/\verts{x}}}{x}\right\vert_{\,x\ =\ 0^{+}}
$$

such that $\ds{\left.\totald{\arctan\pars{1/\verts{x}}}{x}\right\vert_{\,x\ =\ 0}}$
  $\ds{\underline{\tt\mbox{doesn't exist}}}$.

