[Intermediate] — The property that makes substitution legal, stated precisely — and the theorems it unlocks, one of which you already use to debug code.
Before you start
- You can evaluate limits and know when they fail — the limit of a function, limit laws.
What you will be able to do after this lesson:
- State the three conditions for continuity at a point.
- Classify a discontinuity as removable, jump or infinite.
- State the Intermediate Value Theorem and use it to prove a root exists.
- Explain why continuity is what justifies evaluating a limit by substitution.
1. The definition
is continuous at when three things all hold:
- is defined — the point exists
- exists — the function approaches something
- — and it approaches the value it actually has
All three are needed, and each can fail independently. The third is the interesting one: a function can be defined at a point and approach a different value there, as the piecewise example in the limits lesson showed.
Informally: you can draw the graph through without lifting your pen. That intuition is correct and is not a definition — the three conditions are.
NOTE
This is what makes substitution legal. Every time you evaluate by writing , you are using continuity — condition 3 says the limit equals the value, so computing the value answers the limit.
Polynomials are continuous everywhere, which is why substitution never fails for them. The moment a function is not continuous at the point, substitution is not a valid method and you need the techniques from the previous lessons.
2. Three ways to be discontinuous
Removable — the limit exists but disagrees with the value (or the value is missing). A single point is wrong; redefining it fixes everything.
The limit is 2; the function is undefined. Define and it becomes continuous — hence removable.
Jump — both one-sided limits exist but differ. No redefinition can fix it; the function genuinely leaps.
Infinite — the function grows without bound.
removable jump infinite
,-o-, ---, |
,' ', | ,--- |
' ' '----' |____
^ ^ ^
one point wrong a genuine step unbounded
3. Which functions are continuous
Continuous everywhere they are defined:
- polynomials (everywhere, no exceptions)
- , , (everywhere)
- rational functions, except where the denominator is zero
- for , for
And continuity survives combination: sums, differences, products, quotients (where the denominator is non-zero) and compositions of continuous functions are continuous.
Practical consequence: almost every function you write down is continuous almost everywhere, and the exceptions are exactly where you divided by something that can be zero, or took a root or log of something that can be non-positive. Those are also the places your code throws exceptions, which is not a coincidence.
4. The Intermediate Value Theorem
If is continuous on , then it takes every value between and somewhere in that interval.
Obvious once stated: to get from one height to another without lifting the pen, you must pass through every height between.
But it is not obvious that it needs continuity — and it does. goes from at to at without ever being 0, because it is not continuous on that interval.
Using it to prove a root exists
Does have a solution between 1 and 2?
is a polynomial, so continuous. It goes from to , so it must pass through somewhere in between. A root exists in — proved without finding it.
NOTE
This is bisection, and you have used it. Halve the interval, check which side changes sign, repeat. It is exactly binary search over a continuous domain, and it is how numerical root-finders work — see numerical methods.
It is also
git bisect: the “function” is does the build pass, the interval is your commit history, and you are finding where it changed sign.
5. The Extreme Value Theorem
A continuous function on a closed interval attains a maximum and a minimum on it.
Both conditions are necessary. On the open interval , gets arbitrarily close to 1 but never reaches it — no maximum. And a discontinuous function can jump over its own supremum.
This is what guarantees optimisation problems have answers, and it is why the applications lesson can talk about finding a maximum at all.
6. Practice — problems
- For , check all three conditions at . Is it continuous? What kind of discontinuity, and can it be removed?
- Where is discontinuous? Classify each.
- Find making continuous at .
- Use the IVT to show has a solution in . (Use , .)
- Explain why the IVT needs a closed interval and continuity, giving a counterexample for dropping each.
- Connect it to code. You are bisecting 1024 commits to find one that broke a test. How many builds must you run? Which theorem are you relying on, and what assumption about the bug does it encode?
Answers — open only after an attempt
- is defined ✓. Left limit , right limit — they disagree, so the limit does not exist ✗. It is a jump discontinuity and cannot be removed: no choice of fixes a genuine step.
- Discontinuous at and , where the denominator vanishes. Both are infinite discontinuities, since the numerator is non-zero there.
- Continuity needs : , so .
- Let . Then and . is continuous, so it crosses zero in — that crossing is the solution.
- Open interval: on never attains 1 (this breaks the Extreme Value Theorem). Discontinuity: on runs from to without ever equalling 0, so it skips an intermediate value.
- builds. You are relying on the Intermediate Value Theorem — and the assumption it encodes is that the test result changed exactly once, monotonically. If the bug was introduced and fixed and reintroduced, the “function” is not monotone and bisection can land on the wrong commit. That is why
git bisectmisleads on flaky tests.
Before moving on
- State the three conditions for continuity and give a function failing each.
- Classify removable, jump and infinite discontinuities.
- Explain why continuity is what makes substitution valid.
- Use the IVT to prove a root exists without finding it.
Recap: is continuous at when exists, the limit exists, and the two are equal — and that third condition is what makes evaluating a limit by substitution legitimate. Discontinuities are removable (one point wrong), jump (one-sided limits disagree) or infinite. Continuity guarantees the Intermediate Value Theorem, which proves roots exist without locating them and underpins bisection, and the Extreme Value Theorem, which guarantees optimisation problems on closed intervals have answers.
Next: The Precise Definition of a Limit — making “arbitrarily close” mean something exact.
Related
Software engineering
Infrastructure & security
Computer science
Hardware & engineering