## Proof

We start by defining the absolute value function, $\left|x\right|$, as a piecewise function:

$$\left|x\right|=\{\begin{array}{cc}x\hfill & \text{if}x\ge 0\hfill \\ -x\hfill & \text{if}x0\hfill \end{array}$$To find the derivative, we differentiate each piece separately:

For $x\ge 0$:

$$\frac{\text{d}}{\text{d}x}(x)=1$$For $x<0$:

$$\frac{\text{d}}{\text{d}x}(-x)=-1$$

Combining these results, we get:

$$\frac{\text{d}}{\text{d}x}\left|x\right|=\{\begin{array}{cc}1\hfill & \text{if}x0\hfill \\ -1\hfill & \text{if}x0\hfill \end{array}$$At $x=0$, the function $\left|x\right|$ is continuous, but its derivative is not defined because the left-hand limit ($-1$) and the right-hand limit ($1$) are not equal.

Another way to express the derivative of $\left|x\right|$ is using the function $\frac{x}{\left|x\right|}$. This function is defined as:

$$\frac{x}{\left|x\right|}=\{\begin{array}{cc}1\hfill & \text{if}x0\hfill \\ -1\hfill & \text{if}x0\hfill \\ \text{undefined}\hfill & \text{if}x=0\hfill \end{array}$$Thus, the derivative of $\left|x\right|$ is:

$$\frac{\text{d}}{\text{d}x}\left|x\right|=\overline{)\frac{x}{\left|x\right|}}$$## Explanation

To understand the derivative of the absolute value function $\left|x\right|$, let’s break it down step by step.

The absolute value function $\left|x\right|$ is defined differently for positive and negative values of $x$. Specifically:

$$\left|x\right|=\{\begin{array}{cc}x\hfill & \text{if}x\ge 0\hfill \\ -x\hfill & \text{if}x0\hfill \end{array}$$This means that for any non-negative value of $x$ (including zero), $\left|x\right|$ is just $x$, and for any negative value of $x$, $\left|x\right|$ is $-x$.

To find the derivative of $\left|x\right|$, we need to consider these two cases separately:

When $x\ge 0$, the function $\left|x\right|$ is equal to $x$. The derivative of $x$ with respect to $x$ is $1$.

When $x<0$, the function $\left|x\right|$ is equal to $-x$. The derivative of $-x$ with respect to $x$ is $-1$.

Putting these two results together, we get:

$$\frac{\text{d}}{\text{d}x}\left|x\right|=\{\begin{array}{cc}1\hfill & \text{if}x0\hfill \\ -1\hfill & \text{if}x0\hfill \end{array}$$At $x=0$, the situation is different. The function $\left|x\right|$ is continuous at $x=0$, but its **derivative is not defined.** This is because the left-hand limit of the derivative as $x$ approaches 0 from the negative side is $-1$, and the right-hand limit as $x$ approaches 0 from the positive side is $1$. Since these two limits are not equal, the derivative at $x=0$ does not exist.

Another way to express this derivative more compactly is by using the function $\frac{x}{\left|x\right|}$. This function gives us the sign of $x$:

$$\frac{x}{\left|x\right|}=\{\begin{array}{cc}1\hfill & \text{if}x0\hfill \\ -1\hfill & \text{if}x0\hfill \end{array}$$At $x=0$, this expression is undefined because we cannot divide by zero. Therefore, the derivative of $\left|x\right|$ can be written as:

$$\frac{\text{d}}{\text{d}x}\left|x\right|=\overline{)\frac{x}{\left|x\right|}}$$Thus, the derivative of the absolute value function $\left|x\right|$ is $\frac{x}{\left|x\right|}$, which is $1$ for positive $x$, $-1$ for negative $x$, and undefined at $x=0$.

*Q.E.D.*