The derivative of |x| (mod x) is equal to x/|x| where x is non-zero. The function |x| is known as the absolute value of x. So the derivative of absolute value of x is given by
$\dfrac{d}{dx}(|x|) = \dfrac{x}{|x|}$, provided that x ≠ 0.
Before we prove this formula, let us first recall the definition of |x|. Modulus of x is defined as follows:
|x| = x if x ≥ 0 $\quad$= -x if x < 0. |
Table of Contents
What is the Derivative of Mod x?
Answer: The derivative of mod x is equal to $\dfrac{d}{dx}(|x|) = \dfrac{x}{|x|}$ when x is non-zero. At x=0, the derivative of mod x doest not exist. |
Proof of Derivative of mod x
We prove this formula case by case.
Case1: Suppose x > 0.
By the definition of mod x, we know that |x| = x for x > 0.
Differentiating,
$\dfrac{d}{dx}|x| = \dfrac{d}{dx}(x)$
⇒ $\dfrac{d}{dx}|x| = 1$.
Case2: Suppose x < 0.
By definition, we have |x| = -x for x < 0.
Differentiating,
$\dfrac{d}{dx}|x| = \dfrac{d}{dx}(-x)$
⇒ $\dfrac{d}{dx}|x| = -1$.
So we have shown that
$\dfrac{d}{dx}(|x|) = \begin{cases} 1, & \text{ if } x > 0 \\ -1, & \text{ if } x < 0. \end{cases}$
Rewriting the above we obtain that the derivative of mod x is equal to
$\dfrac{d}{dx}(|x|) = \dfrac{x}{|x|}$ for x non-zero.
Case3: Let x=0.
We will show that the derivative of |x| does not exist at x=0.
Let f(x) = |x|.
The left-hand limit = limh→0- $\dfrac{f(h)-f(0)}{h}$
= limh→0- $\dfrac{|h|-0}{h}$
= limh→0- $\dfrac{-h-0}{h}$
= -1.
The right-hand limit = limh→0+ $\dfrac{f(h)-f(0)}{h}$
= limh→0+ $\dfrac{|h|-0}{h}$
= limh→0+ $\dfrac{h-0}{h}$
= 1.
As the left-hand and the right hand limit are not equal, so the limit limh→0 $\dfrac{f(h)-f(0)}{h}$ does not exist. Therefore, mod x is not differentiable at x=0.
Also Read: Integration of |x|
General Situation
The modulus of x-a (a is a constant), that is, |x-a| is differentiable at every point except x=a. The function |x-a| is defined as follows:
|x-a| = x-a if x ≥ a $\quad \quad$= -(x-a) if x < a. |
Differentiability of |x-a| at x=a
Let f(x) = |x-a|. Assume a>0.
The left-hand limit =
limh→0- $\dfrac{f(a+h)-f(a)}{h}$ = limh→0- $\dfrac{|h|-0}{h}$ = limh→0- $\dfrac{-h-0}{h}$ = -1.
The right-hand limit =
limh→0+ $\dfrac{f(a+h)-f(a)}{h}$ = limh→0+ $\dfrac{|h|-0}{h}$ = limh→0+ $\dfrac{h-0}{h}$ = 1.
As the above two limits are unequal, we conclude that modulus of x-a is not differentiable at x=a.
Read Also: Derivative of cube root of x
FAQs
Answer: As the derivative of |x| when x>0 is equal to 1, the derivative of |x| at x=1 is equal to 1.
Answer: The function f(x)=|x| is NOT differentiable at x=0, because the left-hand and the right-hand limit are not equal.
This article is written by Dr. T, an expert in Mathematics (PhD). On Mathstoon.com you will find Maths from very basic level to advanced level. Thanks for visiting.