Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Getting closer and closer
Stand 1 metre from a wall. Step halfway to it, then halfway again, and again. You’re 0.5 m away, then 0.25 m, then 0.125 m… You never touch the wall, but you’re clearly heading to it. Mathematicians say the distance has a limit of 0.
No jumps
Draw a line without lifting your pencil. That’s a continuous function. A light switch is not continuous: it jumps from off to on.
If a robot’s distance to a wall is positive now and negative later, it must have touched the wall in between, because distance changes continuously. That simple fact lets collision-checking software find the exact moment of contact.
- 1. 1 m from a wall, you step halfway three times. Distance left?
- 2. 0.9, 0.99, 0.999, … is heading to…
- 3. A light switch jumping from off to on is…
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Notation
This means: as gets close to (but not equal to it), gets close to . The value at doesn’t matter. It may not even exist.
Example. is undefined at . For , it equals , so .
- One-sided limits: (from the left) and (from the right). The limit exists when both agree.
- Continuity at a: . You can plug the point in.
- Limit laws: limits of sums, products and quotients (with a nonzero denominator) are the sums, products and quotients of the limits. Polynomials, exp, sin and cos are continuous everywhere.
- 1. lim_{x→3} (2x + 1) = ?
- 2. lim_{x→2} (x² − 4)/(x − 2) = ?
- 3. lim_{x→∞} 1/x = ?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.The precise definition (ε–δ)
It’s a game. You challenge me with a tolerance , and I must find a window around where stays within of . For at , the choice always wins, because . Try the game in the demo above.
Important limits
| Limit | Value | How |
|---|---|---|
| 1 | squeeze theorem (geometry) | |
| definition of | ||
| 3 | divide by | |
| 0 | squeeze between | |
| none | oscillates |
Kinds of discontinuity
- Removable: a hole, as in .
- Jump: the one-sided limits differ, as in a step function or a thresholded classifier.
- Infinite: .
- Oscillating: .
Limits on a computer
Numerically, you approach a limit by evaluating closer and closer. Floating point has about 16 digits, though. Subtracting nearly equal numbers (catastrophic cancellation) destroys them all.
- 1. lim_{x→0} sin(3x)/x = ?
- 2. For f = 3x + 1 at a = 2 and ε = 0.3, the best δ is…
- 3. A step function at its jump has…
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.An ε–δ proof
Claim. is continuous at .
Proof. We have . If , then . Given , choose . Then . ∎
The big theorems about continuous functions on
If is continuous on and lies between and , then for some .
Proof idea. Suppose , and let . This uses the completeness of the real numbers: every bounded set has a least upper bound. If , continuity keeps negative a bit to the right of , contradicting the sup. If , then is positive a bit to the left, so a smaller upper bound would exist. Hence . ∎ Over the rationals, IVT fails: changes sign on but has no rational root.
A continuous function on a closed, bounded interval attains a maximum and a minimum.
This is why optimization over compact sets always has a solution (A6). On open sets, on has no maximum.
Stronger kinds of continuity
| Notion | Definition | Example |
|---|---|---|
| continuous | may depend on the point | on |
| uniformly continuous | one for all points | any continuous function on (Heine–Cantor) |
| Lipschitz | (). on is uniformly continuous but not Lipschitz |
Exercise 3.1: Why does bisection always converge?
Each step keeps a sub-interval where changes sign and halves its width. The left endpoints increase, the right endpoints decrease, and the gap goes to 0, so both converge to the same . By continuity, is both and . After steps the error is at most .
- 1. Does x³ − x − 1 have a root in [1, 2]?
- 2. IVT relies on which property of ℝ?
- 3. √x on [0, 1] is…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Root finding and contact detection
The IVT is constructive through bisection: function evaluations guarantee the tolerance, with no derivatives needed. Robotics uses this for continuous collision detection. If the signed distance between a robot and an obstacle is positive at and negative at , there is a contact time in between, found by bisection or conservative advancement.
Continuity in learning and control
- Activations. ReLU is continuous but has a kink. The Heaviside step is discontinuous, and its gradient is 0 almost everywhere, which is why the perceptron’s step was replaced by sigmoids for backpropagation (Rumelhart, Hinton and Williams, 1986). Straight-through estimators and surrogate gradients (spiking networks) are workarounds for discontinuous units.
- Lipschitz continuity bounds how much outputs can change. It gives certified robustness for classifiers and controllers (A2.3-8), and step-size rules in optimization (A6: ).
- Contact and hybrid dynamics. A legged robot’s dynamics jump when a foot touches the ground. Differentiable simulators smooth these discontinuities so gradients exist (e.g. MuJoCo’s soft contacts; Todorov, Erez and Tassa, 2012). Policy-gradient methods avoid differentiating through them at all.
- Floating-point limits. Finite differences, , and softmax all need numerically stable forms (
log1p,expm1, max-subtraction) to avoid cancellation (Higham, 2002).
References
- A.-L. Cauchy (1821). Cours d’analyse de l’École royale polytechnique.
- K. Weierstrass (1861, lectures); the ε–δ definition as standardized in W. Rudin (1976), Principles of Mathematical Analysis, 3rd ed. McGraw-Hill. Chapter 4.
- B. Bolzano (1817). “Rein analytischer Beweis des Lehrsatzes…” (the first proof of the intermediate value theorem).
- N. Higham (2002). Accuracy and Stability of Numerical Algorithms, 2nd ed. SIAM.
- D. Rumelhart, G. Hinton, R. Williams (1986). “Learning representations by back-propagating errors.” Nature, 323.
- E. Todorov, T. Erez, Y. Tassa (2012). “MuJoCo: A physics engine for model-based control.” IROS.
- S. Redon, A. Kheddar, S. Coquillart (2002). “Fast continuous collision detection between rigid bodies.” Computer Graphics Forum, 21(3).