12. Limits at infinity, asymptotes, and growth rates
So far x has closed in on a finite point. Now let it run away instead:
\lim_{x\to\infty}f(x) = L
means f(x) gets and stays arbitrarily close to L once x is large enough. Precisely: for every \varepsilon > 0 there's an N with $|f(x) - L| < \varepsilon$ whenever x > N. Same challenge-and-response as before, with "close to a" replaced by "far out".
This is the end-behaviour question — what a function eventually looks like — and it's the one that matters most outside pure mathematics. Algorithm complexity, steady states, equilibrium concentrations, and the tails of probability distributions are all limits at infinity.
The one fact everything reduces to
\lim_{x\to\infty}\frac{1}{x^p} = 0 \quad\text{for any } p > 0
That's it. Every rational limit at infinity is engineered into this shape.
Rational functions: divide by the dominant power
The technique never varies. Find the highest power of x in the denominator, divide every term top and bottom by it, and let the \frac{1}{x^p} terms die.
\lim_{x\to\infty}\frac{3x^2 + 5x - 2}{2x^2 - x + 7}
Divide through by x^2:
= \lim_{x\to\infty}\frac{3 + \frac5x - \frac{2}{x^2}}{2 - \frac1x + \frac{7}{x^2}} = \frac{3 + 0 - 0}{2 - 0 + 0} = \frac32
Three cases, and you can read them off without doing any work:
| Degrees | Limit | Why |
|---|---|---|
| top < bottom | 0 | denominator outgrows numerator |
| top = bottom | ratio of leading coefficients | they grow in lockstep |
| top > bottom | \pm\infty | numerator wins |
Horizontal asymptote is the name for a finite limit at infinity: y = L is a horizontal asymptote of f if f(x) \to L as x \to \infty or x \to -\infty.
A function can have two different ones — one in each direction — and a curve is perfectly allowed to cross its horizontal asymptote, sometimes infinitely often. \frac{\sin x}{x} \to 0 crosses y = 0 at every multiple of \pi. The asymptote describes eventual behaviour, not a barrier.
The trap: roots and negative infinity
\lim_{x\to-\infty}\frac{\sqrt{4x^2+1}}{x}
Divide by x. But \sqrt{x^2} = |x|, and for x < 0, |x| = -x. So pulling x out of the root costs a minus sign:
\frac{\sqrt{4x^2+1}}{x} = \frac{|x|\sqrt{4 + 1/x^2}}{x} = \frac{-x\sqrt{4+1/x^2}}{x} = -\sqrt{4 + \tfrac{1}{x^2}} \longrightarrow -2
whereas the same expression as x \to +\infty gives +2. Two different horizontal asymptotes, and the sign is the entire content of the problem. This is the single most commonly botched limit at infinity — whenever a square root meets x \to -\infty, write |x| explicitly and then resolve it.
Slant asymptotes
When the numerator's degree is exactly one more than the denominator's, the function doesn't flatten out — it approaches a line.
f(x) = \frac{x^2+1}{x} = x + \frac1x
As x \to \pm\infty, \frac1x \to 0, so f(x) hugs y = x. That line is a slant (or oblique) asymptote, and you find it by polynomial long division: the quotient is the asymptote, the remainder vanishes.
Same idea generalises: divide, and whatever doesn't vanish is what the function eventually looks like.
The growth hierarchy
For end-behaviour questions across different families, the ordering matters more than any calculation:
\ln x \;\ll\; x^{0.1} \;\ll\; x \;\ll\; x^{100} \;\ll\; 1.01^x \;\ll\; e^x \;\ll\; x! \;\ll\; x^x
where f \ll g means \frac{f}{g} \to 0. Reading it out:
- Any power of x beats any logarithm.
- Any exponential with base > 1 beats any power of x — even 1.0001^x beats x^{1000}, eventually.
- Factorial beats every exponential.
This single ordering resolves most limits at infinity by inspection, and it's the same hierarchy that separates O(\log n) from O(n) from O(2^n) in algorithm analysis. "Eventually" can be a very long time — x^{100} leads 1.01^x until around x \approx 117{,}000 — but the crossing always happens.
Proofs come with L'Hôpital's rule in §3.3.
Infinite limits at infinity, and horizontal asymptotes that aren't
Not everything settles. \lim_{x\to\infty}\sin x does not exist: no growth, no settling, just oscillation forever. This is failure mode 3 from §1.2, relocated to infinity.
But \lim_{x\to\infty}\frac{\sin x}{x} = 0, by the squeeze: $-\frac1x \le \frac{\sin x}{x} \le \frac1x$. Same "bounded times vanishing" pattern from §1.3, now with the vanishing factor going to 0 because x is large rather than small.
Doing it in Python
Rational end-behaviour, one case per row:
cases = [
("(3x^2+5x-2)/(2x^2-x+7)", lambda x: (3*x**2 + 5*x - 2) / (2*x**2 - x + 7)),
("(x+1)/(x^2+3) ", lambda x: (x + 1) / (x**2 + 3)),
("(x^3-2)/(4x^2+x) ", lambda x: (x**3 - 2) / (4*x**2 + x)),
]
print(f"{'expression':<24} {'x=1e3':>14} {'x=1e6':>14} {'x=1e9':>14}")
for name, f in cases:
print(f"{name:<24} {f(1e3):>14.6f} {f(1e6):>14.6f} {f(1e9):>14.6f}")
print("\n3/2 (equal degrees), 0 (bottom bigger), and off to infinity (top bigger)")
The sign trap, both directions:
from math import sqrt
def f(x):
return sqrt(4 * x**2 + 1) / x
print(f"{'x':>12} {'sqrt(4x^2+1)/x':>18}")
for x in (1e2, 1e4, 1e6, -1e2, -1e4, -1e6):
print(f"{x:>12.0e} {f(x):>18.10f}")
print("\n+2 going right, -2 going left: sqrt(x^2) is |x|, not x")
The hierarchy, and how long "eventually" takes:
from math import log
print(f"{'x':>8} {'x^100 / 1.01^x':>20}")
for x in (100, 1_000, 10_000, 100_000, 500_000, 1_000_000, 2_000_000):
# compare logs: overflow is guaranteed otherwise
log_ratio = 100 * log(x) - x * log(1.01)
print(f"{x:>8} {'10^' + format(log_ratio / log(10), '.1f'):>20}")
print("\nx^100's lead peaks near x=10^4 at about 10^357, is down to 10^68 by")
print("x=100000, and is gone by x = 117308 -- it still loses in the end")
The slant asymptote, closing in:
def f(x):
return (x**2 + 1) / x
print(f"{'x':>10} {'f(x)':>16} {'y = x':>10} {'gap':>12}")
for x in (2, 10, 100, 10_000):
print(f"{x:>10} {f(x):>16.8f} {x:>10} {f(x) - x:>12.8f}")
print("\nthe gap is exactly 1/x -- the remainder after dividing")
Worked example
Find all asymptotes of f(x) = \dfrac{2x^2 - 3x + 1}{x^2 - 4}.
Vertical. The denominator x^2 - 4 = (x-2)(x+2) vanishes at x = \pm2. Check whether the numerator also vanishes there, which would signal a removable hole instead (§1.2):
- At x=2: 2(4) - 6 + 1 = 3 \neq 0 → genuine asymptote at x = 2.
- At x=-2: 2(4)+6+1 = 15 \neq 0 → genuine asymptote at x = -2.
Horizontal. Degrees match (2 and 2), so the limit is the ratio of leading coefficients:
\lim_{x\to\pm\infty}f(x) = \frac{2}{1} = 2
Horizontal asymptote y = 2, in both directions.
Slant. None — a function can't have both a horizontal and a slant asymptote in the same direction, and equal degrees always give horizontal.
Does it cross y = 2? Solve f(x) = 2:
2x^2 - 3x + 1 = 2x^2 - 8 \implies -3x + 1 = -8 \implies x = 3
Yes, at x = 3. The curve crosses its own horizontal asymptote and then approaches it from the other side. Perfectly legal, and a good reminder that asymptotes constrain the tail, not the middle.
Your turn
1. \lim_{x\to\infty}\dfrac{5x^3 - 2x}{3x^3 + x^2 - 1}
2. \lim_{x\to\infty}\left(\sqrt{x^2+x} - x\right)
3. \lim_{x\to\infty}\dfrac{\ln x}{x} and \lim_{x\to\infty}\dfrac{x^{10}}{e^x}
4. Find the slant asymptote of \dfrac{2x^2+3x-1}{x-1}.
Solutions
1. Equal degrees, so read off leading coefficients: \boxed{\frac53}.
Or divide through by x^3 to see it: \frac{5 - 2/x^2}{3 + 1/x - 1/x^3} \to \frac{5}{3}.
2. This is \infty - \infty, which is indeterminate — both terms run to infinity and the answer depends on how fast. Multiply by the conjugate:
\left(\sqrt{x^2+x}-x\right)\cdot\frac{\sqrt{x^2+x}+x}{\sqrt{x^2+x}+x} = \frac{(x^2+x) - x^2}{\sqrt{x^2+x}+x} = \frac{x}{\sqrt{x^2+x}+x}
Divide top and bottom by x (positive, since x \to +\infty):
= \frac{1}{\sqrt{1 + \frac1x} + 1} \longrightarrow \frac{1}{1+1} = \boxed{\frac12}
A nice sanity check on the answer: $\sqrt{x^2+x} \approx \sqrt{(x+\frac12)^2} = x + \frac12$ for large x, so the difference should be about \frac12. ✓
3. Both are \boxed{0}, straight from the hierarchy: \ln x \ll x, and x^{10} \ll e^x.
The second is worth appreciating. At x = 10, x^{10} = 10^{10} while e^{10} \approx 22{,}000 — the polynomial leads by six orders of magnitude. By x = 100, x^{10} = 10^{20} and e^{100} \approx 10^{43}. The exponential has not merely caught up, it has won by 10^{23}.
4. Long-divide 2x^2 + 3x - 1 by x - 1:
\frac{2x^2+3x-1}{x-1} = 2x + 5 + \frac{4}{x-1}
(Check: (x-1)(2x+5) = 2x^2 + 3x - 5, and -5 + 4 = -1 ✓.)
The remainder term \frac{4}{x-1} \to 0, so the slant asymptote is \boxed{y = 2x+5}.
Check yourself in code
Classify end behaviour by comparing degrees.
For each rational function, evaluate at x = 10^{12} and report the limit as
x\to\infty: 0 if |f| < 10^{-3}, inf if |f| > 10^{3}, otherwise the
value rounded to 4 decimals.
Print exactly this:
(3x^2+5x-2)/(2x^2-x+7) 1.5
(x+1)/(x^2+3) 0
(x^3-2)/(4x^2+x) inf
(7x^4+x)/(2x^4-9) 3.5
(5x-1)/(x+1000) 5.0
cases = [
("(3x^2+5x-2)/(2x^2-x+7)", lambda x: (3*x**2 + 5*x - 2) / (2*x**2 - x + 7)),
("(x+1)/(x^2+3)", lambda x: (x + 1) / (x**2 + 3)),
("(x^3-2)/(4x^2+x)", lambda x: (x**3 - 2) / (4*x**2 + x)),
("(7x^4+x)/(2x^4-9)", lambda x: (7*x**4 + x) / (2*x**4 - 9)),
("(5x-1)/(x+1000)", lambda x: (5*x - 1) / (x + 1000)),
]
for name, f in cases:
v = f(1e12)
# report "0", "inf", or the rounded value
print(f"{name:<24} ...")
cases = [
("(3x^2+5x-2)/(2x^2-x+7)", lambda x: (3*x**2 + 5*x - 2) / (2*x**2 - x + 7)),
("(x+1)/(x^2+3)", lambda x: (x + 1) / (x**2 + 3)),
("(x^3-2)/(4x^2+x)", lambda x: (x**3 - 2) / (4*x**2 + x)),
("(7x^4+x)/(2x^4-9)", lambda x: (7*x**4 + x) / (2*x**4 - 9)),
("(5x-1)/(x+1000)", lambda x: (5*x - 1) / (x + 1000)),
]
for name, f in cases:
v = f(1e12)
if abs(v) < 1e-3:
verdict = "0"
elif abs(v) > 1e3:
verdict = "inf"
else:
verdict = str(round(v, 4))
print(f"{name:<24} {verdict}")
A limit at infinity describes end behaviour, and every rational one reduces to \frac{1}{x^p} \to 0 after dividing by the denominator's dominant power. Compare degrees to get the answer without working: smaller top gives 0, equal gives the coefficient ratio, larger gives infinity — and one degree larger gives a slant asymptote you find by long division. Watch \sqrt{x^2} = |x| when heading to -\infty. And across families, the hierarchy \ln \ll power \ll exponential \ll factorial settles most questions on sight.
Next: continuity — the property that makes substitution legal in the first place, and the three distinct ways a function can lack it.