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

Exercise 5.1 · Q30: Find aa⁠, bb⁠: 5, then ax+bax+b⁠, then 21 is continuous

Exercise 5.1Continuity of a function · Section 5.2
The question

30. Find the values of aa and bb such that the function defined by f(x)={5,if x≤2ax+b,if 2<x<1021,if x≥10f(x) = \begin{cases} 5, & \text{if } x \le 2 \\ ax + b, & \text{if } 2 < x < 10 \\ 21, & \text{if } x \ge 10 \end{cases} is a continuous function.

Exam answer

For x<2x < 2⁠, 2<x<102 < x < 10 and x>10x > 10⁠, ff is a constant or a polynomial, so it is continuous there. So ff must be continuous at x=2x = 2 and x=10x = 10⁠.

At x=2x = 2⁠: f(2)=5f(2) = 5⁠.

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

Continuity at x=2x = 2 gives

2a+b=5…(i)2a + b = 5\quad\ldots(\text{i})

At x=10x = 10⁠: f(10)=21f(10) = 21⁠.

LHL=lim⁡h→0f(10−h)=lim⁡h→0[a(10−h)+b]=10a+bRHL=lim⁡h→0f(10+h)=21\begin{aligned} \text{LHL} &= \lim_{h\to0}f(10 - h) \\ &= \lim_{h\to0}[a(10 - h) + b] \\ &= 10a + b \\ \text{RHL} &= \lim_{h\to0}f(10 + h) = 21 \end{aligned}

Continuity at x=10x = 10 gives

10a+b=21…(ii)10a + b = 21\quad\ldots(\text{ii})

Subtracting (i) from (ii): 8a=168a = 16⁠, so a=2a = 2⁠. Then from (i), b=5−4=1b = 5 - 4 = 1⁠.

∴ a=2\therefore\ a = 2 and b=1b = 1⁠.

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

The one idea this problem is built on

Each piece on its own is continuous (two constants and a straight line). The only places where ff can break are the two joints, x=2x = 2 and x=10x = 10⁠. The middle line must start at height 5 at x=2x = 2 and end at height 21 at x=10x = 10⁠. That gives two equations, 2a+b=52a + b = 5 and 10a+b=2110a + b = 21⁠, for the two unknowns: a=2a = 2⁠, b=1b = 1⁠.

Given, to find, and the plan
Given
A three-piece function: 5 up to and including 2, ax+bax + b strictly between 2 and 10, and 21 from 10 onwards. aa and bb are unknown constants.
To find
All aa⁠, bb for which ff is a continuous function, that is, continuous at every point of its domain.
Plan
(1) Find the domain and split it at 2 and 10. (2) Show ff is continuous inside each piece, whatever aa⁠, bb are. (3) Condition at x=2x = 2⁠. (4) Condition at x=10x = 10⁠. (5) Solve the two equations. (6) Confirm.

Basics you need

1Continuous function

A real function is continuous if it is continuous at every point of its domain (Definition 2, Section 5.2). So we must check every real number, not just the joints. Lesson: continuity at a point

2Continuity at a point

At a point cc of the domain: left-hand limit = right-hand limit = f(c)f(c) (Definition 1). Basics: left-hand and right-hand limits

3Reading a three-piece rule

"x≤2x \le 2" includes 2; "2<x<102 < x < 10" excludes both 2 and 10; "x≥10x \ge 10" includes 10. So f(2)f(2) comes from the first line and f(10)f(10) from the third. Basics: piecewise functions

4Constants and polynomials are continuous

Constant functions (Example 5) and polynomials such as ax+bax + b (Example 14) are continuous everywhere, so their limits are found by substituting. Basics: what a limit is

5Two linear equations in two unknowns

If both equations contain bb once, subtracting one from the other removes bb and leaves an equation in aa alone.

Solution

  1. The domain is all of R\R⁠, split at 2 and 10

    Every real number satisfies exactly one of x≤2x \le 2⁠, 2<x<102 < x < 10⁠, x≥10x \ge 10⁠, so ff is defined at every real number. The points to examine are

    • points c<2c < 2⁠, points with 2<c<102 < c < 10⁠, points c>10c > 10 (inside a piece);
    • the joints c=2c = 2 and c=10c = 10⁠.
    "Continuous function" means continuous at every point of the domain (Definition 2). Splitting the line this way covers every real number exactly once, so nothing is missed.
    Read the inequalities carefully: the three pieces meet at 2 and 10, and each of those points belongs to exactly one piece (Basic 3). Basics: piecewise functions
  2. Inside each piece, ff is continuous for every aa⁠, bb

    • If c<2c < 2⁠: every xx close enough to cc (closer than 2−c2 - c⁠) also satisfies x<2x < 2⁠, so near cc the function is the constant 5. Hence lim⁡x→cf(x)=5=f(c)\lim_{x\to c} f(x) = 5 = f(c)⁠.
    • If 2<c<102 < c < 10⁠: every xx close enough to cc also lies strictly between 2 and 10, so near cc⁠, f(x)=ax+bf(x) = ax + b⁠, a polynomial. Hence lim⁡x→cf(x)=ac+b=f(c)\lim_{x\to c} f(x) = ac + b = f(c)⁠.
    • If c>10c > 10⁠: near cc the function is the constant 21, so lim⁡x→cf(x)=21=f(c)\lim_{x\to c} f(x) = 21 = f(c)⁠.

    So ff is continuous at every point other than 2 and 10, whatever the values of aa and bb⁠.

    A limit at cc depends only on the values of ff near cc⁠. For a point strictly inside a piece we can stay so close to cc that we never leave that piece, and there ff is a constant or a straight line, both continuous. That is why only the joints can cause trouble.
    Constants: Example 5; polynomials: Example 14. Basics: what a limit is
  3. The joint x=2x = 2⁠: need 2a+b=52a + b = 5

    Value: 2≤22 \le 2⁠, so the first line applies and f(2)=5f(2) = 5⁠.

    Left-hand limit (only x<2x < 2⁠, first line):

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

    Right-hand limit (xx just above 2 lies in 2<x<102 < x < 10⁠, middle line):

    lim⁡x→2+f(x)=lim⁡x→2+(ax+b)=2a+b.\lim_{x\to2^+} f(x) = \lim_{x\to2^+} (ax + b) = 2a + b.

    Continuity at 2 needs 5=2a+b=55 = 2a + b = 5⁠, that is

    2a+b=5.(1)2a + b = 5. \qquad (1)
    The middle line is not used at x=2x = 2 itself (the inequality 2<x2 < x is strict), but it is what ff follows as xx comes down to 2 from the right. So it supplies the right-hand limit, and that has to match the value 5.
    Definition 1 at c=2c = 2⁠. Basics: left-hand and right-hand limits
  4. The joint x=10x = 10⁠: need 10a+b=2110a + b = 21

    Value: 10≥1010 \ge 10⁠, so the third line applies and f(10)=21f(10) = 21⁠.

    Left-hand limit (xx just below 10 lies in 2<x<102 < x < 10⁠, middle line):

    lim⁡x→10−f(x)=lim⁡x→10−(ax+b)=10a+b.\lim_{x\to10^-} f(x) = \lim_{x\to10^-} (ax + b) = 10a + b.

    Right-hand limit (only x>10x > 10⁠, third line):

    lim⁡x→10+f(x)=lim⁡x→10+21=21.\lim_{x\to10^+} f(x) = \lim_{x\to10^+} 21 = 21.

    Continuity at 10 needs 10a+b=21=2110a + b = 21 = 21⁠, that is

    10a+b=21.(2)10a + b = 21. \qquad (2)
    This time the middle line approaches the joint from the left. It has to arrive at the height 21 where the last piece is sitting.
    Definition 1 at c=10c = 10⁠. Lesson: continuity at a point
  5. Solve the two equations

    Subtract (1) from (2): the bb's cancel.

    (10a+b)−(2a+b)=21−58a=16a=2.\begin{aligned} (10a + b) - (2a + b) &= 21 - 5\\ 8a &= 16\\ a &= 2. \end{aligned}

    Put a=2a = 2 into (1): 4+b=54 + b = 5⁠, so b=1b = 1⁠.

    The two equations have exactly one solution, so a=2a = 2⁠, b=1b = 1 is the only choice. With any other pair, (1) or (2) fails and ff jumps at 2 or at 10.

    Both conditions are needed at once: ff must be continuous at 2 and at 10. Two conditions and two unknowns give one answer here because the lines in the (a,b)(a, b)-plane, 2a+b=52a + b = 5 and 10a+b=2110a + b = 21⁠, have different slopes and so cross at a single point.
    Elimination: subtract to remove one unknown (Basic 5).
  6. Confirm with a=2a = 2⁠, b=1b = 1

    The middle piece is now 2x+12x + 1⁠:

    JointLeft-hand limitRight-hand limitValue
    x=2x = 252(2)+1=52(2) + 1 = 5f(2)=5f(2) = 5
    x=10x = 102(10)+1=212(10) + 1 = 2121f(10)=21f(10) = 21

    All agree, and Step 2 covers every other point, so ff is continuous at every real number. ✓

    x y 2 4 6 8 10 12 5 10 15 21 (2, 5) (10, 21) y = 5 y = 2x + 1 y = 21
    With a=2a = 2⁠, b=1b = 1⁠: the level line y=5y = 5 (gold) runs into the filled dot (2,5)(2, 5)⁠; the line y=2x+1y = 2x + 1 (blue) climbs from there to the filled dot (10,21)(10, 21)⁠; the level line y=21y = 21 (green) carries on. The whole graph is one unbroken path.
    The picture makes the conditions concrete: the blue segment is the line through (2,5)(2, 5) and (10,21)(10, 21)⁠. Its slope is 21−510−2=168=2\frac{21 - 5}{10 - 2} = \frac{16}{8} = 2⁠, the value of aa we found.
Result

a=2a = 2 and b=1b = 1. Then f(x)=5f(x) = 5 for x≤2x \le 2⁠, 2x+12x + 1 for 2<x<102 < x < 10⁠, and 21 for x≥10x \ge 10⁠, which is continuous at every real number. No other pair works. (Textbook answer: a=2a = 2⁠, b=1b = 1⁠.)

Check it with numbers

With a=2a = 2⁠, b=1b = 1⁠: near 2, f(1.99)=5f(1.99) = 5 and f(2.01)=2(2.01)+1=5.02f(2.01) = 2(2.01) + 1 = 5.02⁠; near 10, f(9.99)=2(9.99)+1=20.98f(9.99) = 2(9.99) + 1 = 20.98 and f(10.01)=21f(10.01) = 21⁠. Both joints show values on the two sides closing in on f(2)=5f(2) = 5 and f(10)=21f(10) = 21⁠. ✓

Common mistakes
  1. Using only one joint. One equation cannot fix two unknowns; continuity is needed at 2 and at 10.
  2. Mixing up which line gives the value. f(2)=5f(2) = 5 and f(10)=21f(10) = 21⁠; the middle line gives neither value, only the limits from inside.
  3. Forgetting the other points. "Continuous function" means every point of the domain; Step 2 deals with the points inside the pieces.
What to take away
  1. For a piecewise function built from continuous pieces, only the joints need checking; inside a piece the function is one continuous formula.
  2. Each joint gives one equation. Two joints, two unknowns.
  3. Geometrically, the middle line must pass through the two end-points (2,5)(2, 5) and (10,21)(10, 21)⁠.

Every fact used, and where it comes from

FactUsed inSource
A continuous function is continuous at every point of its domainSteps 1, 2Definition 2, Section 5.2
Continuity at cc⁠: left-hand limit, right-hand limit and f(c)f(c) equalSteps 3, 4, 6Definition 1, Section 5.2 (Lesson: continuity at a point)
Constant functions are continuousSteps 2–4Example 5, Section 5.2
Polynomials (here ax+bax + b⁠) are continuousSteps 2–4Example 14, Section 5.2
Solving two linear equations by eliminationStep 5Algebra (pair of linear equations)
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 →