Finding the Derivative of |x| using the Limit Definition

$\dfrac{d}{dx}|x|$

$=\lim\limits_{\Delta x\to 0}\dfrac{|x+\Delta x|-|x|}{\Delta x}$

$=\lim\limits_{\Delta x\to 0}\dfrac{(|x+\Delta x|-|x|)(|x+\Delta x|+|x|)}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{|x+\Delta x|^2-|x|^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{(x+\Delta x)^2-x^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{x^2+2x\Delta x+(\Delta x)^2-x^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{2x+\Delta x}{|x+\Delta x|+|x|}$

$=\dfrac{x}{|x|}$

$=\dfrac{x|x|}{|x|^2}$

$=\dfrac{x|x|}{x^2}$

$=\dfrac{|x|}{x}$


Since the absolute value is defined by cases, $$|x|=\left\{\begin{array}{ll} x & \text{if }x\geq 0;\\ -x & \text{if }x\lt 0, \end{array}\right.$$ it makes sense to deal separately with the cases of $x\gt 0$, $x\lt 0$, and $x=0$.

For $x\gt0$, for $\Delta x$ sufficiently close to $0$ we will have $x+\Delta x\gt 0$. So $f(x)= |x| = x$, and $f(x+\Delta x) = |x+\Delta x| = x+\Delta x$; plugging that into the limit, we have: $$\lim_{\Delta x\to 0}\frac{f(x+\Delta x) - f(x)}{\Delta x} = \lim_{\Delta x\to 0}\frac{|x+\Delta x|-|x|}{\Delta x} = \lim_{\Delta x\to 0}\frac{(x+\Delta x)-x}{\Delta x}.$$ You should be able to finish it now.

For $x\lt 0$, for $\Delta x$ sufficiently close to zero we will have $x+\Delta x\lt 0$; so $f(x) = -x$ and $f(x+\Delta x) = -(x+\Delta x)$. It should again be easy to finish it.

The tricky one is $x=0$. I suggest using one-sided limits. For the limit as $\Delta x\to 0^+$, $x+\Delta x = \Delta x\gt 0$; for $\Delta x \to 0^-$, $x+\Delta x = \Delta x\lt 0$; the (one-sided) limits should now be straightforward.


We can write $|x| = \sqrt{x^2}$. Using the chain rule we then get $$|x|' = \frac{1}{2\sqrt{x^2}} \cdot 2x = \frac{x}{\sqrt{x^2}} = \frac{x}{|x|}$$


EDIT Using limit: $$\begin{align} \frac{\sqrt{(x+\Delta x)^2}-\sqrt{x^2}}{\Delta x} & = \frac{(\sqrt{(x+\Delta x)^2}-\sqrt{x^2})(\sqrt{(x+\Delta x)^2}+\sqrt{x^2})}{\Delta x (\sqrt{(x+\Delta x)^2}+\sqrt{x^2})} \\ & = \frac{(x+\Delta x)^2-x^2}{\Delta x (\sqrt{(x+\Delta x)^2}+\sqrt{x^2})} \\ & = \frac{2 x \Delta x + \Delta x^2}{\Delta x (\sqrt{(x+\Delta x)^2}+\sqrt{x^2})} \\ & = \frac{2x + \Delta x}{\sqrt{(x+\Delta x)^2}+\sqrt{x^2}} \\ & \to \frac{2x}{\sqrt{x^2}+\sqrt{x^2}} = \frac{2x}{2|x|} = \frac{x}{|x|} \end{align}$$