Limit Laws and Limits at Infinity
Limit laws let you break a complicated limit into simple pieces, and limits at infinity describe where a function settles as its input grows without bound. Together they let you compute most limits by hand and explain the long-run behaviour of formulas, from algorithm costs to learning-rate schedules.
The limit laws
Suppose and , with and finite. Then:
| Law | Statement |
|---|---|
| Sum / difference | |
| Constant multiple | |
| Product | |
| Quotient | , provided |
| Power | |
| Root | (for even , need ) |
Two building blocks finish the job: and . From these, every polynomial satisfies : you can just substitute. The same holds for a rational function wherever the denominator is not zero.
When substitution gives , the quotient law does not apply. That is a signal to simplify first (factor, cancel, use a conjugate), as in Limits, or later to use L'Hôpital's rule.
The squeeze theorem
If near and both and approach the same limit , then is squeezed to too. Classic use: as . Since ,
Limits at infinity
means gets as close to as you like once is large enough. The line is then a horizontal asymptote. The key fact is
For a rational function, divide top and bottom by the highest power of in the denominator:
Rule of thumb, comparing the degree of the numerator and the denominator :
| Degrees | Limit as |
|---|---|
| ratio of leading coefficients | |
| (no horizontal asymptote) |
Let's check one numerically and with SymPy:
import sympy as sp
def r(x):
return (4 * x**2 + 3 * x) / (2 * x**2 - 7)
for x in [10, 100, 1_000, 10_000, 100_000]:
print(f"x = {x:>7} r(x) = {r(x):.8f}")
x = sp.symbols('x')
print("SymPy:", sp.limit((4 * x**2 + 3 * x) / (2 * x**2 - 7), x, sp.oo))x = 10 r(x) = 2.22797927
x = 100 r(x) = 2.01570550
x = 1000 r(x) = 2.00150701
x = 10000 r(x) = 2.00015007
x = 100000 r(x) = 2.00001500
SymPy: 2
Growth rates
Not all functions that tend to infinity do so at the same speed. As :
here means . SymPy can confirm ratios like these:
import sympy as sp
x = sp.symbols('x', positive=True)
print("ln(x)/sqrt(x) ->", sp.limit(sp.log(x) / sp.sqrt(x), x, sp.oo))
print("x**10/2**x ->", sp.limit(x**10 / 2**x, x, sp.oo))
print("x*ln(x)/x**2 ->", sp.limit(x * sp.log(x) / x**2, x, sp.oo))
print("(1+1/x)**x ->", sp.limit((1 + 1 / x)**x, x, sp.oo))
print("exp(-x) ->", sp.limit(sp.exp(-x), x, sp.oo))ln(x)/sqrt(x) -> 0
x**10/2**x -> 0
x*ln(x)/x**2 -> 0
(1+1/x)**x -> E
exp(-x) -> 0
Note:
x**10 / 2**xdoes go to 0, but slowly at first: at the ratio is about 9.8 million. "Eventually" in a limit can mean "much later than you think".
In software
- Big-O is a statement about limits at infinity. means stays bounded as . The growth chain above is exactly why sorting beats for large inputs, and why exponential-time algorithms are hopeless (see DSA).
- Asymptotes in UI and ML: an exponential approach heads towards 1 and is used for smooth "ease-out" animation; learning-rate schedules like tend to 0 as training steps .
- Numeric overflow: knowing tells you that for large the computed value underflows to
0.0, which can later cause division by zero. Rewriting formulas to work with limits in mind (for examplelog1p,expm1) keeps code stable.
Exercises
Exercise 1: Just substitute
Use the limit laws to find .
Answer
Solution
The denominator is not zero at , so substitution is allowed:
Exercise 2: Horizontal asymptote
Find .
Answer
−3
Solution
Exercise 3: Squeeze
Find .
Answer
0
Solution
Exercise 4: Who grows faster?
Find where first becomes smaller than for whole numbers (they start with ). Then confirm with SymPy that .
Answer
At ; the limit is 0.
Solution
import sympy as sp
n = 2
while n**2 >= 1.1**n:
n += 1
print("first n with 1.1**n > n**2:", n)
k = sp.symbols('k', positive=True)
print(sp.limit(k**2 / sp.Rational(11, 10)**k, k, sp.oo))first n with 1.1**n > n**2: 96
0
Any exponential with eventually beats any power , but for close to 1 "eventually" takes a while.
Test yourself
What is ?
- 5
- −2
- 0
When can you not use the quotient law ?
- When
- When
- When is a polynomial
- Never, it always works
Which grows fastest as ?