13.5 Continuity
Informally a function is continuous if its graph can be drawn without lifting the pen. The definition makes that precise using the limits just developed.
Definition 13.16 (Continuity at a point). A function \(f\) is continuous at \(x=a\) if \[\lim _{x\to a}f(x)=f(a).\] \(f\) is continuous on an interval if it is continuous at every point of it.
Note 13.17. That single equation quietly demands three separate things, and a function can fail on any one of them:
- (i).
- \(f(a)\) must be defined — the function has a value there;
- (ii).
- \(\lim \limits _{x\to a}f(x)\) must exist, so the two one-sided limits agree;
- (iii).
- the two must be equal.
Each failure looks different on a graph. Failing (i) leaves a hole with nothing in it. Failing (ii) leaves a jump. Failing (iii) — the odd case — leaves a hole with the value sitting somewhere off to one side.
This is where the earlier insistence that \(\lim _{x\to a}f(x)\) says nothing about \(f(a)\) pays off. Continuity is precisely the extra condition that ties the two together, and it is the reason limits of continuous functions can be evaluated by substitution — which is what we have been doing all along without saying so.
Example 13.18. Determine whether \[f(x)= \begin {cases} x+2, & x\leq -1\\ x^{2}, & -1<x<1\\ -x+1, & x\geq 1 \end {cases}\] is continuous at (i) \(x=-1\) and (ii) \(x=1\).
Solution. Only the joins need checking; on each open piece the function is a polynomial and therefore continuous.
(i) At \(x=-1\). Since \(x\leq -1\) uses the first branch, \(f(-1)=-1+2=1\). The one-sided limits are \[\lim _{x\to -1^{-}}f(x)=\lim _{x\to -1^{-}}(x+2)=1, \qquad \lim _{x\to -1^{+}}f(x)=\lim _{x\to -1^{+}}x^{2}=1 .\] Both equal \(1\), so the limit exists and equals \(1=f(-1)\). All three conditions hold and \(f\) is continuous at \(x=-1\).
(ii) At \(x=1\). Since \(x\geq 1\) uses the third branch, \(f(1)=-1+1=0\). But \[\lim _{x\to 1^{-}}f(x)=\lim _{x\to 1^{-}}x^{2}=1, \qquad \lim _{x\to 1^{+}}f(x)=\lim _{x\to 1^{+}}(-x+1)=0 .\] The one-sided limits differ, so \(\lim \limits _{x\to 1}f(x)\) does not exist and condition (ii) fails. \(f\) is discontinuous at \(x=1\), with a jump of \(1\) unit.
Note 13.19. The two joins of the same function behave differently, which is the point of the example: a piecewise function is not automatically broken at its joins, nor automatically continuous there. Each has to be checked, and the check is always the same three conditions.
Note also where the value \(f(1)=0\) came from. The third branch carries \(x\geq 1\), so \(x=1\) belongs to it and not to the middle branch. Reading the inequality signs carefully is half of these questions — had the middle branch been \(-1<x\leq 1\) the function would have been continuous from the left instead.
Which functions are continuous
Checking the definition at every point would be unbearable, and it is never necessary. Almost everything met in this course is continuous wherever it is defined, and the following two results are why.
Theorem 13.20 (Algebra of continuous functions). If \(f\) and \(g\) are continuous at \(x=a\), then so are \[f+g,\quad f-g,\quad fg,\quad \text {and}\quad \frac {f}{g}\ \ \text {provided } g(a)\neq 0 .\] If \(g\) is continuous at \(a\) and \(f\) is continuous at \(g(a)\), then the composite \(f\circ g\) is continuous at \(a\).
Theorem 13.21. Polynomials are continuous at every real number. A rational function is continuous everywhere except where its denominator vanishes. \(\sqrt {x}\) is continuous on \([0,\infty )\), and \(\sin x\), \(\cos x\), \(e^{x}\) are continuous on \(\mathbb {R}\).
Note 13.22. Together these settle almost every case at a glance. \(\frac {3x^{2}-1}{x-5}\) is continuous everywhere except \(x=5\); \(\sin \left (x^{2}+1\right )\) is continuous everywhere, being a composite of two continuous functions. The points worth examining are the exceptional ones — where a denominator vanishes, where an even root turns negative, and where a piecewise function changes branch.
That last case is the only one needing real work, because the algebra above says nothing about a join: each branch may be perfectly continuous and still fail to meet the next.
Kinds of discontinuity
When continuity fails at \(x=a\), the way it fails has a name.
- (i).
- Removable. The limit exists but \(f(a)\) is missing or wrong. The graph has a single hole, and defining (or redefining) \(f(a)\) to equal the limit repairs it — which is why it is called removable.
- (ii).
- Jump. The one-sided limits both exist but differ, so the graph steps from one level to another. No choice of \(f(a)\) can repair it.
- (iii).
- Infinite. The function grows without bound near \(a\), as \(\frac {1}{(x-3)^{2}}\) does at \(x=3\). Again beyond repair.
Note 13.23. The removable case is exactly the situation met throughout the section on limits of the form \(\frac {0}{0}\). When we cancelled \(\frac {x^{2}+x-2}{x-1}\) down to \(x+2\), we were replacing a function with a hole at \(x=1\) by one without — the two agree everywhere else, and the second is what the first was trying to be. The piecewise function of the previous example fails in the second way, with a jump of one unit at \(x=1\).
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.