Continuity & Differentiability: Edge Cases and Subtle Traps (1)

easy 3 min read

Question

Let f(x)=xf(x) = |x|. Show that ff is continuous at x=0x = 0 but not differentiable there. Then explain why f(x)=xxf(x) = x|x| is differentiable at x=0x = 0 — a subtle CBSE/JEE trap.

Solution — Step by Step

To check continuity at x=0x = 0:

limx0+x=limx0+x=0,limx0x=limx0(x)=0\lim_{x \to 0^+} |x| = \lim_{x \to 0^+} x = 0, \quad \lim_{x \to 0^-} |x| = \lim_{x \to 0^-}(-x) = 0

Both equal f(0)=0f(0) = 0. So x|x| is continuous at x=0x = 0.

Compute left and right derivatives:

f(0+)=limh0+h0h=limh0+hh=1f'(0^+) = \lim_{h \to 0^+} \frac{|h| - 0}{h} = \lim_{h \to 0^+} \frac{h}{h} = 1

f(0)=limh0h0h=limh0hh=1f'(0^-) = \lim_{h \to 0^-} \frac{|h| - 0}{h} = \lim_{h \to 0^-} \frac{-h}{h} = -1

Since f(0+)f(0)f'(0^+) \neq f'(0^-), the derivative does not exist at x=0x = 0. Geometrically, the graph has a corner.

Write f(x)=xxf(x) = x|x| piecewise:

f(x)={x2,x0x2,x<0f(x) = \begin{cases} x^2, & x \geq 0 \\ -x^2, & x < 0 \end{cases}

Continuity at 00: both pieces give 00 at x=0x = 0. ✓

Right derivative:

f(0+)=limh0+h20h=0f'(0^+) = \lim_{h \to 0^+} \frac{h^2 - 0}{h} = 0

Left derivative:

f(0)=limh0h20h=0f'(0^-) = \lim_{h \to 0^-} \frac{-h^2 - 0}{h} = 0

Both equal! So ff is differentiable at x=0x = 0 with f(0)=0f'(0) = 0.

The trap: many students reflexively conclude that any function involving x|x| is non-differentiable at 00. Not always — multiplying x|x| by xx smooths the corner into a tangent.

Why This Works

Continuity asks whether the function value is reached smoothly in the limit. Differentiability asks whether the slope is the same approaching from left and right. A function can be continuous (no jump) but not differentiable (corner, cusp, or vertical tangent).

For x|x|, the graph is a V — continuous but with a corner at 00. For xxx|x|, the function is x2x^2 for x0x \geq 0 and x2-x^2 for x<0x < 0. Both pieces have derivative 00 at x=0x = 0, so the graph is flat at the origin — smooth, no corner.

Alternative Method

Use the rule: ff is differentiable at aa iff limh0(f(a+h)f(a))/h\lim_{h \to 0} (f(a+h) - f(a))/h exists. For x|x| at 00, this two-sided limit doesn’t exist (left gives 1-1, right gives 11). For xxx|x| at 00, both sides give 00. The piecewise approach makes this transparent.

To check differentiability at a “kink” point: write the function piecewise, compute f(x)f'(x) separately for each piece, then plug in the boundary point and compare left and right values. If they match, differentiable. Don’t try to apply standard derivative rules to x|x| directly — they don’t work at x=0x = 0.

Common Mistake

The most common error is the reflex “absolute value implies non-differentiable”. Counterexamples:

  • f(x)=xxf(x) = x|x| is differentiable everywhere, including x=0x = 0.
  • f(x)=x2xf(x) = x^2|x| is differentiable and twice-differentiable at x=0x = 0.
  • f(x)=x3f(x) = |x|^3 is differentiable everywhere.

The rule of thumb: xn|x|^n for n1n \geq 1 is differentiable at 00 if n>1n > 1 (the corner gets “smoothed out”). Each extra power of x|x| adds one degree of smoothness.

The other slip: confusing continuity with differentiability. Differentiability implies continuity, but not vice versa. x|x| is the textbook example of “continuous but not differentiable”.

Final answer: x|x| is continuous at 00 but not differentiable. xxx|x| is differentiable at 00 with f(0)=0f'(0) = 0.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next