Class 12 Maths, Worked in Full Past papersGet updates
CBSE Board Examination 2025 · Section A · 1 mark

Q5: Is f(x)=∣x∣+∣x−1∣f(x) = |x| + |x - 1| continuous and differentiable at 00 and 11⁠?

The question

If f(x)=∣x∣+∣x−1∣f(x) = |x| + |x - 1|⁠, then which of the following is correct ?

(A) f(x)f(x) is both continuous and differentiable, at x=0x = 0 and x=1x = 1⁠.

(B) f(x)f(x) is differentiable but not continuous, at x=0x = 0 and x=1x = 1⁠.

(C) f(x)f(x) is continuous but not differentiable, at x=0x = 0 and x=1x = 1⁠.

(D) f(x)f(x) is neither continuous nor differentiable, at x=0x = 0 and x=1x = 1⁠.

Exam answer
f(x)={1−2x,x<01,0≤x<12x−1,x≥1f(x) = \begin{cases} 1 - 2x, & x < 0 \\ 1, & 0 \le x < 1 \\ 2x - 1, & x \ge 1 \end{cases}
Why?

Each modulus changes its formula where its inside is 0: ∣x∣|x| at x=0x = 0 and ∣x−1∣|x - 1| at x=1x = 1⁠. Use ∣x∣=−x|x| = -x for x<0x < 0⁠, and ∣x−1∣=1−x|x - 1| = 1 - x for x<1x < 1⁠. Then add on each interval:

x<0:−x+1−x=1−2x0≤x<1:x+1−x=1x≥1:x+x−1=2x−1\begin{aligned} x < 0&: -x + 1 - x = 1 - 2x \\ 0 \le x < 1&: x + 1 - x = 1 \\ x \ge 1&: x + x - 1 = 2x - 1 \end{aligned}

At x=0x = 0⁠: LHL =1−0=1= 1 - 0 = 1⁠, RHL =1= 1⁠, f(0)=1f(0) = 1⁠.

At x=1x = 1⁠: LHL =1= 1⁠, RHL =2−1=1= 2 - 1 = 1⁠, f(1)=1f(1) = 1⁠.

So f is continuous at x=0x = 0 and x=1x = 1⁠.

Why?

f is continuous at a point when LHL = RHL = the value there. The LHL uses the piece on the left of the point, and the RHL the piece on the right.

At x=0x = 0⁠: left piece 1−2x1 - 2x⁠, right piece 1.

LHL=1−2(0)=1−0=1RHL=1f(0)=1(middle piece)\begin{aligned} \text{LHL} &= 1 - 2(0) = 1 - 0 = 1 \\ \text{RHL} &= 1 \\ f(0) &= 1 \quad (\text{middle piece}) \end{aligned}

At x=1x = 1⁠: left piece 1, right piece 2x−12x - 1⁠.

LHL=1RHL=2(1)−1=2−1=1f(1)=2(1)−1=1\begin{aligned} \text{LHL} &= 1 \\ \text{RHL} &= 2(1) - 1 = 2 - 1 = 1 \\ f(1) &= 2(1) - 1 = 1 \end{aligned}

This also follows at once: ∣x∣|x| and ∣x−1∣|x - 1| are continuous everywhere, and a sum of continuous functions is continuous.

At x=0x = 0⁠, with h>0h > 0⁠:

LHD=lim⁡h→0f(−h)−f(0)−h=lim⁡h→01+2h−1−h=−2RHD=lim⁡h→0f(h)−f(0)h=lim⁡h→01−1h=0\begin{aligned} \text{LHD} &= \lim_{h \to 0}\frac{f(-h) - f(0)}{-h} \\ &= \lim_{h \to 0}\frac{1 + 2h - 1}{-h} = -2 \\ \text{RHD} &= \lim_{h \to 0}\frac{f(h) - f(0)}{h} \\ &= \lim_{h \to 0}\frac{1 - 1}{h} = 0 \end{aligned}
Why?

The one-sided derivatives at x=ax = a are

LHD=lim⁡h→0f(a−h)−f(a)−hRHD=lim⁡h→0f(a+h)−f(a)h\begin{aligned} \text{LHD} &= \lim_{h \to 0}\frac{f(a - h) - f(a)}{-h} \\ \text{RHD} &= \lim_{h \to 0}\frac{f(a + h) - f(a)}{h} \end{aligned}

with h>0h > 0⁠. Since −h<0-h < 0⁠, use 1−2x1 - 2x⁠: f(−h)=1+2hf(-h) = 1 + 2h⁠. For small h, h lies in (0,1)(0, 1)⁠, so f(h)=1f(h) = 1⁠.

f(−h)=1−2(−h)=1+2hf(−h)−f(0)−h=1+2h−1−h=2h−h=−2f(h)−f(0)h=1−1h=0h=0\begin{aligned} f(-h) &= 1 - 2(-h) = 1 + 2h \\[4pt] \frac{f(-h) - f(0)}{-h} &= \frac{1 + 2h - 1}{-h} \\ &= \frac{2h}{-h} = -2 \\[4pt] \frac{f(h) - f(0)}{h} &= \frac{1 - 1}{h} \\ &= \frac{0}{h} = 0 \end{aligned}

The h cancels before the limit is taken, so the limits are −2-2 and 0.

At x=1x = 1⁠:

LHD=lim⁡h→0f(1−h)−f(1)−h=lim⁡h→01−1−h=0RHD=lim⁡h→0f(1+h)−f(1)h=lim⁡h→02(1+h)−1−1h=lim⁡h→02hh=2\begin{aligned} \text{LHD} &= \lim_{h \to 0}\frac{f(1 - h) - f(1)}{-h} \\ &= \lim_{h \to 0}\frac{1 - 1}{-h} = 0 \\ \text{RHD} &= \lim_{h \to 0}\frac{f(1 + h) - f(1)}{h} \\ &= \lim_{h \to 0}\frac{2(1 + h) - 1 - 1}{h} \\ &= \lim_{h \to 0}\frac{2h}{h} = 2 \end{aligned}
Why?

Here a=1a = 1 and f(1)=1f(1) = 1⁠. For small h, 1−h1 - h lies in (0,1)(0, 1)⁠, so f(1−h)=1f(1 - h) = 1⁠. And 1+h>11 + h > 1⁠, so use 2x−12x - 1⁠:

f(1+h)=2(1+h)−1=2+2h−1=1+2hf(1+h)−f(1)=1+2h−1=2h2hh=2\begin{aligned} f(1 + h) &= 2(1 + h) - 1 \\ &= 2 + 2h - 1 = 1 + 2h \\[4pt] f(1 + h) - f(1) &= 1 + 2h - 1 = 2h \\[4pt] \frac{2h}{h} &= 2 \end{aligned}

LHD ≠\ne RHD at both points, so f is not differentiable at x=0x = 0 and x=1x = 1⁠.

Why?

Watch out: continuous does not mean differentiable. The graph has no break at 0 or 1, but it has sharp corners there: the slope jumps from −2-2 to 0 at x=0x = 0⁠, and from 0 to 2 at x=1x = 1⁠.

Answer: (C) f(x)f(x) is continuous but not differentiable, at x=0x = 0 and x=1x = 1⁠.

Where this comes from

Chapter 5, Continuity and Differentiability: Continuity and differentiability of |x| + |x − 1|.

Question type: Is ff continuous at the joint? Compare three numbers + Is ff differentiable at a point? Compare LHD and RHD (combines 2 types)

How to spot it: click to see

Type 1. Is ff continuous at the joint? Compare three numbers

Spot it: ff is given in pieces, and you are asked where it is continuous, or where it breaks.

Here: First, rewrite ∣x∣+∣x−1∣|x| + |x - 1| in three pieces, with joints at 0 and 1. At each joint LHL, RHL and ff are all 1, so ff is continuous there.

Type 3. Is ff differentiable at a point? Compare LHD and RHD

Spot it: a modulus such as ∣x−1∣|x - 1|⁠, or a function in pieces, and the word "differentiable".

Here: Then the slopes: at 0, LHD is −2-2 and RHD is 0; at 1, LHD is 0 and RHD is 2. They differ, so neither point is differentiable: option (C).

Found an error?

Tell us if something on this page is wrong or unclear. Send feedback on this question →