Continuity and differentiability of |x| at x = 0 — graphical explanation

easy CBSE JEE-MAIN NCERT Class 12 3 min read

Question

Show that f(x)=xf(x) = |x| is continuous but not differentiable at x=0x = 0. Explain graphically.

(NCERT Class 12, Chapter 5 — Continuity and Differentiability)


Solution — Step by Step

f(x)=x={xif x0xif x<0f(x) = |x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}

Three conditions must hold:

  1. f(0)=0=0f(0) = |0| = 0 ✓ (function is defined)
  2. limx0+f(x)=limx0+x=0\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} x = 0
  3. limx0f(x)=limx0(x)=0\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} (-x) = 0

Since left limit = right limit = f(0)=0f(0) = 0, the function is continuous at x=0x = 0.

The derivative requires limh0f(0+h)f(0)h=limh0hh\lim_{h \to 0} \frac{f(0+h) - f(0)}{h} = \lim_{h \to 0} \frac{|h|}{h} to exist.

Right-hand derivative: limh0+hh=limh0+hh=1\lim_{h \to 0^+} \frac{|h|}{h} = \lim_{h \to 0^+} \frac{h}{h} = 1

Left-hand derivative: limh0hh=limh0hh=1\lim_{h \to 0^-} \frac{|h|}{h} = \lim_{h \to 0^-} \frac{-h}{h} = -1

Since 111 \neq -1, the derivative does not exist at x=0x = 0. The function is not differentiable at x=0x = 0.

The graph of x|x| is a V-shape with a sharp corner at the origin. The left arm has slope 1-1 and the right arm has slope +1+1.

At the corner, there’s no unique tangent line — you could draw infinitely many lines through the point that “touch” the curve. Differentiability requires a unique tangent, which means a smooth curve with no sharp corners. The sharp point at x=0x = 0 is exactly where differentiability fails.


Why This Works

Continuity means “no breaks” — the graph can be drawn without lifting the pen. Differentiability means “no sharp corners” — the graph must be smooth enough to have a unique tangent at every point.

A function can be continuous without being differentiable (like x|x| at the corner), but a differentiable function is always continuous. So differentiability is a “stronger” condition than continuity.

The derivative is the slope of the tangent line. At the corner of x|x|, the slope changes abruptly from 1-1 to +1+1 — there’s no single slope value that works, so the derivative doesn’t exist.


Alternative Method — Using the formal definition with specific sequences

Take hn=1/nh_n = 1/n (approaching 0 from the right): 1/n1/n=1\frac{|1/n|}{1/n} = 1 for all nn.

Take hn=1/nh_n = -1/n (approaching 0 from the left): 1/n1/n=1/n1/n=1\frac{|-1/n|}{-1/n} = \frac{1/n}{-1/n} = -1 for all nn.

Different sequences give different limits, so the limit doesn’t exist.

This is a classic example that separates continuity from differentiability. JEE loves asking: “Is f(x)=xa+xbf(x) = |x - a| + |x - b| differentiable everywhere?” The answer: not at x=ax = a and x=bx = b (sharp corners). Any function involving absolute values likely has non-differentiable points — check left and right derivatives at each critical point.


Common Mistake

Some students conclude that since f(x)=xf(x) = |x| has a derivative of 1-1 on the left and +1+1 on the right, the derivative at x=0x = 0 must be the average: 00. This is wrong. The derivative is defined as a limit, and if the left and right limits disagree, the limit simply does not exist. Averaging is not a valid operation for limits that disagree.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next