Continuity & Differentiability: Step-by-Step Worked Examples (10)

easy 3 min read

Question

Determine if f(x)=x1+x2f(x) = |x - 1| + |x - 2| is continuous and differentiable everywhere. Identify the points where it is not differentiable.

Solution — Step by Step

Both x1|x-1| and x2|x-2| are continuous everywhere (absolute values are always continuous). Sum of continuous functions is continuous. So f(x)f(x) is continuous on R\mathbb{R}.

Absolute value xa|x-a| is not differentiable at x=ax = a. Candidates: x=1x = 1 and x=2x = 2.

For xx slightly less than 1: f(x)=(1x)+(2x)=32xf(x) = (1-x) + (2-x) = 3 - 2x, slope 2-2.

For xx slightly more than 1 (but less than 2): f(x)=(x1)+(2x)=1f(x) = (x-1) + (2-x) = 1, slope 00.

Left derivative \neq right derivative → not differentiable at x=1x = 1.

For xx slightly less than 2 (but more than 1): f(x)=1f(x) = 1, slope 00.

For xx slightly more than 2: f(x)=(x1)+(x2)=2x3f(x) = (x-1) + (x-2) = 2x - 3, slope 22.

Left derivative \neq right derivative → not differentiable at x=2x = 2.

For x{1,2}x \notin \{1, 2\}, ff is a sum of differentiable functions, hence differentiable.

Final answer: ff is continuous on R\mathbb{R}, differentiable on R{1,2}\mathbb{R} \setminus \{1, 2\}.

Why This Works

Absolute value functions have “corners” at the points where their argument is zero — these are the only candidates for non-differentiability. Sum of corners is just more corners (or smooth, if they happen to cancel, which they don’t here).

The function is piecewise linear with three pieces: slope 2-2 for x<1x < 1, slope 00 for 1x21 \leq x \leq 2, slope +2+2 for x>2x > 2. Slopes change discontinuously at x=1x = 1 and x=2x = 2, so derivatives don’t exist there.

Alternative Method

Sketch the graph. f(x)f(x) is V-shaped, with minimum value 11 on the entire interval [1,2][1, 2]. Two corners at x=1x = 1 and x=2x = 2 make it non-differentiable there.

For piecewise functions involving absolute values, draw the graph mentally. Corners = non-differentiable points. Smooth pieces = differentiable.

Common Mistake

Concluding non-differentiability from continuity failure. Differentiability is stronger than continuity. If ff is continuous, it might or might not be differentiable. Continuity does not guarantee differentiability — corners are continuous but not differentiable.

Computing only one-sided derivatives and not comparing. You must show that left and right derivatives differ to declare non-differentiability — or that the limit defining the derivative does not exist.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next