Class 12 Maths, Worked in Full Past papersGet updates
Chapter 5 · Continuity and Differentiability

Exercise 5.1 · Q16: Continuity of −2-2 (x≤−1x \le -1⁠), 2x2x (−1<x≤1-1 < x \le 1⁠), 22 (x>1x > 1⁠)

Exercise 5.1Continuity of piecewise functions · Section 5.2
The question

Discuss the continuity of the function ff⁠, where ff is defined by

f(x)={−2,if x≤−12x,if −1<x≤12,if x>1f(x) = \begin{cases} -2, & \text{if } x \le -1 \\ 2x, & \text{if } -1 < x \le 1 \\ 2, & \text{if } x > 1 \end{cases}
Exam answer

For x<−1x < -1⁠, f(x)=−2f(x) = -2⁠; for −1<x<1-1 < x < 1⁠, f(x)=2xf(x) = 2x⁠; for x>1x > 1⁠, f(x)=2f(x) = 2⁠. These are polynomials, so ff is continuous at every xx other than −1-1 and 11⁠.

At x=−1x = -1⁠:

LHL=lim⁡h→0f(−1−h)=lim⁡h→0(−2)=−2RHL=lim⁡h→0f(−1+h)=lim⁡h→02(−1+h)=−2\begin{aligned} \text{LHL} &= \lim_{h\to0} f(-1 - h) \\ &= \lim_{h\to0}(-2) = -2 \\ \text{RHL} &= \lim_{h\to0} f(-1 + h) \\ &= \lim_{h\to0} 2(-1 + h) = -2 \end{aligned}

and f(−1)=−2f(-1) = -2⁠. So LHL=RHL=f(−1)\text{LHL} = \text{RHL} = f(-1)⁠: ff is continuous at x=−1x = -1⁠.

At x=1x = 1⁠:

LHL=lim⁡h→0f(1−h)=lim⁡h→02(1−h)=2RHL=lim⁡h→0f(1+h)=lim⁡h→02=2\begin{aligned} \text{LHL} &= \lim_{h\to0} f(1 - h) \\ &= \lim_{h\to0} 2(1 - h) = 2 \\ \text{RHL} &= \lim_{h\to0} f(1 + h) \\ &= \lim_{h\to0} 2 = 2 \end{aligned}

and f(1)=2(1)=2f(1) = 2(1) = 2⁠. So LHL=RHL=f(1)\text{LHL} = \text{RHL} = f(1)⁠: ff is continuous at x=1x = 1⁠.

Hence ff is continuous at every real number.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The middle piece 2x2x climbs from 2(−1)=−22(-1) = -2 to 2(1)=22(1) = 2⁠, and these are exactly the heights of the flat outer pieces. So the line ramps up from the lower floor to the upper floor without a gap. Test the two junctions x=−1x = -1 and x=1x = 1 with one-sided limits and values: everything agrees, and ff is continuous at every real number.

Given, to find, and the plan
Given
f(x)=−2f(x) = -2 for x≤−1x \le -1⁠, f(x)=2xf(x) = 2x for −1<x≤1-1 < x \le 1⁠, f(x)=2f(x) = 2 for x>1x > 1⁠.
To find
At which points ff is continuous and at which it is not.
Plan
(1) Domain and junctions. (2) Points strictly inside each piece. (3) The junction x=−1x = -1⁠. (4) The junction x=1x = 1⁠. (5) Conclude.

Basics you need

1Reading a piecewise function

x=−1x = -1 satisfies x≤−1x \le -1 (not −1<x-1 < x⁠), so f(−1)=−2f(-1) = -2⁠. x=1x = 1 satisfies −1<x≤1-1 < x \le 1⁠, so f(1)=2⋅1=2f(1) = 2 \cdot 1 = 2⁠. Basics: piecewise functions

2A limit only looks near the point

If ff equals a polynomial (or a constant) on an interval around cc⁠, its limit at cc is that polynomial's value. Basics: what a limit is

3Left-hand and right-hand limits

At a junction, compute each side with its own formula. Basics: one-sided limits

4Continuity at a point (Definition 1)

Left-hand limit == right-hand limit =f(c)= f(c)⁠.

Solution

  1. Domain and junctions

    Every real xx satisfies exactly one of x≤−1x \le -1⁠, −1<x≤1-1 < x \le 1⁠, x>1x > 1⁠, and each formula is defined everywhere. So the domain is R\R⁠, and the junctions are x=−1x = -1 and x=1x = 1⁠.

    The two junctions are the only places where a jump could come from switching formulas; everywhere else one formula governs a whole neighbourhood.
    Regions: (−∞,−1](-\infty, -1]⁠, (−1,1](-1, 1]⁠, (1,∞)(1, \infty)⁠. Basics: piecewise functions
  2. Points strictly inside a piece

    If c<−1c < -1⁠: near cc (within distance −1−c-1 - c⁠), f(x)=−2f(x) = -2⁠, so lim⁡x→cf(x)=−2=f(c)\lim_{x\to c} f(x) = -2 = f(c)⁠.

    If −1<c<1-1 < c < 1⁠: near cc (within distance min⁡(c+1,1−c)\min(c + 1, 1 - c)⁠), f(x)=2xf(x) = 2x⁠, so lim⁡x→cf(x)=2c=f(c)\lim_{x\to c} f(x) = 2c = f(c)⁠.

    If c>1c > 1⁠: near cc (within distance c−1c - 1⁠), f(x)=2f(x) = 2⁠, so lim⁡x→cf(x)=2=f(c)\lim_{x\to c} f(x) = 2 = f(c)⁠.

    So ff is continuous at every c≠−1,1c \ne -1, 1⁠.

    A point strictly inside one region has a small interval around it inside the same region, on which ff is a constant or the polynomial 2x2x⁠. The limit uses only that interval, so it equals the value.
    Constants and polynomials are continuous (Examples 5 and 14). Lesson: continuity at a point
  3. The junction x=−1x = -1

    Value. −1≤−1-1 \le -1⁠, so f(−1)=−2f(-1) = -2⁠.

    Left-hand limit. For x<−1x < -1⁠, f(x)=−2f(x) = -2⁠:

    lim⁡x→−1−f(x)=lim⁡x→−1−(−2)=−2.\lim_{x\to -1^-} f(x) = \lim_{x\to -1^-} (-2) = -2.

    Right-hand limit. For −1<x<1-1 < x < 1⁠, f(x)=2xf(x) = 2x⁠:

    lim⁡x→−1+f(x)=lim⁡x→−1+2x=2(−1)=−2.\lim_{x\to -1^+} f(x) = \lim_{x\to -1^+} 2x = 2(-1) = -2.

    Compare. Left-hand limit =−2= -2⁠, right-hand limit =−2= -2⁠, f(−1)=−2f(-1) = -2⁠. All equal, so ff is continuous at x=−1x = -1.

    Approaching −1-1 from the right means taking xx slightly bigger than −1-1⁠, such as −0.999-0.999⁠, where the middle formula 2x2x applies. Its values approach 2(−1)=−22(-1) = -2⁠, the same as the flat piece on the left.
    Signs: x→−1+x \to -1^+ means x>−1x > -1⁠, for example x=−0.999x = -0.999⁠. Basics: one-sided limits
  4. The junction x=1x = 1

    Value. 11 satisfies −1<x≤1-1 < x \le 1⁠, so f(1)=2⋅1=2f(1) = 2 \cdot 1 = 2⁠.

    Left-hand limit. For −1<x<1-1 < x < 1⁠, f(x)=2xf(x) = 2x⁠:

    lim⁡x→1−f(x)=lim⁡x→1−2x=2⋅1=2.\lim_{x\to 1^-} f(x) = \lim_{x\to 1^-} 2x = 2 \cdot 1 = 2.

    Right-hand limit. For x>1x > 1⁠, f(x)=2f(x) = 2⁠:

    lim⁡x→1+f(x)=lim⁡x→1+2=2.\lim_{x\to 1^+} f(x) = \lim_{x\to 1^+} 2 = 2.

    Compare. Left-hand limit =2= 2⁠, right-hand limit =2= 2⁠, f(1)=2f(1) = 2⁠. All equal, so ff is continuous at x=1x = 1.

    At this junction the value comes from the middle piece. The line 2x2x reaches height 22 exactly where the upper floor at height 22 begins.
    Definition 1: all three numbers must agree. Lesson: continuity at a point
  5. Conclude

    Steps 2, 3 and 4 cover every real number, and at each one ff is continuous. So ff is continuous at every real number: it is a continuous function with no point of discontinuity.

    The graph (below) is one unbroken path: a floor, a ramp, a floor. It has corners at (−1,−2)(-1, -2) and (1,2)(1, 2)⁠, but corners are about differentiability (Section 5.3), not continuity.
x y −3 −2 −1 1 2 3 −3 −2 −1 1 2 3 O (−1, −2) (1, 2) −2, x ≤ −1 2x 2, x > 1
Blue: y=−2y = -2 for x≤−1x \le -1⁠. Green: y=2xy = 2x for −1<x≤1-1 < x \le 1⁠, from (−1,−2)(-1, -2) to (1,2)(1, 2)⁠. Gold: y=2y = 2 for x>1x > 1⁠. The filled dots are f(−1)=−2f(-1) = -2 and f(1)=2f(1) = 2⁠; the graph is unbroken. One square is one unit on both axes.
Result

ff is continuous at every x≠±1x \ne \pm 1 (constant or linear pieces). At x=−1x = -1⁠: left-hand limit −2-2⁠, right-hand limit −2-2⁠, f(−1)=−2f(-1) = -2⁠. At x=1x = 1⁠: left-hand limit 22⁠, right-hand limit 22⁠, f(1)=2f(1) = 2⁠. ff is continuous at every real number. (Textbook answer: "Continuous".)

Check it with numbers

Around −1-1⁠: f(−1.001)=−2f(-1.001) = -2⁠, f(−1)=−2f(-1) = -2⁠, f(−0.999)=2(−0.999)=−1.998f(-0.999) = 2(-0.999) = -1.998⁠. Around 11⁠: f(0.999)=1.998f(0.999) = 1.998⁠, f(1)=2f(1) = 2⁠, f(1.001)=2f(1.001) = 2⁠. No jumps. ✓

A second check by a different route: the same function can be written as f(x)=∣x+1∣−∣x−1∣f(x) = |x + 1| - |x - 1|⁠. For x≤−1x \le -1 this is −(x+1)+(x−1)=−2-(x + 1) + (x - 1) = -2⁠; for −1<x≤1-1 < x \le 1 it is (x+1)+(x−1)=2x(x + 1) + (x - 1) = 2x⁠; for x>1x > 1 it is (x+1)−(x−1)=2(x + 1) - (x - 1) = 2⁠. Since ∣x∣|x| is continuous (Example 7), ∣x+1∣|x + 1| and ∣x−1∣|x - 1| are continuous (Theorem 2, composition), and so is their difference (Theorem 1). Same conclusion. ✓

Common mistakes
  1. Using 2x2x for f(−1)f(-1)⁠. The middle condition is −1<x-1 < x⁠, strict, so f(−1)=−2f(-1) = -2 from the first piece. (Here 2(−1)=−22(-1) = -2 too, but read the conditions properly.)
  2. Sign slips at −1-1⁠. 2(−1)=−22(-1) = -2⁠, not 22⁠.
  3. Testing only one junction. Three pieces give two junctions.
  4. Calling the corners discontinuities. The graph bends at (±1,±2)(\pm 1, \pm 2) but does not break.
What to take away
  1. Test every junction; a function can be continuous at all of them.
  2. When neighbouring pieces give the same value at the junction, the graph joins up there.
  3. Rewriting a piecewise function with absolute values is a good independent check.

Every fact used, and where it comes from

FactUsed inSource
Constant functions and polynomials are continuousSteps 2–4Examples 5 and 14, Section 5.2 (Lesson: continuity at a point)
A limit at cc depends only on values near ccStep 2Class XI, Limits and Derivatives; Example 10, Section 5.2
Left-hand and right-hand limitsSteps 3, 4Class XI, Limits and Derivatives; recalled after Definition 1, Section 5.2
Continuity at cc⁠: left-hand limit == right-hand limit =f(c)= f(c)Steps 3–5Definition 1, Section 5.2
∣x∣|x| is continuousCheckExample 7, Section 5.2
Sums, differences and composites of continuous functions are continuousCheckTheorems 1 and 2, Section 5.2.1 (Lesson: algebra of continuous functions)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →