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

Exercise 5.1 · Q5: xx for x≤1,x\le1, 55 for x>1x>1⁠: continuous at 0, 1, 2?

Exercise 5.1Continuity of piecewise functions · Section 5.2
The question

Is the function ff defined by f(x)={x,if x≤15,if x>1f(x) = \begin{cases} x, & \text{if } x \le 1 \\ 5, & \text{if } x > 1 \end{cases} continuous at x=0x = 0⁠? At x=1x = 1⁠? At x=2x = 2⁠?

Exam answer

At x=0x = 0⁠:

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

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

At x=1x = 1⁠:

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

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

At x=2x = 2⁠:

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

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

Hence ff is continuous at x=0x = 0 and at x=2x = 2⁠, but not continuous at x=1x = 1⁠.

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

The one idea this problem is built on

Near a point that is well inside one piece, ff is given by a single simple formula, so it behaves like that formula: xx near 0, the constant 5 near 2. At the point x=1,x = 1, where the formula switches, the two sides must be checked separately. From the left ff approaches 1; from the right it is stuck at 5. The two one-sided limits disagree, so the graph jumps and ff is not continuous at 1.

Given, to find, and the plan
Given
f(x)=xf(x) = x for x≤1x \le 1 and f(x)=5f(x) = 5 for x>1,x > 1, defined for every real x.x.
To find
Whether ff is continuous at x=0,x = 0, at x=1x = 1 and at x=2.x = 2.
Plan
At each point: decide which piece the point and its neighbours use, then compute the left-hand limit, the right-hand limit and the value separately, and compare.

Basics you need

1Continuity at a point

ff is continuous at cc (in its domain) when the left-hand limit, the right-hand limit and f(c)f(c) are all equal (Definition 1, Section 5.2). If the two one-sided limits differ, ff is not continuous at c.c. Lesson: continuity at a point

2Reading a piecewise function

To evaluate ff at a number, first decide which condition the number satisfies, then use only that piece. The point x=1x = 1 itself satisfies x≤1,x \le 1, so f(1)=1.f(1) = 1. Basics: piecewise functions

3One-sided limits with a small step hh

With h>0h > 0⁠: LHL at cc is lim⁡h→0f(c−h)\lim_{h\to0} f(c-h) and RHL is lim⁡h→0f(c+h).\lim_{h\to0} f(c+h). Since hh is small, it is enough to look at 0<h<0 < h < some fixed number. Basics: left-hand and right-hand limits

Solution

  1. The domain and the switching point

    Every real number satisfies exactly one of x≤1x \le 1 and x>1,x > 1, so ff is defined on all of R.\R. The formula changes only at x=1.x = 1. Of the three points asked about, 0 lies inside the first piece, 2 inside the second, and 1 is the switching point.

    Locating the points relative to the switch tells us where to expect trouble: only at 1. But each point still gets its own three-number check.
  2. At x=0x = 0⁠: continuous

    Take 0<h<1.0 < h < 1. Then −h-h and hh are both less than 1, so the first piece f(x)=xf(x) = x applies to both.

    Left-hand limit. lim⁡h→0f(−h)=lim⁡h→0(−h)=0.\lim_{h\to0} f(-h) = \lim_{h\to0} (-h) = 0.

    Right-hand limit. lim⁡h→0f(h)=lim⁡h→0h=0.\lim_{h\to0} f(h) = \lim_{h\to0} h = 0.

    Value. 0≤1,0 \le 1, so f(0)=0.f(0) = 0.

    All three are 0, so ff is continuous at x=0x = 0.

    Restricting to h<1h < 1 keeps both nearby points in the piece x≤1.x \le 1. That is allowed because a limit only depends on values very close to the point.
    LHL = RHL = f(c)f(c)⁠: continuous. Basics: left-hand and right-hand limits
  3. At x=1x = 1⁠: the two sides disagree

    Value. 1≤1,1 \le 1, so the first piece applies: f(1)=1.f(1) = 1.

    Left-hand limit. For h>0,h > 0, 1−h<1,1 - h < 1, so f(1−h)=1−hf(1 - h) = 1 - h⁠:

    lim⁡x→1−f(x)=lim⁡h→0(1−h)=1.\lim_{x\to1^-} f(x) = \lim_{h\to0} (1 - h) = 1.

    Right-hand limit. For h>0,h > 0, 1+h>1,1 + h > 1, so f(1+h)=5f(1 + h) = 5⁠:

    lim⁡x→1+f(x)=lim⁡h→05=5.\lim_{x\to1^+} f(x) = \lim_{h\to0} 5 = 5.

    The left-hand limit (1) and the right-hand limit (5) are different, so lim⁡x→1f(x)\lim_{x\to1} f(x) does not exist, and ff is not continuous at x=1x = 1.

    Points just right of 1 (like 1.001) belong to the second piece and have value 5, however close they are to 1. So the graph jumps from height 1 up to height 5 at x=1.x = 1. Note that f(1)f(1) agrees with the left side; that does not help, because continuity needs both sides to agree with f(1).f(1).
    Same pattern as Example 10: unequal one-sided limits mean a jump.
  4. At x=2x = 2⁠: continuous

    Take 0<h<1.0 < h < 1. Then 2−h>12 - h > 1 and 2+h>1,2 + h > 1, so the second piece f(x)=5f(x) = 5 applies to both.

    Left-hand limit. lim⁡h→0f(2−h)=lim⁡h→05=5.\lim_{h\to0} f(2 - h) = \lim_{h\to0} 5 = 5.

    Right-hand limit. lim⁡h→0f(2+h)=lim⁡h→05=5.\lim_{h\to0} f(2 + h) = \lim_{h\to0} 5 = 5.

    Value. 2>1,2 > 1, so f(2)=5.f(2) = 5.

    All three are 5, so ff is continuous at x=2x = 2.

    x y −2 −1 1 2 3 −2 −1 1 2 3 4 5 6 O (1, 1) = f(1) (1, 5) not on the graph x = 0 x = 2
    The graph of ff⁠: the line y=xy = x up to the filled point (1,1),(1, 1), then the horizontal line y=5y = 5 starting just after x=1x = 1 (open circle at (1,5),(1, 5), which is not on the graph). Around x=0x = 0 and x=2x = 2 (green) the graph is unbroken; at x=1x = 1 it jumps.
    Near 2, ff is the constant 5, and a constant function is continuous at every point (Example 5). The jump at 1 is too far away to matter: once h<1,h < 1, the points 2±h2 \pm h never reach it.
Result

ff is continuous at x=0x = 0 and at x=2,x = 2, but not continuous at x=1x = 1, where the left-hand limit is 1 and the right-hand limit is 5. (Textbook answer: "ff is continuous at x=0x = 0 and x=2x = 2⁠; Not continuous at x=1x = 1".)

Check it with numbers
  • Near 0: f(−0.001)=−0.001,f(-0.001) = -0.001, f(0.001)=0.001,f(0.001) = 0.001, f(0)=0.f(0) = 0. All close together.
  • Near 1: f(0.999)=0.999f(0.999) = 0.999 but f(1.001)=5,f(1.001) = 5, with f(1)=1.f(1) = 1. A gap of about 4 that does not shrink.
  • Near 2: f(1.999)=5,f(1.999) = 5, f(2.001)=5,f(2.001) = 5, f(2)=5.f(2) = 5.
Common mistakes
  1. Using the wrong piece at x=1.x = 1. The condition x≤1x \le 1 includes 1, so f(1)=1,f(1) = 1, not 5.
  2. "f(1)f(1) equals the left-hand limit, so ff is continuous at 1." Both one-sided limits must equal f(1)f(1)⁠; the right-hand limit is 5.
  3. "There is a jump somewhere, so ff is discontinuous at 0 and 2 too." Continuity is a property at each point separately; near 0 and near 2 the jump at 1 plays no part.
What to take away
  1. For a piecewise function, a point strictly inside a piece inherits the continuity of that piece's formula.
  2. At a switching point, compute both one-sided limits from the correct pieces and f(c)f(c) from the piece whose condition includes c.c.
  3. Unequal one-sided limits mean a jump: not continuous, whatever value f(c)f(c) has.

Every fact used, and where it comes from

FactUsed inSource
Continuity at cc⁠: LHL, RHL and f(c)f(c) exist and are equalSteps 2–4Definition 1, Section 5.2 (Lesson: continuity at a point)
Evaluating a piecewise function by its conditionsSteps 1–4Basics: piecewise functions
One-sided limits as lim⁡h→0f(c∓h),\lim_{h\to0} f(c\mp h), h>0h > 0⁠; a limit depends only on nearby valuesSteps 2–4Class XI Limits (Basics: one-sided limits)
Constant functions are continuousStep 4Example 5
A jump at the switching point of a two-piece functionStep 3Example 10
Values in the check box and the graph coordinatesCheck; figureRecomputed in the site's verification script
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 →