Continuity and Differentiability · Lesson 1 of 8
Continuity and Continuous Functions
“Understand when nearby inputs lead to the expected output, and use limits, graphs, and function rules to test continuity.”
• Test continuity using one-sided limits and the actual value of a function. • Distinguish continuity at a point from continuity throughout a function’s domain. • Analyse piecewise, modulus, rational, and greatest integer functions. • Explain infinite behaviour near zero without treating infinity as a real number. • Use arithmetic and composition rules to establish continuity. • Find constants that make joined function pieces continuous.
What does it mean for a function to be continuous?
Imagine moving an input a little to the left or right of a chosen number. A continuous function responds with outputs approaching the output at that number. A graph can help us notice a jump or a misplaced point, but a limit gives us a precise test. This lesson connects those two ways of thinking.
Our earlier work with limits asked what f(x) approaches when x gets close to c. Continuity asks one more question: does that approaching value equal f(c)? Knowing only a limit does not tell us what value the function was assigned at the point. Knowing only f(c) does not tell us how neighbouring inputs behave. The development of calculus, associated with mathematicians such as Newton, depends on keeping these questions distinct.
Consider f(x)=1 for x≤0 and f(x)=2 for x>0. Inputs just below zero give 1, while inputs just above zero give 2. No single approaching value describes both sides. Now change the situation: let g(x)=1 for x≠0 but g(0)=2. Both sides approach 1, yet the assigned value is 2. Both functions fail continuity at zero, for different reasons.
For a point c in the domain, f is continuous at c when the limit of f(x), as x approaches c through its domain, equals f(c). At an ordinary interior point this means that the left limit, the right limit, and the assigned value all exist as finite numbers and are equal.
A reliable calculation has three parts. First find f(c) from the branch that actually includes c. Then find the left and right limits using the branches that apply near c. Finally compare all three results. A function is discontinuous at a point of its domain if this test fails; that point is called a point of discontinuity.
Problem
Check f(x)=2x+3 at x=1 and g(x)=x² at x=0.
- 1.For the first function, the assigned value is f(1)=2·1+3=5.
- 2.The limit is lim(x→1)(2x+3)=2·1+3=5, using the limit rules for sums and constant multiples. It equals the assigned value, so f is continuous at 1.
- 3.For the second function, g(0)=0²=0. Also lim(x→0)x²=0²=0.
- 4.The limit equals g(0), so g is continuous at zero. In both calculations we compared a limiting value with a separately identified function value.
Problem
Check the continuity of f(x)=|x| at zero.
- 1.The function value is f(0)=0. Write |x|=−x when x<0 and |x|=x when x≥0.
- 2.Approaching from the left gives lim(x→0⁻)(−x)=0. Approaching from the right gives lim(x→0⁺)x=0.
- 3.Both limits equal 0, which is also f(0). Therefore |x| is continuous at zero.
- 4.A change in the formula at a point does not by itself mean a discontinuity. The outputs, rather than the appearance of the formulas, decide the result.
Problem
Let f(x)=x³+3 for x≠0 and f(0)=1. Is f continuous at zero?
- 1.The special definition gives f(0)=1; substituting zero in x³+3 would use the wrong branch for the assigned value.
- 2.For nonzero x near zero the polynomial branch applies, so lim(x→0)f(x)=0³+3=3.
- 3.The limit 3 differs from the function value 1. Hence f is discontinuous at zero. Replacing f(0) by 3 would repair this particular mismatch.
Continuity depends on the domain
To call a whole function continuous, we test every point at which it is defined. This is why the instruction to draw a graph without lifting a pen is only an informal guide. A function may have a disconnected domain, so the drawing can have gaps even though continuity holds at every input that belongs to the domain.
A function is continuous when it is continuous at every point of its domain. Continuity on an interval means that the continuity test holds at all the relevant points of that interval.
On a closed interval [a,b], there may be no domain points to the left of a or to the right of b. At a, use the limit from inside the interval, namely the right-hand limit. At b, use the left-hand limit. We do not require behaviour at inputs that do not belong to the function’s domain.
The source also allows a function whose domain contains only one point. Such a function is continuous on that domain: there are no other domain inputs approaching the point that could violate continuity. This is the domain-based convention for isolated points; an ordinary two-sided limit over all real inputs is not the relevant test.
Problem
Show that a constant function f(x)=k and the identity function g(x)=x are continuous on the real line.
- 1.Choose any real input c. For the constant function, f(c)=k and every nearby output is also k.
- 2.Thus lim(x→c)f(x)=k=f(c). Since c was arbitrary, the constant function is continuous everywhere.
- 3.For the identity function, g(c)=c and lim(x→c)x=c.
- 4.Again the limit equals the value for every real c. The identity function is therefore continuous everywhere as well.
Problem
Explain why |x|, x³+x²−1, and a general polynomial are continuous functions.
- 1.For |x|, the previous example handled c=0. If c<0, the nearby formula is −x, whose limit is −c=|c|. If c>0, the nearby formula is x, whose limit is c=|c|. These cases cover the real line.
- 2.For p(x)=x³+x²−1, the limit rules give lim(x→c)p(x)=c³+c²−1=p(c) for every real c.
- 3.The same reasoning applies to p(x)=a₀+a₁x+⋯+aₙxⁿ: each power tends to the corresponding power of c, and a finite sum of these terms tends to p(c).
- 4.Thus every polynomial is continuous on the real line. This conclusion follows from limit laws; it is not an assumption based only on a smooth-looking drawing.
The reciprocal and the meaning of infinity
The reciprocal function illustrates why a domain restriction matters. It is perfectly well behaved near any nonzero input, but its outputs become unbounded near zero. We must distinguish being continuous on its domain from having a finite limit at an excluded input.
Problem
Discuss f(x)=1/x, with domain x≠0.
- 1.Choose any nonzero real number c. The quotient limit rule applies because its denominator tends to the nonzero number c.
- 2.It gives lim(x→c)1/x=1/c. This is exactly f(c).
- 3.Every point of the domain satisfies continuity. Therefore the reciprocal is a continuous function on its domain, even though zero is excluded.
Now approach zero from the positive side. The table records actual reciprocal values. Each extra factor of ten making the positive input smaller makes the output ten times larger. The outputs are not approaching an unusually large fixed number: they eventually exceed any fixed positive bound.
| Positive x | 1/x |
|---|---|
| 1 | 1 |
| 0.3 | 3.333… |
| 0.2 | 5 |
| 0.1 | 10 |
| 0.01 | 100 |
| 0.001 | 1000 |
| 10⁻ⁿ | 10ⁿ |
On the negative side the magnitudes grow in the same way, but the values become more negative. They eventually lie below any fixed negative bound. The signs of the two unbounded behaviours are different.
| Negative x | 1/x |
|---|---|
| −1 | −1 |
| −0.3 | −3.333… |
| −0.2 | −5 |
| −0.1 | −10 |
| −0.01 | −100 |
| −0.001 | −1000 |
| −10⁻ⁿ | −10ⁿ |
Always name the domain. The reciprocal has no value at zero, so we do not compare a limit with an invented f(0). On its given domain it is continuous. If we try to extend it by assigning any finite value at zero, the unbounded behaviour prevents continuity there.
Piecewise functions: inspect the joining inputs
Inside a region where one polynomial formula applies, continuity follows from that formula. The interesting work is at a boundary where the definition changes. Partition the domain into regions and boundary inputs, then test those boundary inputs carefully.
Problem
Compare f(x)=x+2 for x≤1, f(x)=x−2 for x>1, with g(x)=x+2 for x<1, g(1)=0, g(x)=x−2 for x>1.
- 1.For either function, a point c<1 has a neighbourhood using only x+2, so continuity holds there. At c>1 the formula x−2 similarly gives continuity.
- 2.At 1 the left limit is 1+2=3 and the right limit is 1−2=−1. The limits disagree.
- 3.The first function assigns f(1)=3; the second assigns g(1)=0. Neither assignment changes the two approaching values.
- 4.Both functions are discontinuous only at 1. No single replacement value at 1 can remove a jump with unequal one-sided limits.
Problem
Let f(x)=x+2 for x<0 and f(x)=−x+2 for x>0. Is the function continuous?
- 1.Its domain is all real numbers except zero. Every negative input has a neighbourhood on which f is the polynomial x+2.
- 2.Every positive input has a neighbourhood on which f is the polynomial −x+2. Continuity therefore holds at every domain point.
- 3.The given function is continuous on its domain. Both branches approach 2 at zero, so an extension defined by f(0)=2 would also be continuous on the whole real line.
- 4.The extension is a new definition. We must not silently act as though the original function already had a value at zero.
Problem
Let f(x)=x² for x<0 and f(x)=x for x≥0. Discuss continuity.
- 1.Away from zero, the relevant polynomial formula is continuous. Only zero needs a separate calculation.
- 2.At zero the second branch gives f(0)=0. The left limit of x² is 0 and the right limit of x is 0.
- 3.The one-sided limits agree with f(0). Hence the function is continuous at zero and at every other real input.
- 4.The change from a parabola to a line does not break continuity. Whether the slopes match will be a separate question in the next lesson.
Greatest integer functions and repeated jumps
A single formula can hide many joining points. The greatest integer function stays constant between consecutive integers, then moves to a new level. The same local argument at a general integer explains all of its discontinuities at once.
The notation [x], also written floor(x), means the greatest integer less than or equal to x. For example, [2.7]=2 and [−0.2]=−1. On the interval [n,n+1), where n is an integer, its value is n.
Problem
Show where f(x)=[x] is continuous and where it is discontinuous.
- 1.If c is not an integer, choose inputs close enough to c that no integer lies between them and c. Their greatest integer values are all [c]. Thus the limit is [c]=f(c).
- 2.If c=n is an integer, inputs just below n have value n−1, whereas inputs just above n have value n.
- 3.The left limit is n−1 and the right limit is n=f(n). The unequal limits imply a discontinuity at n.
- 4.Therefore the points of discontinuity are precisely all integers. The related function x−[x] has left limit 1 and right limit 0 at each integer, so it also has a jump at every integer.
Combining continuous functions
Once continuity is known for basic functions, limit laws allow us to build many more. This saves repeated point-by-point computations. The conditions of each rule matter, especially for division and for compositions whose inputs must stay in the outer function’s domain.
Suppose f and g are continuous at c. Then the limit of f(x)+g(x) is the sum of their limits: f(c)+g(c). This is exactly (f+g)(c), proving continuity of the sum. Replacing addition by subtraction or multiplication gives the corresponding proofs. The quotient rule for limits works only when g(c) is nonzero.
Problem
Explain why every rational function p(x)/q(x) is continuous wherever it is defined.
- 1.The numerator p and denominator q are polynomials, so they are continuous at every real input.
- 2.The domain of their quotient excludes the zeros of q. At any remaining input c, q(c)≠0, so the quotient continuity rule applies.
- 3.For example, (x²−25)/(x+5) equals x−5 for x≠−5. This makes its continuity on the original domain easy to see, but cancellation does not add −5 to that domain.
- 4.The limit at −5 is −10. We could create a continuous extension by assigning that value, but the uncancelled rational function itself excludes the input.
Sine and cosine are continuous on the real line. To see the sine argument, fix c and write x=c+h. The addition formula gives sin(c+h)=sin c cos h+cos c sin h. As h→0, cos h→1 and sin h→0. The expression therefore tends to sin c, the value at c. The cosine addition formula gives the parallel proof for cosine.
The other trigonometric functions follow by quotients. Since tan x=sin x/cos x, it is continuous wherever cos x≠0; the excluded inputs are the odd multiples of π/2. Similarly, sec x requires cos x≠0, while cot x and cosec x require sin x≠0. These are continuous on their respective domains, not at all real inputs.
If g is continuous at c and f is continuous at g(c), then f(g(x)) is continuous at c, provided the composition is defined near the inputs under consideration. The inner output must be a permitted input for the outer function.
Problem
Show that sin(x²) and |1−x+|x|| are continuous functions.
- 1.The inner function x² is continuous everywhere. Sine is continuous at every possible output x². Their composition sin(x²) is therefore continuous everywhere.
- 2.For the second function, |x| is continuous and so is the polynomial 1−x. Their sum g(x)=1−x+|x| is continuous.
- 3.Applying the continuous outer modulus function to g gives |g(x)|. Thus |1−x+|x|| is continuous everywhere.
- 4.The same reasoning establishes continuity of cos(x²), |cos x|, and sin|x| without lengthy piecewise expansions.
Choosing values that make pieces join
Some questions ask us to select a constant rather than merely detect a discontinuity. The goal is still the same: make both approaching values and the assigned value equal. A parameter can repair a mismatch only if changing it actually changes the necessary value.
Problem
First let f(x)=ax+1 for x≤3 and bx+3 for x>3. Then consider g(x)=5 for x≤2, ax+b for 2<x<10, and 21 for x≥10.
- 1.For f at 3, the left limit and value are 3a+1, while the right limit is 3b+3. Continuity requires 3a+1=3b+3, or a−b=2/3.
- 2.For g at 2, the middle branch must approach 5: 2a+b=5. At 10, it must approach 21: 10a+b=21.
- 3.Subtracting the equations gives 8a=16, hence a=2. Substitution gives b=1.
- 4.With these values the middle segment is 2x+1. Its values match both constant pieces at their joins, and each piece is already continuous away from those joins.
Problem
Let f(x)=k cos x/(π−2x) for x≠π/2 and f(π/2)=3. Find k for continuity at π/2.
- 1.At the joining input the assigned value is 3. The quotient gives 0/0 on direct substitution, so substitution alone does not find its limit.
- 2.Put x=π/2+h. Then cos x=−sin h and π−2x=−2h, so the quotient becomes (k/2)(sin h/h) for h≠0.
- 3.The known trigonometric limit sin h/h→1 gives a two-sided limit k/2.
- 4.Continuity requires k/2=3, hence k=6. Both approaches use the same transformed limit, which then matches the assigned value.
Problem
Let f(x)=λ(x²−2x) for x≤0 and f(x)=4x+1 for x>0. Can any λ make it continuous at zero? What happens at 1?
- 1.The value at zero and the left limit are λ·0=0 for every λ.
- 2.The right limit at zero is 4·0+1=1. Because the parameter never changes the zero on the left, no choice of λ can make the two limits agree.
- 3.At 1, nearby inputs all use 4x+1. Its limit is 5=f(1), so the function is continuous at 1 for every λ.
- 4.A discontinuity at one input does not prevent continuity at another input.
Problem
Define f(x)=x²sin(1/x) for x≠0 and f(0)=0. Discuss its continuity.
- 1.For x≠0, reciprocal, sine, and multiplication are continuous on the relevant domains, so f is continuous away from zero.
- 2.Although sin(1/x) oscillates as x→0, its value always lies between −1 and 1. Multiplying by x² gives −x²≤f(x)≤x².
- 3.Both bounding expressions approach 0. The squeezed function therefore also approaches 0.
- 4.This equals f(0), so the whole function is continuous. Oscillation alone is not decisive; the shrinking multiplier controls its size.
A piecewise definition may be continuous; a formula written in one line may be discontinuous. Cancellation preserves values only on the original domain. Matching one side to f(c) is insufficient if the other side disagrees. Always return to the actual domain, the two approaches, and the assigned value.
Check your understanding
These questions separate the parts of the continuity test and the conditions of the shortcut rules. Work out the limit or domain before selecting an answer. The practice that follows asks for explanations as well as calculations.
Quiz
At an interior domain point c, which condition establishes continuity?
On its stated domain x≠0, where is f(x)=1/x continuous?
At an integer n, what are the left and right limits of [x]?
Let f(x)=kx² for x≤2 and f(x)=3 for x>2. Which k makes f continuous at 2?
Which statement about f(x)=|x| is correct?
Why does x²sin(1/x) tend to zero as x→0?
If f and g are continuous at c, when may continuity of f/g be concluded from the quotient rule?
Let f(x)=x+2 for x<0 and −x+2 for x>0, with zero excluded. Which statement is correct?
Practice Problems
- Check continuity of 5x−3 at 0, −3, and 5, and of 2x²−1 at 3. State the function value and limit separately.
- Discuss continuity on their domains for x−5, 1/(x−5), (x²−25)/(x+5), and |x−5|. Explain why cancelling a factor does not restore an excluded input.
- Find all discontinuities of f(x)=|x|+3 for x≤−3, −2x for −3<x<3, and 6x+2 for x≥3. Test both boundary inputs.
- Analyse f(x)=|x|/x for x≠0 with f(0)=0, and g(x)=x/|x| for x<0 with g(x)=−1 for x≥0. Explain why their behaviour at zero differs.
- Compare the joins at x=1 of f(x)=x+1 for x≥1 and x²+1 for x<1, and g(x)=x¹⁰−1 for x≤1 and x² for x>1.
- For f(x)=3 on [0,1], 4 on (1,3), and 5 on [3,10], identify all discontinuities and explain the one-sided endpoint tests at 0 and 10.
- Show that f(x)=−2 for x≤−1, 2x for −1<x≤1, and 2 for x>1 is continuous. Compare it with f(x)=2x for x<0, 0 for 0≤x≤1, and 4x for x>1.
- Find k for continuity when f(x)=k cos x/(π−2x) for x≠π/2 and f(π/2)=3. Use x=π/2+h and sin h/h→1. Then find k when f(x)=kx+1 for x≤π and cos x for x>π.
- Find k so kx+1 for x≤5 joins continuously to 3x−5 for x>5. Explain how the condition differs from asking for continuity at an input away from 5.
- Discuss continuity of f(x)=sin x/x for x<0 and x+1 for x≥0, using sin x/x→1 at zero.
- Use continuity rules to analyse sin x±cos x, sin x cos x, cos(x²), |cos x|, sin|x|, and |x|−|x+1|. Give each function’s domain.
- Find constants a,b so 5 for x≤2, ax+b for 2<x<10, and 21 for x≥10 form a continuous function. Then justify why a jump with unequal one-sided limits cannot be repaired by changing only the value at the join.
Key Takeaways
• At an interior point, continuity requires the left limit, right limit, and assigned value to be equal. • Continuity of a whole function is tested on its actual domain; endpoints use the approach available inside the domain. • A changed point can cause discontinuity even when a limit exists, and a jump cannot be repaired by assigning one new value. • Polynomials, modulus, and trigonometric functions are continuous on their appropriate domains; quotient rules require a nonzero denominator. • Arithmetic operations and valid compositions build continuous functions from known ones. • Parameter fitting and bounded oscillation are applications of the same limit-based definition.
Previous
Start of chapter
Next · Lesson 2
Differentiability and the Chain Rule