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

Example 10: x+2x+2 for x≤1x\le1⁠, x−2x-2 for x>1x>1⁠: a jump at 1

ExamplesContinuity of piecewise functions · Section 5.2
The question

Discuss the continuity of the function ff defined by

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

For x<1x < 1⁠, f(x)=x+2f(x) = x + 2⁠, a polynomial. So ff is continuous at every c<1c < 1⁠.

For x>1x > 1⁠, f(x)=x−2f(x) = x - 2⁠, a polynomial. So ff is continuous at every c>1c > 1⁠.

At x=1x = 1⁠:

f(1)=1+2=3f(1) = 1 + 2 = 3 LHL=lim⁡x→1−(x+2)=3,RHL=lim⁡x→1+(x−2)=−1\begin{aligned} \text{LHL} &= \lim_{x\to 1^-}(x + 2) = 3, \\ \text{RHL} &= \lim_{x\to 1^+}(x - 2) = -1 \end{aligned}

Since LHL≠RHL\text{LHL} \ne \text{RHL}⁠, ff is not continuous at x=1x = 1⁠.

∴ x=1\therefore\ x = 1 is the only point of discontinuity of ff⁠.

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

The one idea this problem is built on

Split the real line where the formula changes. Inside each piece the function is a single straight line, so it is continuous there. At the junction x=1x = 1 the two formulas must be compared: the left piece arrives at height 3 and the right piece starts from height −1-1⁠. The one-sided limits disagree, so the graph jumps at 1 and ff is discontinuous there, and only there.

Given, to find, and the plan
Given
f(x)=x+2f(x) = x + 2 when x≤1x \le 1 and f(x)=x−2f(x) = x - 2 when x>1x > 1⁠.
To find
All points where ff is continuous and all points of discontinuity.
Plan
The domain is R\R⁠. Case 1: c<1c < 1⁠. Case 2: c>1c > 1⁠. Case 3: c=1c = 1⁠, computing f(1)f(1)⁠, the left-hand limit and the right-hand limit separately, each with its own formula.

Basics you need

1Reading a piecewise definition

"x≤1x \le 1" includes 1 itself, "x>1x > 1" does not. So f(1)f(1) comes from the first line, and every number belongs to exactly one line. Basics: piecewise functions

2One-sided limits at a junction

The left-hand limit at 1 uses only x<1x < 1 (the formula x+2x + 2⁠); the right-hand limit uses only x>1x > 1 (the formula x−2x - 2⁠). If they differ, the limit at 1 does not exist. Basics: left-hand and right-hand limits

3Limits of lines

lim⁡x→c(x+a)=c+a\lim_{x\to c}(x + a) = c + a for any constant aa⁠, from either side (algebra of limits, Class XI). Basics: what a limit is

4Definition 1

For cc in the domain, ff is continuous at cc iff the left-hand limit, right-hand limit and f(c)f(c) exist and are equal; otherwise cc is a point of discontinuity. Lesson: continuity at a point

Solution

  1. The domain and the cases

    Every real number satisfies exactly one of x≤1x \le 1⁠, x>1x > 1⁠, so ff is defined at all points of the real line. We test an arbitrary real number cc in three cases: c<1c < 1⁠, c>1c > 1 and c=1c = 1⁠.

    The formula changes only at 1, so 1 is the only point where the two sides of a point can use different formulas. Every other point lies strictly inside one piece.
  2. Case 1: c<1c < 1

    Here f(c)=c+2f(c) = c + 2⁠. Every xx with ∣x−c∣<1−c|x - c| < 1 - c satisfies x<1x < 1⁠, so near cc⁠, on both sides, f(x)=x+2f(x) = x + 2⁠. Hence

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

    So ff is continuous at every real number less than 1.

    Within distance 1−c1 - c of cc we cannot reach 1, so only the formula x+2x + 2 is ever used. A limit only looks near cc⁠, so it is the limit of the line x+2x + 2⁠.
    For c=0.9c = 0.9⁠: every xx in (0.8,1)(0.8, 1) is less than 1. Basics: what a limit is
  3. Case 2: c>1c > 1

    Here f(c)=c−2f(c) = c - 2⁠. Every xx with ∣x−c∣<c−1|x - c| < c - 1 satisfies x>1x > 1⁠, so near cc we have f(x)=x−2f(x) = x - 2⁠, and

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

    So ff is continuous at every point x>1x > 1⁠.

    Same reasoning on the other side: a small enough interval around cc stays to the right of 1, where only x−2x - 2 is used.
  4. Case 3: c=1c = 1⁠, the value

    Since 1≤11 \le 1⁠, the first line applies:

    f(1)=1+2=3.f(1) = 1 + 2 = 3.
    The condition "x≤1x \le 1" includes the junction point; "x>1x > 1" does not. Using x−2x - 2 here would give −1-1⁠, which is not the value of ff at 1.
  5. Case 3: left-hand limit at 1

    For x<1x < 1⁠, f(x)=x+2f(x) = x + 2⁠:

    lim⁡x→1−f(x)=lim⁡x→1−(x+2)=1+2=3.\lim_{x\to 1^-} f(x) = \lim_{x\to 1^-}(x + 2) = 1 + 2 = 3.
    Numbers just below 1 obey the first line, so the left-hand limit is computed with x+2x + 2 only.
  6. Case 3: right-hand limit at 1

    For x>1x > 1⁠, f(x)=x−2f(x) = x - 2⁠:

    lim⁡x→1+f(x)=lim⁡x→1+(x−2)=1−2=−1.\lim_{x\to 1^+} f(x) = \lim_{x\to 1^+}(x - 2) = 1 - 2 = -1.
    xxf(x)f(x)which line
    0.90.92.92.9x≤1x \le 1
    0.990.992.992.99x≤1x \le 1
    1133x≤1x \le 1
    1.011.01−0.99-0.99x>1x > 1
    1.11.1−0.9-0.9x>1x > 1
    1.51.5−0.5-0.5x>1x > 1
    Numbers just above 1 obey the second line, and x−2x - 2 heads for 1−2=−11 - 2 = -1⁠. The table shows the values on the right staying near −1-1⁠, far from the values on the left near 3.
  7. Case 3: compare

    lim⁡x→1−f(x)=3,lim⁡x→1+f(x)=−1,f(1)=3.\begin{aligned} \lim_{x\to 1^-} f(x) &= 3, \\ \lim_{x\to 1^+} f(x) &= -1, \\ f(1) &= 3. \end{aligned}

    The left-hand and right-hand limits do not coincide (3≠−13 \ne -1⁠), so lim⁡x→1f(x)\lim_{x\to1} f(x) does not exist, and Definition 1 cannot hold. ff is not continuous at x=1x = 1.

    The value f(1)=3f(1) = 3 does match the left-hand limit, but that is not enough: continuity needs all three numbers to agree. The graph jumps by 3−(−1)=43 - (-1) = 4 at x=1x = 1⁠, so it cannot be drawn there without lifting the pen.
  8. Conclusion

    By Cases 1 and 2, ff is continuous at every c≠1c \ne 1⁠; by Case 3 it is not continuous at 1. So x=1x = 1 is the only point of discontinuity of ff.

    The three cases cover every real number, so no other point can be a point of discontinuity.
x y O −3 −1 3 −2 −1 1 3 (1, 3) (1, −1) y = x + 2, used for x ≤ 1 y = x − 2, used for x > 1 f(1) = 3 (belongs to the left piece) (1, −1) is not on the graph the jump of 4 at x = 1
The graph of ff (same scale on both axes; compare Fig 5.4). The gold line y=x+2y = x + 2 ends at the filled dot (1,3)(1, 3)⁠, which is on the graph because f(1)=3f(1) = 3⁠. The green line y=x−2y = x - 2 starts at the open circle (1,−1)(1, -1)⁠, which is not on the graph. The dashed segment is the jump of 4.
Result

ff is continuous at every real number except x=1x = 1⁠. At x=1x = 1⁠, lim⁡x→1−f(x)=3\lim_{x\to1^-} f(x) = 3 and lim⁡x→1+f(x)=−1\lim_{x\to1^+} f(x) = -1 differ, so x=1x = 1 is the only point of discontinuity of ff. This is the textbook's answer.

Check it with numbers

f(0.999)=2.999f(0.999) = 2.999 and f(1.001)=−0.999f(1.001) = -0.999⁠. Two inputs only 0.0020.002 apart give outputs almost 4 apart, however close to 1 we go. A continuous function cannot do that at a point.

Common mistakes
  1. Taking f(1)f(1) from the wrong line. "x≤1x \le 1" contains 1, so f(1)=3f(1) = 3⁠, not −1-1⁠.
  2. Stopping when f(1)f(1) equals the left-hand limit. The right-hand limit must also be checked; here it is −1-1⁠.
  3. Forgetting the other points. "Discuss the continuity" asks about every point, so Cases 1 and 2 are part of the answer.
What to take away
  1. For a piecewise function: continuity inside each piece follows from the piece's formula; every junction must be tested with separate left and right limits.
  2. A jump (unequal one-sided limits) cannot be repaired by changing the single value f(1)f(1)⁠; compare Example 4, where it could.
  3. Example 11 changes only the value at 1 (to 0) and reaches the same conclusion.

Every fact used, and where it comes from

FactUsed inSource
Each line of a piecewise rule applies only where its condition holdsSteps 1–6Definition of a piecewise function (Basics: piecewise functions)
lim⁡x→c(x+a)=c+a\lim_{x\to c}(x + a) = c + aSteps 2, 3, 5, 6Algebra of limits, Class XI (Limits and Derivatives) (Basics: limits)
Limit exists iff both one-sided limits exist and agreeStep 7Left and right hand limits, Class XI, recalled in Section 5.2 after Definition 1 (Basics: one-sided limits)
Continuous at cc iff LHL = RHL = f(c)f(c)⁠; point of discontinuitySteps 2, 3, 7, 8Definition 1, Section 5.2 (Lesson: continuity at a point)
Graph of ffFigureFig 5.4, Section 5.2
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 →