Limits pass through sums, products and quotients, so most limits come from substituting. When substitution gives 0/0, factor and cancel, rationalise, or squeeze: areas on the unit circle trap sin(x)/x and show that it tends to 1.
State the limit laws for sums, products and quotients, and prove the sum law from the definition.
Find limits of polynomials and rational functions by direct substitution, and say when it is allowed.
Resolve a 0/0 form by factoring and cancelling, or by rationalising.
Use the squeeze theorem with areas on the unit circle to show that sin(x)/x tends to 1 as x tends to 0.
Check a limit found by hand against a table of values in code.
In review. The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.
The question
The last lesson proved two limits by playing the tolerance game. Training a network needs the slope of every function it is built from, and every slope is a limit, so calculus needs a faster way. Most limits fall to a few laws in one line. One does not: the slope of the sine curve at 0 comes down to \({\sin(x)/x}\) as \(x\) tends to 0, which is \({0/0}\) and has nothing to cancel. How are limits found in practice, and how is that one pinned down?
From the last lesson
1. Does the value \({f(a)}\) affect \({\lim_{x \to a} f(x)}\)?
Show answer
No. The definition only looks at \(x\) with \({0 < \abs{x - a}}\), so \({f(a)}\) may differ from the limit or not exist at all.
2. For \({f(x) = 2x + 1}\) at \({x = 1}\), which window \(\delta\) answers a tolerance \(\varepsilon\)?
If \({f(x)}\) is near \(\ell\) and \({g(x)}\) is near \(m\), then \({f(x) + g(x)}\) is near \({\ell + m}\), the product is near \({\ell m}\), and the quotient is near \({\ell / m}\), as long as \(m\) is not 0. Limits follow the arithmetic of their parts. So for a function built from \(x\) and numbers by adding, multiplying and dividing, the limit at \(a\) is what you get by putting \(a\) in.
Putting \(a\) in fails when the bottom of a fraction becomes 0. If the top does not, the function blows up there, which is the next lesson’s subject. If the top is 0 as well, substitution gives \({0/0}\). That is not an answer. It is a signal that something in the formula is hiding the value, and there are two tools for finding it.
M04.1.2-F1
Two tools for \({0/0}\). Left: the factor \({x - 1}\) is hidden in the top and the bottom; cancel it and the graph is \({(x + 2)/(x + 1)}\) with one point missing, at height \({\tfrac32}\). Right: nothing cancels in \({\sin(x)/x}\), but it is trapped between \({\cos x}\) and 1, which both head to 1.
Build it up
Step 1. The two simplest limits. A constant stays put, so \({\lim_{x \to a} c = c}\): every window works. And \({\lim_{x \to a} x = a}\): the output is the input, so the window \({\delta = \varepsilon}\) works. Everything else is built from these two.
Step 2. Sums: the gaps add. Suppose \({f(x)}\) is within \({\varepsilon / 2}\) of \(\ell\) and \({g(x)}\) is within \({\varepsilon / 2}\) of \(m\). Each gap is a distance on the number line. Laid end to end, the two gaps reach less than \({\varepsilon / 2 + \varepsilon / 2 = \varepsilon}\), so \({f(x) + g(x)}\) is within \(\varepsilon\) of \({\ell + m}\). If the gaps point opposite ways they partly cancel, which only helps.
M04.1.2-F2
The sum law in one picture. Each gap is less than \({\varepsilon / 2}\), so the two gaps together are less than \(\varepsilon\), and the sum lands inside a band of half-width \(\varepsilon\) round \({\ell + m}\).
Step 3. Products, quotients and powers. The same kind of argument, with more care about sizes, gives products and quotients; we state those laws without proof. A power is a repeated product, so \({\lim_{x \to a} x^n = a^n}\).
Step 4. Substitution. A polynomial is built from \(x\) and numbers by multiplying and adding, so the laws give its limit by putting \(a\) in. For the course’s cubic \({g(x) = x^3 - 3x}\),
Suppose \({\lim_{x \to a} f(x) = \ell}\) and \({\lim_{x \to a} g(x) = m}\), and let \(c\) be a number. Then, as \(x\) tends to \(a\),
sum and difference:\({f(x) \pm g(x)}\) tends to \({\ell \pm m}\);
constant multiple:\({c\,f(x)}\) tends to \({c\,\ell}\);
product:\({f(x)\,g(x)}\) tends to \({\ell\,m}\);
quotient:\({f(x)/g(x)}\) tends to \({\ell / m}\), provided \({m \neq 0}\);
power and root:\({f(x)^n}\) tends to \({\ell^{\,n}}\) for a whole number \({n \geq 1}\), and \({\sqrt{f(x)}}\) tends to \({\sqrt{\ell}}\) when \({f(x) \geq 0}\) near \(a\).
Proof of the sum law. Let \({\varepsilon > 0}\). The definition of a limit holds for every positive tolerance, so use it with \({\varepsilon / 2}\). There is a \({\delta_1 > 0}\) such that \({\abs{f(x) - \ell} < \varepsilon / 2}\) whenever \({0 < \abs{x - a} < \delta_1}\), and a \({\delta_2 > 0}\) such that \({\abs{g(x) - m} < \varepsilon / 2}\) whenever \({0 < \abs{x - a} < \delta_2}\). Let \(\delta\) be the smaller of \(\delta_1\) and \(\delta_2\). If \({0 < \abs{x - a} < \delta}\), both bounds hold, and
The second line only regroups. The third is the triangle inequality, \({\abs{u + v} \leq \abs{u} + \abs{v}}\): two moves along the number line never take you further than their lengths added. So a window exists for every \(\varepsilon\), and the sum tends to \({\ell + m}\).
Direct substitution. For a polynomial \(p\), \({\lim_{x \to a} p(x) = p(a)}\). For a rational function \({p(x)/q(x)}\) with \({q(a) \neq 0}\), the limit is \({p(a)/q(a)}\). Both follow by building the function from \(x\) and constants with the laws. When \({q(a) = 0}\) the quotient law is silent, and the work starts.
NoteThe squeeze theorem
Suppose \({g(x) \leq f(x) \leq h(x)}\) for every \(x\) near \(a\) (except perhaps \(a\) itself), and \(g\) and \(h\) both tend to \(\ell\) as \(x\) tends to \(a\). Then \(f\) tends to \(\ell\) too.
Why. Given \({\varepsilon > 0}\), take a window small enough for both \(g\) and \(h\) to be within \(\varepsilon\) of \(\ell\), and inside the range where the inequalities hold. There
The limit of \({\sin(x)/x}\). Take \({0 < x < \pi/2}\) and the circle of radius 1. Mark the centre O, the point \({A = (1, 0)}\), the point \({P = (\cos x, \sin x)}\) at angle \(x\), and the point \({T = (1, \tan x)}\) where the line OP meets the upright line through A.
M04.1.2-F3
Three nested shapes. The triangle OAP fits inside the sector OAP, which fits inside the triangle OAT, so their areas come in that order.
Find the three areas.
The triangle OAP has base \({OA = 1}\) and height \({\sin x}\), so its area is \({\tfrac12 \sin x}\).
The disc of radius 1 has area \(\pi\) (the school formula \({\pi r^2}\) with \({r = 1}\)). Angles are in radians (M01.5.3), so a full turn is \({2\pi}\), and a sector with angle \(x\) is the fraction \({x / (2\pi)}\) of the disc. Equal angles cut equal slices, so the area is shared in proportion to the angle, and the sector’s area is \({\tfrac{x}{2\pi} \times \pi = \tfrac{x}{2}}\).
The triangle OAT has base 1 and height \({\tan x}\), so its area is \({\tfrac12 \tan x}\).
The shapes are nested, so the areas are in order. Doubling them,
\[
\sin x \;\leq\; x \;\leq\; \tan x .
\]
Divide by \({\sin x}\), which is positive, and use \({\tan x = \sin x / \cos x}\):
All three are positive, and taking reciprocals reverses the order:
\[
\cos x \;\leq\; \frac{\sin x}{x} \;\leq\; 1 .
\]
For \({-\pi/2 < x < 0}\) the same holds, because \({\sin(-x)/(-x) = \sin(x)/x}\) and \({\cos(-x) = \cos x}\). Last, \({\cos x}\) tends to 1. From \({\sin x \leq x}\) and the symmetry, \({\abs{\sin x} \leq \abs{x}}\), and since \({\cos x > 0}\) here,
So \({1 - \cos x}\) is squeezed between 0 and \({x^2}\), which both tend to 0, and \({\cos x}\) tends to 1. Both bounds on \({\sin(x)/x}\) head to 1, and the squeeze theorem gives
\[
\lim_{x \to 0} \frac{\sin x}{x} = 1 .
\]
This is the limit that M04.3.2 uses to differentiate the sine.
Worked example
Find three limits: \({x^3 - 3x}\) as \(x\) tends to 2, \({(x^2 + x - 2)/(x^2 - 1)}\) as \(x\) tends to 1, and \({(\sqrt{x} - 3)/(x - 9)}\) as \(x\) tends to 9.
The cubic. A polynomial: substitute, as in Step 4. The limit is \({8 - 6 = 2}\).
Factor, then cancel. Substituting 1 gives \({(1 + 1 - 2)/(1 - 1) = 0/0}\): a signal. Top and bottom are both 0 at 1, so both contain the factor \({x - 1}\):
Cancelling is allowed because a limit never looks at \({x = 1}\). The new bottom is 2 at 1, not 0, so substitution now works: the limit is \({3/2}\).
Rationalise, then cancel. Substituting 9 gives \({(3 - 3)/(9 - 9) = 0/0}\) again. A square root minus a number is cleared by multiplying top and bottom by the same root plus the number, since \({(\sqrt{x} - 3)(\sqrt{x} + 3) = x - 9}\):
By the root, sum and quotient laws the limit is \({1/(3 + 3) = 1/6}\).
M04.1.2-F4
The two 0/0 limits taken apart. Each needs one move that exposes the common factor, one cancel, and one substitution.
Tables agree: at \({x = 0.99}\) and \({1.01}\) the first ratio is 1.502513 and 1.497512, closing on 1.5, and at \({x = 8.99}\) and \({9.01}\) the second is 0.166713 and 0.166620, closing on \({1/6 \approx 0.166667}\).
Code
Each hand result is checked against a table. The helper prints values just left and just right of the point.
import mathdef table(f, a, steps=(0.1, 0.01, 0.001)):"""Values of f at a - h and a + h for each step h."""for h in steps:print(f" h = {h:<6} f(a - h) = {f(a - h):.6f} f(a + h) = {f(a + h):.6f}")def factor_case(x):return (x**2+ x -2) / (x**2-1)def root_case(x):return (math.sqrt(x) -3) / (x -9)print("(x^2 + x - 2)/(x^2 - 1) near 1; by hand 3/2 = 1.5")table(factor_case, 1)print("(sqrt(x) - 3)/(x - 9) near 9; by hand 1/6 = 0.166667")table(root_case, 9)
(x^2 + x - 2)/(x^2 - 1) near 1; by hand 3/2 = 1.5
h = 0.1 f(a - h) = 1.526316 f(a + h) = 1.476190
h = 0.01 f(a - h) = 1.502513 f(a + h) = 1.497512
h = 0.001 f(a - h) = 1.500250 f(a + h) = 1.499750
(sqrt(x) - 3)/(x - 9) near 9; by hand 1/6 = 0.166667
h = 0.1 f(a - h) = 0.167132 f(a + h) = 0.166206
h = 0.01 f(a - h) = 0.166713 f(a + h) = 0.166620
h = 0.001 f(a - h) = 0.166671 f(a + h) = 0.166662
Now the squeeze. At each \(x\) the ratio \({\sin(x)/x}\) should sit between \({\cos x}\) and 1.
for x in (0.5, 0.1, 0.01, 0.001): ratio = math.sin(x) / xprint(f"x = {x:<6} cos x = {math.cos(x):.8f} <= sin(x)/x = {ratio:.8f} <= 1")
x = 0.5 cos x = 0.87758256 <= sin(x)/x = 0.95885108 <= 1
x = 0.1 cos x = 0.99500417 <= sin(x)/x = 0.99833417 <= 1
x = 0.01 cos x = 0.99995000 <= sin(x)/x = 0.99998333 <= 1
x = 0.001 cos x = 0.99999950 <= sin(x)/x = 0.99999983 <= 1
NumPy checks the squeeze at ten thousand points at once. It also shows the trap of the next section: with \(x\) in degrees, the same ratio heads to \({\pi / 180}\), not 1.
import numpy as npxs = np.linspace(-1.5, 1.5, 10_000) # an even number of points, so 0 is not one of themratio = np.sin(xs) / xs # (the ratio has no value at 0 itself)print("cos x <= sin(x)/x everywhere:", bool(np.all(np.cos(xs) <= ratio)))print("sin(x)/x <= 1 everywhere: ", bool(np.all(ratio <=1)))degrees = np.array([1.0, 0.1, 0.01])print("x in degrees:", np.sin(np.radians(degrees)) / degrees, " pi/180 =", np.pi /180)
cos x <= sin(x)/x everywhere: True
sin(x)/x <= 1 everywhere: True
x in degrees: [0.01745241 0.01745328 0.01745329] pi/180 = 0.017453292519943295
Explore
This module’s interactive, the limit window, lives in lesson M04.1.1. Choose the curve\({y = x^2}\) and press Find δ for a few tolerances. The read-out gives the largest window as \({\sqrt{1 + \varepsilon} - 1}\), from solving \({(1 + \delta)^2 - 1 = \varepsilon}\), and the slider moves to it, rounded down to its steps of 0.01: algebra again, doing the work of the game.
Pitfalls
M04.1.2-F5
Wrong beside right. Left: with \(x\) in degrees, \({\sin(x)/x}\) heads to \({\pi/180 \approx 0.0175}\). Right: with \(x\) in radians it heads to 1. The sector area \({x/2}\) is true only in radians.
“\({\sin(x)/x}\) tends to 1, whatever the units.”
The proof used the sector area \({x/2}\), which holds only when \(x\) is in radians. In degrees the sector is \({\tfrac{x}{360} \times \pi}\), and the ratio tends to \({\pi/180}\). Code works in radians too: in Python, math.sin(90) is the sine of 90 radians, not of a right angle.
“\({0/0}\) means the limit is 0” (or 1, or does not exist).
\({0/0}\) is not a value; it says only that substitution has failed. The three limits of this lesson that start as \({0/0}\) come out as \({3/2}\), \({1/6}\) and 1. Such a form is called indeterminate: the answer depends on how fast the top and the bottom shrink.
“Cancelling \({x - 1}\) changes the function, so it changes the limit.”
The cancelled form differs from the original at \({x = 1}\) only, where the original has no value. A limit never looks there, so both have the same limit.
“The quotient law still works when the bottom tends to 0.”
It needs \({m \neq 0}\). When the bottom tends to 0 and the top does not, the quotient grows without bound, as \({1/x}\) does near 0; the next lesson deals with that case.
Check yourself
Recall
1. State the sum law for limits.
Show answer
If \({f(x) \to \ell}\) and \({g(x) \to m}\) as \({x \to a}\), then \({f(x) + g(x) \to \ell + m}\).
2. When can the limit of a rational function \({p(x)/q(x)}\) at \(a\) be found by substituting \(a\)?
Show answer
When \({q(a) \neq 0}\). Then the limit is \({p(a)/q(a)}\).
3. Substituting \(a\) gives \({0/0}\). What does that tell you?
Show answer
Only that substitution has failed. The limit may be any number, or may not exist; factor and cancel, rationalise, or squeeze to find out.
4. State the squeeze theorem in words.
Show answer
If a function is trapped between two others near \(a\), and the two outer functions have the same limit at \(a\), the trapped one has that limit too.
5. What is \({\lim_{x \to 0} \sin(x)/x}\), and in which units must \(x\) be?
Show answer
1, with \(x\) in radians. In degrees the limit is \({\pi/180}\).
By the root, sum and quotient laws the limit is \({1/(1 + 1) = 1/2}\). At \({x = 0.01}\) the original is about 0.498756, and at \({x = -0.01}\) about 0.501256.
3.★★★ Use \({\lim_{x \to 0} \sin(x)/x = 1}\) and the limit laws to find \({\lim_{x \to 0} (1 - \cos x)/x^2}\).
Show solution
Substituting gives \({0/0}\). Multiply top and bottom by \({1 + \cos x}\), and use \({1 - \cos^2 x = \sin^2 x}\):
As \(x\) tends to 0, \({\sin(x)/x}\) tends to 1, so its square tends to 1 by the power law, and \({\cos x}\) tends to 1, so \({1/(1 + \cos x)}\) tends to \({1/2}\) by the quotient law. By the product law the limit is \({1 \times \tfrac12 = \tfrac12}\). At \({x = 0.1}\) the ratio is about 0.499583.
Summary card
Limits follow the arithmetic of their parts; 0/0 is a signal to dig.
M04.1.2-F1
Cancel the factor, or squeeze.
Laws. Limits of sums, products and quotients (bottom limit not 0) are the sums, products and quotients of the limits.
Substitution. For polynomials, and for rational functions whose bottom is not 0 at \(a\).
\({0/0}\). Factor and cancel, or rationalise, then substitute.
Squeeze.\({\cos x \leq \sin(x)/x \leq 1}\), so \({\lim_{x \to 0} \sin(x)/x = 1}\), in radians.
Sources and next steps
Sources. Each was opened and checked against this lesson on 12 November 2026.
Gilbert Strang and Edwin Herman, Calculus Volume 1 (OpenStax), Section 2.3, The limit laws: the basic limits of \(x\) and of a constant (Theorem 2.4), the limit laws (Theorem 2.5), direct substitution for polynomials and rational functions (Theorem 2.6), the squeeze theorem (Theorem 2.7) and \({\lim_{\theta \to 0} \sin(\theta)/\theta = 1}\) (equation 2.18), which the book derives by comparing lengths on the unit circle where this lesson compares areas. Section 2.5 proves the sum law from the definition, under “Proving limit laws”.
Evan Dummit, Calculus I (part 2s): Trigonometric Limits, Northeastern University, 2016, Section 2.8: the proof that \({\sin(x)/x}\) tends to 1 from the areas \({\tfrac12 \sin x}\), \({\tfrac12 x}\) and \({\tfrac12 \tan x}\) and the squeeze theorem, and the limit \({(1 - \cos x)/x^2 \to \tfrac12}\) of Exercise 3.
Next.M04.1.3 One-sided limits and infinity lets \(x\) approach from one side only, and lets either \(x\) or the output run off to infinity, where the sigmoid levels off.