Continuity on an interval and of piecewise functions ·… | StemPy Lab
Course 9.1·Lesson 2 of 3
Continuity on an interval and of piecewise functions
A function is continuous on an interval when it is continuous at every point of it. On a closed interval the end points need one-sided continuity. Sums, differences, products, quotients and compositions of continuous functions are continuous, and polynomials, sine, cosine and exponentials are continuous everywhere. For a piecewise function, check each joining point.
about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
decide whether a function is continuous on an open or a closed interval;
use the algebra of continuous functions to find where a formula is continuous;
find the constants that make a piecewise function continuous.
Continuity on an interval
A function is continuous on an open interval(a,b) when it is continuous at every point of (a,b).
For a closed interval[a,b] the two end points have only one side. So f is continuous on [a,b] when
it is continuous at every point of (a,b),
x→a+limf(x)=f(a), and
x→b−limf(x)=f(b).
For example, f(x)=x is continuous on [0,∞). At x=0 only the right-hand limit makes sense, and it equals 0=f(0).
Building continuous functions from simple ones
The limit laws give a short list of rules. Suppose f and g are continuous at a. Then these are continuous at a too:
the sum f+g, the difference f−g, and a constant multiple cf;
the product fg;
the quotient gf, provided g(a)=0;
the composite f(g(x)), provided f is continuous at g(a).
The standard functions are continuous wherever they are defined.
Polynomials, ∣x∣, sinx, cosx and ex are continuous for every real x.
A rational function q(x)p(x) is continuous wherever q(x)=0.
lnx is continuous for x>0, and tanx is continuous except at x=2π+nπ.
The inverse trigonometric functions are continuous on their domains.
For example, ∣x2−4x∣sinx is continuous everywhere. It is built from a polynomial, the absolute value and the sine by composition and products.
The greatest integer function [x] is the exception to remember. It is constant between integers, so it is continuous there, and it jumps at every integer.
A note on words
NCERT calls f(x)=x1 a continuous function, because it is continuous at every point of its domain, and 0 is not in the domain. Many A-Level, IB and AP texts say instead that it has an infinite discontinuity at x=0. Both describe the same graph. They differ on whether a point outside the domain counts. Follow the wording of the question.
Piecewise functions
A piecewise function has a different formula on different intervals. Each piece is a standard function, so it is continuous inside its own interval. Only the joining points need a check.
At each joining point a, find the left-hand limit from the piece on the left.
Find the right-hand limit from the piece on the right.
Read off f(a).
Set all three equal. Each joining point gives one equation, so two unknown constants need two joining points.
The graph of a piecewise function. For x below 2 it is the blue line y = 2x + 3, which reaches height 7 at x = 2. For x above 2 it is the blue curve y = x squared + 3, which also reaches height 7 at x = 2. A red dot at (2, 7) marks the value of the function, and the two pieces meet at it with no gap.
A worked example
A function is defined by f(x)=2x+p for x<2, f(2)=7, and f(x)=x2−q for x>2. Find p and q so that f is continuous at x=2.
Left-hand limit. As x→2−, f(x)→2(2)+p=4+p. Set 4+p=7. Then p=3.
Right-hand limit. As x→2+, f(x)→22−q=4−q. Set 4−q=7. Then q=−3.
Check. The pieces are now 2x+3 and x2+3. Both give 7 at x=2.
Practise with new numbers
Try it in Python
The program takes the function of the worked example and tries p=0,1,…,5. For each p it prints the left-hand limit and the gap between it and the value 7.
Common mistakes
Checking every point. Inside a piece the function is already continuous. Check the joining points only.
Using the wrong piece. The left-hand limit uses the formula for x below a. The right-hand limit uses the formula for x above a.
Forgetting the middle value. When f(a) has its own value, as in f(2)=7, all three numbers must agree.
Ignoring the domain of a quotient. A rational function is discontinuous where its denominator is zero.
Remember these
Continuous on [a,b] means continuous inside, right-continuous at a and left-continuous at b.
Sums, products, quotients (with a nonzero denominator) and compositions of continuous functions are continuous.
For a piecewise function, check each joining point: left-hand limit, right-hand limit and value must be equal.
[x] is continuous between integers and jumps at every integer.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Where is f(x)=x2−9x−1 discontinuous?
Let f(x)=2x+1 for x≤2 and f(x)=kx for x>2. Find k so that f is continuous at 2.
Is [x] continuous on the open interval (2,3)?
Define f(x)=xsinx for x=0 and f(0)=1. Is f continuous at 0?
Is tanx continuous on the closed interval [0,2π]?
References
OpenStax, Calculus Volume 1, Chapter 2, section on continuity.
NCERT, Mathematics Part I for Class XII, Chapter 5, section on continuity.
Enroll free in Continuity of Functions
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.