Continuous functions
🖨 Print a self-study sheet Why print?
Suppose a courier company charges for a parcel according to its mass (kg): thousand dong if , thousand dong if and thousand dong if . The graph of the fee is broken into separate pieces. By contrast, the temperature of a room changes all day long, and we draw its graph in one unbroken stroke.
Is the difference between "broken" and "unbroken" only a matter of drawing? Or can we say it in the language of limits that you have just learnt? The answer gives us a powerful tool: if an unbroken graph changes sign, it must cross the horizontal axis.
Explore: "unbroken" and "broken" seen through limits
Let be the fee function above and let . We compare the values of the two functions as approaches from both sides.
| 0.81 | 0.9801 | 1 | 1.0201 | 1.21 |
For f, the values to the left of x=1 are always 20 and the values to the right are always 30. We have \lim_{x\to1^-}f(x)=20 and \lim_{x\to1^+}f(x)=30. These limits are different, so f has no limit as x\to1. The graph is broken exactly at x=1.
For g, the values on both sides close in on 1, and 1 is exactly g(1). We have \lim_{x\to1}g(x)=1=g(1). The graph passes through x=1 without a break.
So "the graph is unbroken at x_0" means: as x approaches x_0, the value f(x) approaches exactly f(x_0).
Continuity at a point
Going deeper. The equality in the definition contains three conditions at once: f(x_0) is defined; the limit \lim_{x\to x_0}f(x) exists, that is, the left-hand and right-hand limits are equal; and these two numbers are equal. If any one condition fails, the function is discontinuous. In the courier example the second condition fails at x=1. In the next example a function has a limit but is still discontinuous, because the third condition fails.
The two conditions at the endpoints use one-sided limits only, because inside [a, b] we cannot approach a from the left of a. The graph of a function that is continuous on an interval is one unbroken curve over that interval.
We start with a function whose graph has a "hole".
Case a) shows that the graph can break even though the limit exists: changing the value at a single point destroys continuity. Now we test a function given by two formulas, where one-sided limits are the main tool.
Common continuous functions
Checking the definition at every point would take very long. Fortunately, the familiar functions are continuous on their domains.
Why? For a polynomial P(x), the rules for limits give \lim_{x\to x_0}x^k=x_0^k, and then the limits of sums and products give \lim_{x\to x_0}P(x)=P(x_0). A rational function \dfrac{P(x)}{Q(x)} is a quotient of two continuous polynomials, so it is continuous at every point where Q(x_0)\neq0, that is, at every point of its domain.
Notice that "continuous on its domain" does not mean the graph is unbroken over the whole line: the domain may consist of several separate intervals.
Another kind of function that appears every day is a bill with price tiers. The next problem also uses all four steps of problem solving.
The intermediate value theorem
A room starts at 18\,^\circ\text{C} and later reaches 30\,^\circ\text{C}, and the temperature changes continuously. Then at some moment the temperature is exactly 25\,^\circ\text{C}. This observation is true for every continuous function.
Why? The condition f(a)f(b)<0 means that the two end points of the graph lie on opposite sides of the horizontal axis. The graph of a continuous function is one unbroken curve, drawn without lifting the pen, so a curve that goes from one side to the other must cross the axis at least once.
Going deeper. The word "continuous" cannot be dropped. The function f(x)=-1 for x<0 and f(x)=1 for x\ge0 has f(-1)f(1)=-1<0, but f(x)=0 has no root, because f is discontinuous at 0. Also, the theorem tells us only that a root exists, not how many roots there are.
From the interval (0, 1) we can narrow down to an approximate root: f(0.3)=0.127>0 and f(0.4)=-0.136<0, so the root lies in (0.3, 0.4). Halving the interval again and again gives the root to any accuracy we like.
Connections. Continuity builds on the limits of functions that you have already met, and it is needed for the lessons that follow: a function that has a derivative at a point must be continuous at that point (see the derivative), and the exponential and logarithmic functions in exponential and logarithmic functions are continuous on their domains. In real life, a "continuous" function describes quantities that change smoothly (temperature, distance), while a "discontinuous" function describes quantities that change in steps (a delivery fee by mass).
Key terms
Summary
- f is continuous at x_0 when \lim_{x\to x_0}f(x)=f(x_0): f(x_0) is defined, the limit exists and the two values are equal.
- For a piecewise function, at the join we compare the left-hand limit, the right-hand limit and the value of the function.
- Polynomials are continuous on \mathbb{R}; rational and trigonometric functions are continuous on each interval of their domains; sums, differences and products are continuous, and quotients are continuous where the denominator is not 0.
- If f is continuous on [a, b] and f(a)f(b)<0, then f(x)=0 has at least one root in (a, b).
- Charging by tiers makes a bill continuous; charging in steps makes a fee discontinuous.
Practice
Each exercise comes with what you need and hints. Try it yourself first, then open the solution.
Let f(x)=x^2-3x+5. Show that f is continuous at x=2.
What you need: f is continuous at x_0 when \lim_{x\to x_0}f(x)=f(x_0).
Steps:
- Work out f(2).
- Work out \lim_{x\to2}f(x) and compare.
Show solution
The function f(x)=x^2-3x+5 is a polynomial, so it is defined on \mathbb{R}, in particular at x=2. The function f is continuous at x=2 if and only if \lim_{x\to2}f(x)=f(2).
We have f(2)=2^2-3\cdot2+5=4-6+5=3.
On the other hand, since f is a polynomial, \lim_{x\to2}\left(x^2-3x+5\right)=2^2-3\cdot2+5=3.
Hence \lim_{x\to2}f(x)=3=f(2).
So f is continuous at x=2.
Answer. f is continuous at x=2.
Test the continuity of the function f(x)=\begin{cases}\dfrac{x^2-x-6}{x-3}&\text{if }x\neq3,\\4&\text{if }x=3\end{cases} at x=3.
What you need: factorise the numerator to simplify; compare the limit with f(3).
Steps:
- Factorise x^2-x-6.
- Find \lim_{x\to3}f(x) and compare it with f(3).
Show solution
The function f is defined at x=3 with f(3)=4. We find the limit of f(x) as x\to3 and compare it with f(3).
For x\neq3, factorise the numerator: \frac{x^2-x-6}{x-3}=\frac{(x-3)(x+2)}{x-3}=x+2.
Therefore \lim_{x\to3}f(x)=\lim_{x\to3}(x+2)=5.
On the other hand f(3)=4, so \lim_{x\to3}f(x)=5\neq4=f(3).
So f is discontinuous at x=3.
Answer. f is discontinuous at x=3.
On which intervals is the function f(x)=\dfrac{2x-1}{x^2-4} continuous?
What you need: a rational function is continuous on each interval of its domain.
Steps:
- Find the values that make the denominator 0.
- Write the domain as a union of intervals.
Show solution
The function f(x)=\dfrac{2x-1}{x^2-4} is a rational function, so it is continuous on each interval contained in its domain.
Condition: x^2-4\neq0. We have x^2-4=0\Leftrightarrow x=2 or x=-2.
Hence the domain is \mathbb{R}\setminus\{-2, 2\}, which consists of the three intervals (-\infty, -2), (-2, 2) and (2, +\infty).
So f is continuous on the intervals (-\infty, -2), (-2, 2) and (2, +\infty).
Answer. (-\infty, -2), (-2, 2), (2, +\infty).
Test the continuity of the function f(x)=\begin{cases}x^2-1&\text{if }x<2,\\2x-1&\text{if }x\ge2\end{cases} at x=2.
What you need: compare the left-hand limit, the right-hand limit and f(2).
Steps:
- Work out f(2) using the second formula.
- Work out the two one-sided limits.
Show solution
The function f is given by two different formulas on the two sides of x=2, so we compute f(2) and the two one-sided limits at x=2.
Since 2\ge2, we have f(2)=2\cdot2-1=3.
Left-hand limit (for x<2, f(x)=x^2-1): \lim_{x\to2^-}f(x)=\lim_{x\to2^-}\left(x^2-1\right)=2^2-1=3.
Right-hand limit (for x>2, f(x)=2x-1): \lim_{x\to2^+}f(x)=\lim_{x\to2^+}(2x-1)=2\cdot2-1=3.
Since \lim_{x\to2^-}f(x)=\lim_{x\to2^+}f(x)=3, we get \lim_{x\to2}f(x)=3. This equals f(2)=3.
So f is continuous at x=2.
Answer. f is continuous at x=2.
Suppose a water company (made-up numbers) charges, in thousand dong, according to the volume x (m³) of water used: W(x)=8x if 0\le x\le10 and W(x)=12x if x>10 (a price of 12 thousand dong for all the water once the customer uses more than 10 m³). Is W continuous at x=10? Work out the bill for 10 m³ and for 10.1 m³ and comment.
What you need: compare the left-hand limit, the right-hand limit and W(10).
Steps:
- Work out W(10), \lim_{x\to10^-}W(x) and \lim_{x\to10^+}W(x).
- Work out W(10.1).
Show solution
We have W(10)=80, \lim_{x\to10^-}8x=80 and \lim_{x\to10^+}12x=120. The two limits are different, so W is discontinuous at x=10.
We have W(10)=80 and W(10.1)=12\cdot10.1=121.2. An extra 0.1 m³ raises the bill by 41.2 thousand dong, which is unreasonable.
So W is discontinuous at x=10, and this way of charging makes the bill jump suddenly.
Answer. W is discontinuous at x=10; 80 thousand dong and 121.2 thousand dong.
The temperature T(t) (^\circ\text{C}) in a laboratory is recorded continuously: it is 18\,^\circ\text{C} at 6 a.m. and 30\,^\circ\text{C} at 2 p.m. Show that at some moment between 6 a.m. and 2 p.m. the temperature is exactly 25\,^\circ\text{C}.
What you need: the intermediate value theorem for a function that is continuous on a closed interval.
Steps:
- Let g(t)=T(t)-25.
- Work out g(6) and g(14).
Show solution
Let g(t)=T(t)-25. Since T is continuous on [6, 14], so is g.
We have g(6)=18-25=-7 and g(14)=30-25=5, so g(6)g(14)<0. Hence there is t_0\in(6, 14) with g(t_0)=0, that is T(t_0)=25.
So at some moment the temperature is exactly 25\,^\circ\text{C}.
Answer. There is a moment t_0\in(6, 14) with T(t_0)=25.
Consider the function f(x)=\begin{cases}\dfrac{x^2-1}{x-1}&\text{if }x\neq1,\\3&\text{if }x=1.\end{cases} Decide whether each statement is true or false.
a) f(1)=3.
b) \lim_{x\to1}f(x)=3.
c) The function f is not continuous at x=1.
d) The function f is continuous on the interval (1, +\infty).
What you need: simplify the fraction for x\neq1; compare the limit with f(1).
Steps:
- Simplify \dfrac{x^2-1}{x-1}.
- Check each statement.
Show solution
We have f(x)=\dfrac{x^2-1}{x-1} for x\neq1 and f(1)=3. For x\neq1: f(x)=\frac{(x-1)(x+1)}{x-1}=x+1.
a) True. By the definition of the function, f(1)=3.
b) False. Since f(x)=x+1 for all x\neq1, we have \lim_{x\to1}f(x)=\lim_{x\to1}(x+1)=2, not 3.
c) True. We have \lim_{x\to1}f(x)=2\neq3=f(1), so f is not continuous at x=1.
d) True. For every x>1 we have f(x)=x+1, a polynomial, which is continuous on \mathbb{R}; hence f is continuous on the interval (1, +\infty).
So statements a), c), d) are true; statement b) is false.
Answer. a) True; b) False; c) True; d) True.
The equation x^3+2x-5=0 has a root in the interval (1, 2). Find this root, rounded to 2 decimal places.
What you need: halve the interval that contains the root, using the intermediate value theorem.
Steps:
- Check that f(1)f(2)<0 for f(x)=x^3+2x-5.
- Narrow down the interval with a scientific calculator, then round.
Show solution
We have f(1)=-2 and f(2)=7, so the root lies in (1, 2). We have f(1.3)=-0.203<0 and f(1.4)=0.544>0, so the root lies in (1.3, 1.4). Narrowing down further, we get the approximate root 1.328\ldots
So the root is approximately 1.33.
Answer. 1.33.
Revision of one-sided limits. Let f(x)=\dfrac{1}{x-1}. On which intervals is f continuous? Work out \lim_{x\to1^-}f(x) and \lim_{x\to1^+}f(x), and describe the shape of the graph of f near x=1.
What you need: the sign of x-1 as x approaches 1 from each side.
Steps:
- Find the domain.
- If x<1 then x-1<0; if x>1 then x-1>0.
Show solution
The domain is \mathbb{R}\setminus\{1\}, so f is continuous on (-\infty, 1) and (1, +\infty).
As x\to1^-, the denominator tends to 0 through negative values, so \lim_{x\to1^-}f(x)=-\infty. As x\to1^+, the denominator tends to 0 through positive values, so \lim_{x\to1^+}f(x)=+\infty.
So the graph has two separate branches, with the line x=1 as a vertical asymptote.
Answer. Continuous on (-\infty, 1) and (1, +\infty); -\infty and +\infty.
Show that the equation \cos x=x has a root in the interval (0, 1) (with x in radians).
What you need: the difference of two continuous functions is continuous; the intermediate value theorem.
Steps:
- Let f(x)=\cos x-x and show that f is continuous on [0, 1].
- Work out f(0) and f(1) (use a calculator in radian mode).
Show solution
Let f(x)=\cos x-x. The functions \cos x and the polynomial x are both continuous on \mathbb{R}, so f is continuous on [0, 1].
We have f(0)=1>0 and f(1)=\cos1-1\approx-0.46<0, so f(0)f(1)<0.
Hence the equation f(x)=0 has at least one root in (0, 1).
So the equation \cos x=x has a root in the interval (0, 1).
Answer. There is a root in (0, 1).
Mini test
Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.
Part I. Multiple choice
A polynomial is continuous on \mathbb{R}. The functions in A and B are undefined at some points, and the function in D is defined only for x\ge0.
For x\neq2, f(x)=\dfrac{(x-2)(x+1)}{x-2}=x+1, so \lim_{x\to2}f(x)=3=f(2). Option B forgets that f(2)=3, C works out the limit wrongly, and D confuses the form \dfrac{0}{0} with a limit that does not exist.
For f(x)=x^3-3x-1 we have f(1)=-3 and f(2)=1, so f(1)f(2)<0. In A, D and C the values f(1) and f(2) have the same sign, and these equations have no root in (1, 2).
The left-hand and right-hand limits are both 2, so \lim_{x\to1}f(x)=2\neq f(1)=3. Option B is wrong because the one-sided limits are equal; A and D leave out the condition \lim f=f(x_0).
Part II. True or false
| a) The function C is not continuous at x=5 because it is given by two formulas. | ||
| b) \lim_{x\to5^+}C(x)=50. | ||
| c) C(8)=110. | ||
| d) C(7)=100. |
a) False: C(5)=50, \lim_{x\to5^-}C(x)=50 and \lim_{x\to5^+}C(x)=50, so C is continuous at 5 even though it has two formulas. b) True: 50+20\cdot0=50. c) True: 50+20\cdot3=110. d) False: C(7)=50+20\cdot2=90.
Part III. Short answer
For f(x)=x^3+x-1 we have f(0)=-1<0 and f(1)=1>0, so there is a root in (0, 1). Narrowing down the interval with a calculator, we get the approximate root 0.682\ldots\approx0.68.
T(120)=3\cdot120-75=285 (thousand dong).
Show answers and explanations
- Part I, question 1: D. A polynomial is continuous on \mathbb{R}. The functions in A and B are undefined at some points, and the function in D is defined only for x\ge0.
- Part I, question 2: A. For x\neq2, f(x)=\dfrac{(x-2)(x+1)}{x-2}=x+1, so \lim_{x\to2}f(x)=3=f(2). Option B forgets that f(2)=3, C works out the limit wrongly, and D confuses the form \dfrac{0}{0} with a limit that does not exist.
- Part I, question 3: B. For f(x)=x^3-3x-1 we have f(1)=-3 and f(2)=1, so f(1)f(2)<0. In A, D and C the values f(1) and f(2) have the same sign, and these equations have no root in (1, 2).
- Part I, question 4: C. The left-hand and right-hand limits are both 2, so \lim_{x\to1}f(x)=2\neq f(1)=3. Option B is wrong because the one-sided limits are equal; A and D leave out the condition \lim f=f(x_0).
- Part II, question 1: a) False; b) True; c) True; d) False. a) False: C(5)=50, \lim_{x\to5^-}C(x)=50 and \lim_{x\to5^+}C(x)=50, so C is continuous at 5 even though it has two formulas. b) True: 50+20\cdot0=50. c) True: 50+20\cdot3=110. d) False: C(7)=50+20\cdot2=90.
- Part III, question 1: 0.68. For f(x)=x^3+x-1 we have f(0)=-1<0 and f(1)=1>0, so there is a root in (0, 1). Narrowing down the interval with a calculator, we get the approximate root 0.682\ldots\approx0.68.
- Part III, question 2: 285. T(120)=3\cdot120-75=285 (thousand dong).