Rational Expressions

Vertical and Horizontal Asymptotes: How to Find Them

The vertical asymptotes of a rational function are the zeros of its denominator that survive after cancelling common factors. The horizontal asymptote comes from comparing degrees: y=0y=0 if the numerator’s degree is smaller, y=anbny=\dfrac{a_n}{b_n} (the ratio of leading coefficients) if the degrees are equal, and none if the numerator’s degree is larger.

y=anbn(numerator and denominator of equal degree n)y=\frac{a_n}{b_n}\quad \text{(numerator and denominator of equal degree } n\text{)}

Those two rules handle most homework problems. The rest of this page explains why they work, so the exceptions stop being surprises: holes, graphs that cross their own asymptote, slanted asymptotes, and functions that are not rational.

What are vertical and horizontal asymptotes?

A vertical asymptote is a line x=ax=a that the graph approaches while the outputs grow without bound. A horizontal asymptote is a line y=by=b that the graph settles toward as xx runs off to the far right or far left. In limit language:

lim⁡x→a±f(x)=±∞andlim⁡x→±∞f(x)=b\lim_{x\to a^{\pm}} f(x)=\pm\infty \qquad\text{and}\qquad \lim_{x\to\pm\infty} f(x)=b

The two answer different questions. A vertical asymptote asks what happens to yy near one particular, finite xx-value. A horizontal asymptote asks what yy does when xx is enormous. That is why a graph can have many vertical asymptotes but, for a rational function, never more than one horizontal asymptote: there is only one “far right” and one “far left”, and a rational function behaves the same way at both ends.

For rational functions, every vertical asymptote is a number missing from the domain of the function. The reverse is not true, since some excluded numbers produce a hole instead. Section 3 covers how to tell them apart.

Reading the notation

x→2+x\to 2^+ means xx approaches 22 from the right (2.1, 2.01, 2.001, ...). x→2−x\to 2^- means from the left (1.9, 1.99, 1.999, ...). The two sides can behave differently.

Quick check

For f(x)=1x−3f(x)=\dfrac{1}{x-3}, the outputs grow toward +∞+\infty as x→3+x\to 3^+. What do they do as x→3−x\to 3^-?

How do you find vertical asymptotes of a rational function?

Near a zero of the denominator, the top settles near some nonzero number NN while the bottom shrinks toward 00. A fixed number divided by something tiny is huge, and that is the whole reason for the spike. If the numerator is also zero at that point, the argument fails, which is why cancelling comes first.

  1. Factor the numerator and denominator completely.
  2. Cancel any factor that appears in both (see simplifying rational expressions).
  3. Set each remaining denominator factor equal to zero and solve.

Example 1. Find the vertical asymptotes of f(x)=2xx2−2x−3f(x)=\dfrac{2x}{x^2-2x-3}.

The denominator factors as (x−3)(x+1)(x-3)(x+1), and nothing cancels with 2x2x. Setting each factor to zero gives x=3x=3 and x=−1x=-1. The numerator is 66 at x=3x=3 and −2-2 at x=−1x=-1, both nonzero, so both lines are vertical asymptotes. The sign tells you which way the graph goes: just right of 33, the top is 66, x−3x-3 is a small positive number and x+1x+1 is near 44, so f→+∞f\to+\infty. Just left of 33, x−3x-3 is a small negative number, so f→−∞f\to-\infty.

When the denominator will not factor, the zeros still exist. For x2−2x−4x^2-2x-4, the quadratic formula gives x=1±5x=1\pm\sqrt5, so those are the asymptotes.

Even or odd multiplicity

The graph of 1(x−2)2\dfrac{1}{(x-2)^2} shoots to +∞+\infty on both sides of x=2x=2, while 1(x−2)3\dfrac{1}{(x-2)^3} flips from −∞-\infty to +∞+\infty. An even power keeps the sign, an odd power reverses it.

Vertical asymptote or hole: how can you tell?

A hole is a single missing point; an asymptote is a wall. If a factor (x−a)(x-a) appears in both the numerator and the denominator, the function equals the simpler cancelled version everywhere except at x=ax=a. At that one point the original is undefined, but nearby the outputs stay finite, so the graph shows an open circle (a hole) rather than a spike.

Example 2. Find all vertical asymptotes and holes of f(x)=x2−x−6x2−4f(x)=\dfrac{x^2-x-6}{x^2-4}.

Factor both parts:

f(x)=(x−3)(x+2)(x−2)(x+2)=x−3x−2,x≠−2f(x)=\frac{(x-3)(x+2)}{(x-2)(x+2)}=\frac{x-3}{x-2},\quad x\neq -2

The factor x+2x+2 cancels, so x=−2x=-2 is a hole. Its height comes from the simplified function: −2−3−2−2=−5−4=54\dfrac{-2-3}{-2-2}=\dfrac{-5}{-4}=\dfrac54, so the hole sits at (−2,54)\left(-2,\tfrac54\right). The factor x−2x-2 does not cancel, so x=2x=2 is the vertical asymptote. The degrees are equal, so the horizontal asymptote is y=1y=1.

The trap that costs the most points here is cancelling terms instead of factors. In x2−4x−2\dfrac{x^2-4}{x-2} you cannot cross out the xx‘s or the 22‘s. Factor first, then cancel. The same factor-and-cancel habit powers multiplying and dividing rational expressions.

How do you find horizontal asymptotes?

The rule comes from one idea: when xx is huge, only the highest powers matter. Divide the top and bottom by the highest power of xx in the denominator, and every leftover term with xx in its denominator vanishes:

3x2+52x2−x=3+5x22−1x ⟶ 32(x→±∞)\frac{3x^2+5}{2x^2-x}=\frac{3+\frac{5}{x^2}}{2-\frac{1}{x}}\ \longrightarrow\ \frac{3}{2}\quad (x\to\pm\infty)

Call the degree of the numerator nn and the degree of the denominator mm. That one trick produces all three cases:

Comparison Horizontal asymptote
n<mn<m y=0y=0
n=mn=m y=anbmy=\dfrac{a_n}{b_m} (leading coefficients)
n>mn>m none

When n<mn<m, the bottom outgrows the top, so the quotient is crushed toward zero. When n>mn>m, the top wins and the quotient grows without limit, so there is no finite value to settle on. Compare degrees, not the number of terms: x100x100+1\dfrac{x^{100}}{x^{100}+1} has two terms below and one above, but equal degrees give y=1y=1.

Horizontal asymptotes with negatives and fractions

Negative and fractional leading coefficients follow the same rule, but the coefficient has to be read with its sign and from the highest power, wherever that term sits. Functions written out of order are a classic trap.

Example 3. Find all asymptotes of g(x)=3−6x24x2+8xg(x)=\dfrac{3-6x^2}{4x^2+8x}.

The highest power on top is −6x2-6x^2, even though 33 is written first. The highest power on the bottom is 4x24x^2. The degrees are equal, so

y=−64=−32y=\frac{-6}{4}=-\frac32

For the vertical asymptotes, factor the denominator: 4x2+8x=4x(x+2)4x^2+8x=4x(x+2), with zeros x=0x=0 and x=−2x=-2. The numerator is 33 at x=0x=0 and 3−24=−213-24=-21 at x=−2x=-2, so neither cancels. The asymptotes are x=0x=0, x=−2x=-2 and y=−32y=-\tfrac32.

If a function arrives as a sum, combine it before reading off degrees. For instance, 1x+1x+2\dfrac1x+\dfrac1{x+2} becomes 2x+2x(x+2)\dfrac{2x+2}{x(x+2)} after adding rational expressions, which shows asymptotes at x=0x=0, x=−2x=-2 and y=0y=0 at a glance.

Quick check

Find the horizontal asymptote of f(x)=5−2x3x+7f(x)=\dfrac{5-2x}{3x+7}.

Can a graph cross a horizontal asymptote?

Yes, and many textbooks bury this. A horizontal asymptote is a statement about the far ends of the graph, not a barrier. In the middle, the graph can wander across the line, even several times, before it eventually settles.

Take f(x)=2x2−3xx2+1f(x)=\dfrac{2x^2-3x}{x^2+1}. Its horizontal asymptote is y=2y=2. To see whether the graph ever hits that height, solve f(x)=2f(x)=2:

2x2−3x=2(x2+1) ⇒ −3x=2 ⇒ x=−232x^2-3x=2(x^2+1)\ \Rightarrow\ -3x=2\ \Rightarrow\ x=-\frac23

At x=−23x=-\tfrac23, the numerator is 89+2=269\tfrac{8}{9}+2=\tfrac{26}{9} and the denominator is 49+1=139\tfrac49+1=\tfrac{13}{9}, a ratio of exactly 22. So the graph crosses its own asymptote once, then drifts back toward it as x→±∞x\to\pm\infty.

A vertical asymptote is different. At x=ax=a the function is undefined, so the graph has no point there to cross with.

Try this: Find where f(x)=4x2+xx2+3f(x)=\dfrac{4x^2+x}{x^2+3} crosses its horizontal asymptote. Find the asymptote first, set f(x)f(x) equal to it, and you should land on x=12x=12.

Slant asymptotes when the degrees do not fit

When the numerator’s degree is exactly one more than the denominator’s, there is no horizontal asymptote. The graph follows a tilted line instead, called a slant asymptote. Polynomial division finds it: the quotient is the line, and the remainder term is what fades away.

Example 4. Find the slant and vertical asymptotes of h(x)=x2+3x+1x−1h(x)=\dfrac{x^2+3x+1}{x-1}.

Divide x2+3x+1x^2+3x+1 by x−1x-1. The quotient is x+4x+4 and the remainder is 55, since (x−1)(x+4)=x2+3x−4(x-1)(x+4)=x^2+3x-4 and 1−(−4)=51-(-4)=5. Therefore

h(x)=x+4+5x−1h(x)=x+4+\frac{5}{x-1}

As x→±∞x\to\pm\infty, the fraction 5x−1\dfrac{5}{x-1} shrinks to 00, leaving the line y=x+4y=x+4 in slope-intercept form. The denominator gives the vertical asymptote x=1x=1.

Splitting a fraction into a polynomial plus a proper fraction is also the first step of partial fraction decomposition. A function can have a horizontal or a slant asymptote, never both. If the numerator’s degree is two or more above the denominator’s, the end behavior follows a curve like a parabola, and there is no line to name.

Asymptotes of exponential, log and trig functions

Asymptotes are not exclusive to fractions. The same two ideas (blow-up at a finite xx, level-off at infinity) apply to any function, though the “at most one horizontal asymptote” rule no longer holds.

  • f(x)=2x+3f(x)=2^x+3: as x→−∞x\to-\infty, 2x→02^x\to0, so y=3y=3 is a horizontal asymptote on the left. The right side grows without limit.
  • f(x)=arctan⁡xf(x)=\arctan x: levels off at y=π2y=\tfrac{\pi}{2} on the right and y=−π2y=-\tfrac{\pi}{2} on the left, so it has two.
  • f(x)=xx2+1f(x)=\dfrac{x}{\sqrt{x^2+1}}: for x→∞x\to\infty it tends to 11. For x→−∞x\to-\infty, x2=∣x∣=−x\sqrt{x^2}=|x|=-x, so it tends to −1-1.
  • f(x)=ln⁡xf(x)=\ln x: as x→0+x\to0^+ the output drops to −∞-\infty, so x=0x=0 is a vertical asymptote.

The logarithm case is worth understanding rather than memorizing. A log is only defined for positive inputs, and the logarithm rules show why ln⁡\ln of a tiny positive number is a large negative one. Similarly, tan⁡x\tan x has vertical asymptotes wherever cos⁡x=0\cos x=0, which is x=π2+kπx=\tfrac{\pi}{2}+k\pi for any integer kk.

Quick check

Find the horizontal asymptote of f(x)=4(12)x+1f(x)=4\left(\tfrac12\right)^x+1 as x→∞x\to\infty.

Where asymptotes show up in real problems

Asymptotes describe limits of real quantities. A business with a fixed cost of $500 and a cost of $2 per item has an average cost per item of

A(x)=500+2xx=2+500xA(x)=\frac{500+2x}{x}=2+\frac{500}{x}

The horizontal asymptote is y=2y=2: no matter how many items are made, the average cost never drops below the $2 per-item cost, and it only creeps toward it. At x=100x=100 the average is $7, and at x=1000x=1000 it is $2.50. The vertical asymptote at x=0x=0 reflects that spreading $500 over almost no items is absurdly expensive.

The same shape appears in drug concentration models (the concentration of a dose in the blood tends toward 00), in travel time t=dvt=\dfrac{d}{v} (time blows up as speed v→0v\to0), and in terminal velocity, where speed levels off at a horizontal asymptote. In calculus, these ideas return as limits at infinity and infinite limits, and the work you do here carries over unchanged.

How to check your asymptotes in thirty seconds

Plug in numbers. For a vertical asymptote at x=ax=a, test x=a±0.001x=a\pm0.001 and confirm the output is huge. For Example 1, f(3.001)=6.0020.001×4.001≈1500f(3.001)=\dfrac{6.002}{0.001\times4.001}\approx1500, which fits an asymptote at x=3x=3. For a horizontal asymptote, test a large xx such as 10001000. For Example 3, g(1000)=3−6,000,0004,008,000≈−1.497g(1000)=\dfrac{3-6{,}000{,}000}{4{,}008{,}000}\approx-1.497, close to −32-\tfrac32 and creeping toward it.

Then run three sanity checks. A vertical asymptote should never also be an xx where the function has a finite value, so confirm your cancelling was done on factors. A rational function should have one horizontal or slant asymptote at most, and none if the numerator’s degree is two or more higher. And if a denominator has no real zeros, such as x2+1x^2+1, expect no vertical asymptote at all.

Practice problems

0 of 5 solved

  1. Find the vertical and horizontal asymptotes of f(x)=2x+5f(x)=\dfrac{2}{x+5}.

  2. Find the vertical and horizontal asymptotes of f(x)=4x−12x+6f(x)=\dfrac{4x-1}{2x+6}.

  3. Find all asymptotes and any hole of f(x)=x2−1x2+x−2f(x)=\dfrac{x^2-1}{x^2+x-2}.

  4. Find the vertical and horizontal asymptotes of f(x)=7−x22x2+x−3f(x)=\dfrac{7-x^2}{2x^2+x-3}.

  5. Find the slant asymptote and vertical asymptote of f(x)=2x2−3x+4x+2f(x)=\dfrac{2x^2-3x+4}{x+2}.

Common questions

How do you find vertical and horizontal asymptotes?

For vertical asymptotes, factor and cancel, then set the remaining denominator factors equal to zero. For the horizontal asymptote, compare the degrees of the numerator and denominator: smaller gives y=0y=0, equal gives the ratio of leading coefficients, larger gives none.

Can a function have more than one horizontal asymptote?

A rational function has at most one. Functions like arctan⁡x\arctan x or xx2+1\dfrac{x}{\sqrt{x^2+1}} can have two, one for x→∞x\to\infty and a different one for x→−∞x\to-\infty.

What is the difference between a hole and a vertical asymptote?

Both come from a zero of the denominator. If the factor cancels with the numerator, the graph has a hole. If it survives after cancelling, the graph has a vertical asymptote.

Can a graph cross a horizontal asymptote?

Yes. A horizontal asymptote only describes behavior far from the origin, so the graph can cross it any number of times in the middle. A graph can never cross a vertical asymptote, because the function is undefined there.

Why is there no horizontal asymptote when the numerator has a higher degree?

The top grows faster than the bottom, so the quotient keeps growing instead of settling on a value. If the numerator's degree is exactly one higher, the graph follows a slanted line instead.

Do all rational functions have vertical asymptotes?

No. If the denominator has no real zeros, as in 1x2+1\dfrac{1}{x^2+1}, there is no vertical asymptote. If every zero cancels, only holes remain.

Up next