11. Its cousin: (1 − cos x)/x → 0 as x → 0
Last lesson tackled \frac{\sin x}{x} and got 1. Here's the companion problem, and this time the answer is 0.
It's needed for the same reason: the derivative of \sin x requires both limits, and you can't finish that computation with only one of them. But this one also teaches something the first didn't — that 1 - \cos x vanishes at a fundamentally different rate than \sin x does, and that difference is why the answers are 1 and 0 rather than both being 1.
The setup
\lim_{x\to0}\frac{1-\cos x}{x}
At x = 0: \cos 0 = 1, so the numerator is 1 - 1 = 0 and the denominator is 0. Another \frac00, another hole in the graph. Does it sit at 0? At 1? Somewhere else?
The proof: multiply by the conjugate
No algebraic factor is available, but there's a trigonometric one. Multiply top and bottom by 1 + \cos x — the same conjugate trick from §1.1, applied to a trig expression instead of a root:
\frac{1-\cos x}{x}\cdot\frac{1+\cos x}{1+\cos x} = \frac{1 - \cos^2 x}{x(1+\cos x)}
Now the Pythagorean identity turns the numerator into something we can handle: 1 - \cos^2 x = \sin^2 x.
= \frac{\sin^2 x}{x(1+\cos x)} = \underbrace{\frac{\sin x}{x}}_{\to\,1}\cdot\underbrace{\frac{\sin x}{1+\cos x}}_{\to\,\frac{0}{2}\,=\,0}
Splitting into those two factors is the whole move. The first is last lesson's result. The second is now perfectly ordinary — no \frac00, since substituting x=0 gives \frac{0}{1+1} = 0 directly.
By the product law:
\lim_{x\to0}\frac{1-\cos x}{x} = 1 \cdot 0 = 0 \qquad\blacksquare
Notice why the conjugate was the right instrument. The problem was that 1 - \cos x has no useful factorisation. Multiplying by 1 + \cos x converts it into \sin^2 x, which we know everything about. Trade an intractable expression for a tractable one, and pay for it with a harmless extra factor.
Why 0, when \frac{\sin x}{x} gave 1
This is the part worth internalising.
Near 0, both \sin x and 1 - \cos x vanish — but at different orders:
\sin x \approx x, \qquad 1 - \cos x \approx \frac{x^2}{2}
(Both come out of the Taylor series in §8; for now take them as facts you can verify numerically.)
So \frac{\sin x}{x} \approx \frac{x}{x} = 1 — a fair fight, numerator and denominator vanishing at the same rate, giving a finite nonzero answer.
But \frac{1-\cos x}{x} \approx \frac{x^2/2}{x} = \frac{x}{2} \to 0 — the numerator vanishes faster, so it loses.
Cosine is flat at 0. Its graph has a horizontal tangent at its peak, so moving away from 0 changes it only to second order. Sine is at its steepest there, changing to first order. That geometric difference is the whole explanation, and it's why \cos differentiates to something that vanishes at 0 while \sin differentiates to something that doesn't.
The limit that isn't zero
The above suggests dividing by x^2 instead, and that limit is genuinely useful:
\lim_{x\to0}\frac{1-\cos x}{x^2} = \frac12
Same proof, one factor different:
\frac{1-\cos x}{x^2} = \frac{\sin^2 x}{x^2(1+\cos x)} = \left(\frac{\sin x}{x}\right)^2\cdot\frac{1}{1+\cos x} \longrightarrow 1^2\cdot\frac12 = \frac12
This is the limit that measures how curved cosine is at its peak, and it reappears as the second derivative of \cos and in the \frac{x^2}{2} term of its Taylor series.
Between the two you can read off the rate exactly: dividing by x gives 0 (numerator too small), dividing by x^2 gives a finite nonzero number (matched), so 1-\cos x is exactly second order. Dividing by x^3 would blow up.
Doing it in Python
Both limits, side by side:
from math import cos, sin
print(f"{'x':>10} {'(1-cos x)/x':>16} {'(1-cos x)/x^2':>16} {'sin(x)/x':>14}")
for x in (1.0, 0.5, 0.1, 0.01, 0.001):
print(f"{x:>10} {(1-cos(x))/x:>16.10f} {(1-cos(x))/x**2:>16.10f} "
f"{sin(x)/x:>14.10f}")
print("\ncolumn 1 -> 0, column 2 -> 0.5, column 3 -> 1")
The orders of vanishing, made visible:
from math import cos, sin
print(f"{'x':>8} {'sin x':>14} {'x':>14} {'1-cos x':>14} {'x^2/2':>14}")
for x in (0.5, 0.1, 0.05, 0.01):
print(f"{x:>8} {sin(x):>14.10f} {x:>14.10f} {1-cos(x):>14.10f} {x*x/2:>14.10f}")
print("\nsin x tracks x; 1-cos x tracks x^2/2. first order vs second order.")
The conjugate step, verified as an identity rather than taken on faith:
from math import cos, sin
for x in (1.3, 0.7, 0.2, 0.05):
left = (1 - cos(x)) / x
right = (sin(x) / x) * (sin(x) / (1 + cos(x)))
print(f"x={x:<6} direct={left:.12f} factored={right:.12f} "
f"same={abs(left-right) < 1e-12}")
print("\nalgebraically identical -- the conjugate only changed how it looks")
And the numerical trap, which is worse here than for sine:
from math import cos
print("1 - cos(x) subtracts two nearly equal numbers:")
for k in range(1, 9):
x = 10.0 ** -k
print(f" x=1e-{k} 1-cos(x) = {1-cos(x):.20e} (1-cos x)/x^2 = {(1-cos(x))/x**2:.10f}")
print("\nthe true answer is 0.5 for every row. by 1e-8 the digits are gone.")
Worked example
Find \lim_{x\to0}\dfrac{1 - \cos 4x}{x^2}.
Match the argument. The pattern \frac{1-\cos u}{u^2} \to \frac12 needs u^2 underneath, and here u = 4x, so u^2 = 16x^2. Multiply and divide by 16:
\frac{1-\cos4x}{x^2} = 16\cdot\frac{1-\cos 4x}{16x^2} = 16\cdot\frac{1-\cos4x}{(4x)^2}
As x \to 0 so does u = 4x, so the fraction tends to \frac12:
\lim_{x\to0}\frac{1-\cos4x}{x^2} = 16 \cdot \frac12 = \boxed{8}
Second example, mixing both limits:
\lim_{x\to0}\frac{1-\cos x}{x\sin x}
Substituting gives \frac00. Split it so each piece is a known limit:
\frac{1-\cos x}{x\sin x} = \frac{1-\cos x}{x^2}\cdot\frac{x^2}{x\sin x} = \frac{1-\cos x}{x^2}\cdot\frac{x}{\sin x}
The first factor \to \frac12, the second \to 1 (reciprocal of the base limit). So the answer is \frac12.
The strategy in both: rewrite until every piece is a limit you already own. That's the general method for trigonometric \frac00 limits, and once §3 introduces L'Hôpital's rule you'll have a second, more mechanical route to the same answers.
Your turn
1. \lim_{x\to0}\dfrac{1-\cos 3x}{x}
2. \lim_{x\to0}\dfrac{\cos x - 1}{x^2}
3. \lim_{x\to0}\dfrac{x^2}{1-\cos x}
4. Explain in one sentence why \lim_{x\to0}\frac{1-\cos x}{x^3} does not exist.
Solutions
1. Match the argument u = 3x, so we need u underneath:
\frac{1-\cos3x}{x} = 3\cdot\frac{1-\cos3x}{3x} \longrightarrow 3\cdot 0 = \boxed{0}
Any constant times 0 is 0, so scaling the argument can't rescue this one — the \frac{1-\cos u}{u} family is always 0.
2. It's the negative of the standard limit:
\frac{\cos x - 1}{x^2} = -\frac{1-\cos x}{x^2} \longrightarrow -\frac12 = \boxed{-\frac12}
Worth noticing the sign: \cos x \le 1 always, so \cos x - 1 is never positive, and a negative limit is the only possibility.
3. The reciprocal of a limit we know:
\frac{x^2}{1-\cos x} = \frac{1}{\frac{1-\cos x}{x^2}} \longrightarrow \frac{1}{1/2} = \boxed{2}
Legal because the inner limit \frac12 is nonzero.
4. Because 1 - \cos x vanishes at exactly second order while x^3 vanishes at third, so the denominator wins and the quotient blows up:
\frac{1-\cos x}{x^3} \approx \frac{x^2/2}{x^3} = \frac{1}{2x}
which runs to +\infty from the right and -\infty from the left — no limit, not even an infinite one.
Check yourself in code
Show that \frac{1-\cos x}{x} \to 0 while \frac{1-\cos x}{x^2} \to \frac12.
For x = 1, 0.1, 0.01, 0.001, print both ratios to 8 decimals. Then print the first-order and second-order comparisons at x = 0.01: \sin x against x, and 1-\cos x against x^2/2, to 10 decimals.
Print exactly this:
x=1 over_x=0.45969769 over_x2=0.45969769
x=0.1 over_x=0.04995835 over_x2=0.49958347
x=0.01 over_x=0.00499996 over_x2=0.49999583
x=0.001 over_x=0.00050000 over_x2=0.49999996
sin(0.01)=0.0099998333 x=0.0100000000
1-cos(0.01)=0.0000499996 x^2/2=0.0000500000
from math import sin, cos
for x in (1, 0.1, 0.01, 0.001):
# print (1-cos x)/x and (1-cos x)/x**2, both to 8 decimals
print(f"x={x:<7} ...")
# then compare sin(0.01) to 0.01, and 1-cos(0.01) to 0.01**2/2, to 10 decimals
from math import sin, cos
for x in (1, 0.1, 0.01, 0.001):
print(f"x={x:<7} over_x={(1-cos(x))/x:.8f} over_x2={(1-cos(x))/x**2:.8f}")
x = 0.01
print(f"sin({x})={sin(x):.10f} x={x:.10f}")
print(f"1-cos({x})={1-cos(x):.10f} x^2/2={x*x/2:.10f}")
Multiplying by the conjugate 1+\cos x converts 1 - \cos x into \sin^2 x, after which the problem splits into the base limit (which is 1) times something that plainly goes to 0. The answer is 0 because 1 - \cos x vanishes at second order while x vanishes at first — divide by x^2 instead and you get the finite \frac12. Both limits together are exactly what the derivative of sine needs.
Next: what happens at the other end, as x runs to infinity — asymptotes, and the hierarchy of growth rates.