Continuity & Differentiability: Conceptual Doubts Cleared (6)

hard 3 min read

Question

Show that the function f(x)=x1+x2f(x) = |x - 1| + |x - 2| is continuous everywhere but not differentiable at x=1x = 1 and x=2x = 2.

Solution — Step by Step

For x<1x < 1: both x1<0x-1 < 0 and x2<0x - 2 < 0, so f(x)=(x1)(x2)=32xf(x) = -(x-1) - (x-2) = 3 - 2x.

For 1x21 \leq x \leq 2: x10x - 1 \geq 0 but x20x - 2 \leq 0, so f(x)=(x1)(x2)=1f(x) = (x-1) - (x-2) = 1.

For x>2x > 2: both positive, so f(x)=(x1)+(x2)=2x3f(x) = (x-1) + (x-2) = 2x - 3.

limx1f(x)=32(1)=1\lim_{x \to 1^-} f(x) = 3 - 2(1) = 1. limx1+f(x)=1\lim_{x \to 1^+} f(x) = 1. f(1)=1f(1) = 1. All three match, so ff is continuous at x=1x = 1. Similarly at x=2x = 2: limf=1\lim f = 1 from the left, 2(2)3=12(2) - 3 = 1 from the right.

Left-hand derivative: f(x)=2f'(x) = -2 on (,1)(-\infty, 1), so LHD at 11 is 2-2.

Right-hand derivative: f(x)=0f'(x) = 0 on (1,2)(1, 2), so RHD at 11 is 00.

Since LHD \neq RHD, ff is not differentiable at x=1x = 1.

LHD on (1,2)(1, 2): f(x)=0f'(x) = 0, so LHD at 22 is 00.

RHD on (2,)(2, \infty): f(x)=2f'(x) = 2, so RHD at 22 is 22.

LHD \neq RHD, so ff is not differentiable at x=2x = 2.

Final Answer: ff is continuous everywhere but not differentiable at x=1x = 1 and x=2x = 2.

Why This Works

A function with a “corner” or “kink” can be continuous (no jump) yet not differentiable (the left and right slopes disagree). The absolute-value function xa|x - a| always has a corner at x=ax = a, so any sum of such terms has potential non-differentiability at each aa.

The piecewise rewriting is the workhorse: it converts a single ugly expression into three smooth pieces, on each of which the derivative is trivial. Then we just check the joints.

Alternative Method

Use the fact that xa|x - a| is non-differentiable only at x=ax = a. The sum x1+x2|x - 1| + |x - 2| inherits non-differentiability from each summand at the corresponding point. No piecewise expansion needed if we trust this property.

Concluding “not continuous because not differentiable” reverses the actual implication. Differentiability implies continuity, not the other way around. A function can be continuous everywhere yet differentiable nowhere (Weierstrass function).

For sums/products/compositions of |·| functions, list all the “kink points” first. The function is continuous at every kink (assuming finite limits) but possibly non-differentiable there. Drill this for JEE.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next