Demonstrating non-differentiability with absolute value equations. I have a function $f(x)=|x^2-4|$.
I am able to use the following definition of absolute value to show that $f(x)$ is non-differentiable at $x=\pm2$
$|x| =
\begin{cases}
x, & x\geq0 \\
-x, & x<0
\end{cases} $.
When I use that definition I find that $\lim \limits_{x \to -2-} f'(x)=-4$ and $\lim \limits_{x \to -2+} f'(x)=4$
However, I am not able to show that with the following definition for the absolute value:
$|x|=\sqrt{x^2}$.
$|x^2-4|=\sqrt{(x^2-4)^2}$
$\lim \limits_{x \to -2} \frac{\sqrt{(x^2-4)^2}-\sqrt{((-2)^2-4)^2}}{x-(-2)}$
$=\lim \limits_{x \to -2} \frac{\sqrt{(x^2-4)^2}-0}{x+2}$
$=\lim \limits_{x \to -2} \frac{(x^2-4)^2}{(x+2)^2}$
$=\lim \limits_{x \to -2} \frac{(x+2)^2(x-2)^2}{(x+2)^2}$
$=\lim \limits_{x \to -2} (x-2)^2$
$=((-2)-2)^2=16$
I have bad fundamentals. So, I apologize for missing something basic. Thank you for your help in advance.
 A: There are two mistakes:
First, when you write
$$
\sqrt{(x^2 - 4)^2} = x^2 - 4 
$$
in the numerator of your calculation, you are assuming that
$$
\sqrt{u^2} = u, 
$$
which is only true if $u \geq 0$.
The actual formula (which you of course know) is:
$$
\sqrt{u^2} = |u|. 
$$
Second, you replace a rational expression by its square at the next step, but of course, they're not the same thing.
Does this help?
A: Let $$\begin{array}{cccl}f:
&\mathbb{R}&\longrightarrow& \mathbb{R}\\&x&\longmapsto& |x^{4}-4|\end{array}$$ To see whether $f$ is differentiable at $-2$ on $\mathbb{R}$, we compute the limit
\begin{align}
\lim_{x\to -2; x\in \mathbb{R}-\{-2\}}\frac{f(x)-f(-2)}{x-(-2)}=\lim_{x\to -2; x\in \mathbb{R}-\{-2\}}\frac{|x^{2}-4|-|(-2)^{2}-4|}{x+2}=\lim_{x\to -2; x\in \mathbb{R}-\{-2\}}\frac{|x^{2}-4|}{x+2}
\end{align}

*

*Just by definition of absolute value $x\mapsto |x|=\begin{cases} x,\quad x\geqslant 0,\\ -x,\quad x<0\end{cases}$. We can take left limits and right limits and we can see that limits they are not same. Indeed, $$\lim_{x\to -2; x\in \left]-2,+\infty\right[}f(x)=+4,\quad \text{and}\quad \lim_{x\to -2; x\in \left]-\infty,-2\right[}f(x)=-4.$$
Therefore, $f$ is non-differentiable at $-2$ on $\mathbb{R}$. What is about if one restrics $f$ to $[-2,+\infty[$ or to $]-\infty,-2]$? Does it $f|_{[-2,+\infty[}$ or $f|_{]-\infty,-2]}$ differerentiable at $-2$?


*On the other hand, using the fact $x\in \mathbb{R}$, we have $\sqrt{x^{2}}=|x|$, then
$$\lim_{x\to -2; x\in \mathbb{R}-\{-2\}}\frac{|x^{2}-4|}{x+2}=\lim_{x\to -2; x\in \mathbb{R}-\{-2\}}\frac{\sqrt{(x^{2}-4)^{2}}}{x+2}$$
and here $\underline{\text{you need to see the left limits and right limits again}}$ and we can see that limits they are not same. Indeed,
$$\lim_{x\to -2; x\in \left]-2,+\infty\right[}f(x)\not= \lim_{x\to -2; x\in \left]-\infty,-2\right[}f(x).$$
In your approach when you use the fact $\sqrt{x^{2}}=|x|$ for all real number $x$ you assume that the sub-radical quantity is non-negative, that is a problem. The best approach to this problem is to work directly with the definition of absolute value.
