Maths for Machines
0 of 12 lessons done100 questions

Lesson 1 of 12

Limits: getting as close as we want

A limit asks where an output is heading, even when the exact input is missing or awkward.

Core lesson · about 7 minutes · 3 guided parts

Imagine walking toward a closed door. We can describe the distance you are approaching—zero—without asking you to walk through the door. A limit watches the journey, not only the final step.

Your learning route

Build the idea one piece at a time

  1. Approach from both sides
  2. Continuity and safe prediction
  3. How limits rescue a missing sensor reading
Limits: getting as close as we want, made visible
slope = instant change

Approach from both sides

Move a tiny slider toward the target from the left and right. If both output dots settle near the same height, that height is the limit.

The notation lim x→a f(x)=L means that f(x) can be made as close to L as desired by choosing x close enough to a, with x allowed to differ from a.

A two-sided limit exists only when the left-hand and right-hand limits agree. The value f(a) may be different from L or may not exist at all.

For polynomials and other continuous expressions, direct substitution works. For a removable 0/0 form, simplify first and then substitute.

A table can suggest a limit by showing values progressively closer to the target, but a finite table cannot prove what happens at every still-closer input.

Approaching a means the distance |x−a| becomes small while x remains different from a; the limit therefore ignores any exceptional value placed exactly at a.

The formal idea pairs tolerances: for every allowed output error around L, we must be able to choose a small enough input distance around a that guarantees it.

In symbolslim x→a f(x)=L

Worked example

Find lim x→3 (x²−9)/(x−3).

  1. Direct substitution gives 0/0, which is a signal to simplify—not an answer.
  2. Factor x²−9=(x−3)(x+3).
  3. For x≠3, cancel x−3, leaving x+3.
  4. As x approaches 3, x+3 approaches 6.

Answer: 6

Continuity and safe prediction

A continuous graph can be drawn near a point without lifting your pencil: nearby inputs give nearby outputs.

A function is continuous at a when f(a) exists, lim x→a f(x) exists, and the two values are equal.

Continuity lets us move a limit through sums, products, and compositions. It is why substitution is safe for familiar smooth functions.

The Intermediate Value Theorem says a continuous curve that starts below a height and ends above it must cross that height somewhere between.

A removable discontinuity is a hole that can be repaired with one value, while a jump has disagreeing one-sided limits and an infinite discontinuity grows without bound.

For a composition f(g(x)), substitution is safe only when g(x) approaches an input where f has the needed continuity; the outer function's domain still matters.

The Intermediate Value Theorem guarantees at least one crossing, not its uniqueness: a wavy continuous graph may cross the same target height many times.

In symbolsf is continuous at a ⇔ lim x→a f(x)=f(a)

Worked example

Choose c so f(x)=(x²−1)/(x−1) for x≠1 and f(1)=c is continuous.

  1. Factor x²−1=(x−1)(x+1).
  2. For x≠1, f(x)=x+1.
  3. The limit as x→1 is 1+1=2.
  4. Continuity requires f(1) to equal that limit, so choose c=2.

Answer: c=2

Practical deep dive for this lesson

How limits rescue a missing sensor reading

A limit is useful when the value at one exact input is missing but the values immediately around it follow a dependable pattern.

Picture a factory controller that records liquid flow while pressure changes. Let u=p/(1 bar) be a dimensionless pressure reading; one value at u=4 is corrupted, but readings at 3.9, 3.99, 4.01, and 4.1 still exist.

The practical question is not 'What did the broken cell store?' It is 'What value do trustworthy nearby readings approach as pressure moves toward 4 bar?'

A limit answers that second question. We make a small input gap and watch whether the resulting output error can also be made as small as we need.

Checking only pressures below 4 bar is not enough. The controller could behave differently above 4 bar, so left and right approaches must agree.

Units stay attached throughout: u is a pure number formed by dividing pressure by 1 bar, while a flow scale q₀=1 litre per minute supplies the output unit.

If the formula simplifies everywhere except at the damaged input, the hole is called removable. Filling it with the limiting value makes the model continuous there.

Continuity matters because it turns small measurement errors into small prediction errors. A tiny pressure wobble should not cause an unexplained giant jump in predicted flow.

The Intermediate Value Theorem adds a useful guarantee: a continuous reading that moves from below a safety threshold to above it must equal that threshold at some time between.

That theorem locates no exact time by itself. Engineers combine it with bisection or more sensor readings to narrow the crossing interval.

Limits therefore support interpolation and event detection, but the physical smoothness assumption must come from the machine—not from the notation alone.

In symbolsu=p/(1 bar), q=q₀(u²−16)/(u−4), lim u→4 q=8q₀

Worked example

Let u=p/(1 bar) and q₀=1 L/min. A flow model is q(u)=q₀(u²−16)/(u−4) for u≠4. What value should a continuous table use at p=4 bar?

  1. At p=4 bar, the normalized input is u=p/(1 bar)=4, while q₀ carries the flow unit.
  2. Substituting u=4 gives 0/0, which reports an unresolved form rather than a flow of zero.
  3. Factor the dimensionless numerator: u²−16=(u−4)(u+4).
  4. For every nearby u≠4, cancel u−4 to obtain q(u)=q₀(u+4).
  5. Approaching from below gives values such as 7.9 and 7.99; approaching from above gives 8.01 and 8.1.
  6. Both sides approach 8q₀, so lim u→4 q(u)=8 litres per minute.
  7. Set the missing table entry at p=4 bar to 8 L/min if the physical device is known to operate continuously there.
  8. Finally compare the repaired prediction with a real calibration measurement; mathematics identifies the consistent value, not whether the sensor itself is healthy.

Answer: Use q(4)=8 litres per minute, after confirming the device is physically continuous there.

Check your picture

If the left limit is 4 and the right limit is 7, what is the two-sided limit?

Reveal answer

It does not exist because the one-sided limits disagree.

This lesson versus the whole chapter

Your topic-specific practical example is above.

The final lesson collects five longer chapter-wide workflows for machine learning, LLMs, trading, physics, and everyday decisions.

Formula shelf

Symbols with meaning

Limitlim x→a f(x)=L

Nearby inputs make outputs approach L.

Derivativef′(x)=lim h→0 [f(x+h)−f(x)]/h

Instantaneous rate of change.

Chain rule(f∘g)′(x)=f′(g(x))g′(x)

Multiply sensitivities through nested functions.

Definite integral∫ₐᵇ f(x)dx=F(b)−F(a)

Net accumulation from a to b.

Geometric seriesΣₙ₌₀∞ arⁿ=a/(1−r)

Exact total when |r|<1.

Taylor polynomialTₙ(x)=Σₖ₌₀ⁿ f⁽ᵏ⁾(a)(x−a)ᵏ/k!

Local polynomial model of a smooth function.

Euler updateyₙ₊₁=yₙ+h f(tₙ,yₙ)

Numerically follow a differential equation.

Implicit slopedy/dx=−Fₓ/Fᵧ

Finds the slope of a level curve F(x,y)=0 where Fᵧ≠0.

Mean Value Theoremf′(c)=[f(b)−f(a)]/(b−a)

Matches an interior instantaneous slope to the interval average.

Arc lengthL=∫ₐᵇ√(1+[f′(x)]²)dx

Adds tiny hypotenuse lengths along a graph.

Integration by parts∫u dv=uv−∫v du

Reverses the derivative product rule.

Ratio testL=lim|aₙ₊₁/aₙ|

Detects absolute convergence when L<1 and divergence when L>1.

Integrating factorμ=e^∫pdt; (μy)′=μq

Turns a first-order linear ODE into one product derivative.

Fourier derivatived(eⁱᵏˣ)/dx=ik eⁱᵏˣ

Turns differentiation into a frequency multiplier with a phase rotation.

Before moving on

You are ready when you can…

  • Explain a limit from a graph, table, and formula.
  • Differentiate compositions and interpret units and signs.
  • Turn rates into totals with definite integrals.
  • Choose convergence tests, find power-series intervals, and manipulate valid power series with error control.
  • Use implicit differentiation, the MVT, related rates, arc length, integration by parts, and improper integrals.
  • Solve basic first- and second-order linear ODEs and interpret vector-system eigenmodes and Fourier modes.