On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Advanced Functions · Grade 9-12

Rational Functions

A rational function is p(x)q(x), a ratio of two polynomials.

f(x)=p(x)q(x) where p(x) and q(x) are polynomials and q(x)≠0

Quick Answer

A rational function is p(x)q(x), a ratio of two polynomials. Use one when the variable sits in a denominator: average cost per item, travel time dv at speed v, the strength of a drink as you add water. Where the denominator is zero the function is undefined, which gives a vertical asymptote (a wall the graph runs along) or, if the factor cancels with the numerator, a hole. Far from the origin, comparing the degrees of top and bottom gives the horizontal asymptote.

Why This Matters

Rational functions model 'per' quantities that change, and they show limits you approach but never reach: the average cost per printed book falls toward the per-copy cost but never below it. Without tracking the denominator you can accept a solution the function forbids, or miss that a graph has a wall where outputs become enormous.

Intuitive Explanation

Driving 120 km takes t(v)=120v hours at speed v. At 60 km/h that is 2 hours, at 30 km/h it is 4 hours, at 1 km/h it is 120 hours. As the speed shrinks toward 0 the time grows without limit, and at v=0 there is no answer at all. On a graph this is a vertical asymptote: the curve climbs alongside the line v=0 without ever touching it.

Every rational function behaves like a polynomial except near the zeros of its denominator. There the outputs blow up, unless the numerator shares the same factor. In x2−1x−1 both top and bottom contain (x−1), so near x=1 the fraction behaves like x+1 and approaches 2: the graph has a single missing point, a hole, rather than a wall.

Far from the origin, the leading terms decide. In 3x2+1x2−4 top and bottom both have degree 2, so for large x the fraction is close to 3x2x2=3, a horizontal asymptote at y=3. If the bottom has the higher degree, as in xx2+1, the outputs shrink toward 0. Contrast x2+12: it has a fraction bar, but its denominator is a constant, so it is the polynomial 12x2+12 with no asymptotes at all.

Think of it like this. Sharing 8 slices of pizza among n people gives each person 8n slices: few for a big group, a huge amount as the group shrinks toward nobody, where the question stops making sense. The picture fits the wall at zero; unlike people, a function's inputs can also be fractions or negatives.

Core idea. A rational function is one polynomial divided by another, behaving normally except where the denominator hits zero.


When to Use

Use a rational model when a quantity is a ratio with the variable in the denominator: a 'per' quantity (cost per item, hours per trip at speed v), a fixed amount shared out, or a mixture's concentration. Then find the excluded inputs, decide whether each denominator zero is a hole or an asymptote, and compare degrees for the long-run value. If the denominator is a plain number, the function is a polynomial; if the variable is in an exponent, it is exponential.

Tip. Ask: Is the function a polynomial divided by another polynomial containing the variable?

How to Recognize It

Before sketching a rational function, factor the top and bottom completely, because the factors decide where the graph breaks and how.

  1. Does the denominator become zero for some real input?

    Yes means those inputs are excluded and the graph breaks there. If it never does, as with xx2+1, the function is defined everywhere and has no vertical asymptote.

  2. Does a zero of the denominator also cancel with a factor of the numerator?

    Yes means a hole, a removable discontinuity: (x−2)(x+1)x−2 has a hole at (2,3). A zero that does not cancel gives a vertical asymptote instead.

  3. Is the degree of the bottom at least the degree of the top?

    Yes means a horizontal asymptote: equal degrees give the ratio of leading coefficients, and a bigger bottom gives y=0. If the top's degree is exactly one more, the graph follows a slanted line found by polynomial division.

  4. Is the denominator a plain number with no x in it?

    Yes means a polynomial in disguise: x2+3x3 is the polynomial 13x2+x, with no breaks at all. Only a variable in the denominator makes a function rational.

Rational Functions compared with Polynomial function, Asymptote, and Removable discontinuity (hole)

These rows all come up when a variable sits in a denominator, so their names get swapped. Ask whether you are classifying the whole formula (rational or polynomial) or naming one feature of its graph: a line it approaches (asymptote) or a single missing point (hole).

Rational Functions

Meaning
Use this when a variable appears in a denominator, so you must track asymptotes and excluded inputs.
Key test
Is the function a polynomial divided by another polynomial containing the variable?
Formula
f(x)=p(x)q(x) where p(x) and q(x) are polynomials and q(x)≠0
Example
Find the vertical asymptote of f(x)=x+4x−5.

Polynomial function

Meaning
Has no variable in the denominator, so it is smooth everywhere with no asymptotes.
Key test
Use when there is no division by an x-expression.
Formula
anxn+⋯+a0
Example
x2+3x is polynomial; x2+3xx−1 is rational

Asymptote

Meaning
A line the rational graph approaches; a feature of the function, not the function itself.
Key test
Use when naming the boundary line, not classifying the whole expression.
Formula
x=a or y=L
Example
1x−2 has the asymptote x=2

Removable discontinuity (hole)

Meaning
A single missing point from a cancelled common factor, not a blow-up.
Key test
Use when a factor cancels from both top and bottom.
Example
x2−1x−1 has a hole at x=1, no asymptote there

Formula & Notation

f(x)=p(x)q(x) where p(x) and q(x) are polynomials and q(x)≠0
R(x)=p(x)q(x) where p,q are polynomials, q≢0, with Dom(R)={x∈R∣q(x)≠0}

How to read it: Vertical asymptotes where q(x)=0 after cancelling factors shared with p(x) (a cancelled factor gives a hole). Horizontal asymptote determined by comparing degrees of p and q.

Worked Examples

Example 1 — Find the vertical asymptote

Easy

Find the vertical asymptote of f(x)=x+4x−5.
Show the steps and the answer
  1. Find where the bottom vanishes: x−5=0 at x=5.

    A vertical asymptote can occur only where the function divides by zero.

  2. Check the numerator there: 5+4=9≠0.

    If the top were also 0, the factor might cancel and leave a hole instead of an asymptote.

  3. Confirm the blow-up: f(5.01)=9.010.01=901 and f(4.99)=8.99−0.01=−899.

    A nonzero number over a tiny denominator is huge, positive on one side and negative on the other: that is the wall.

Answer: x=5

Takeaway: A zero of the denominator that does not cancel with the numerator gives a vertical asymptote.

Example 2 — Hole, not asymptote

Standard

Where does f(x)=(x−3)(x+1)x−3 break?
Show the steps and the answer
  1. Find where the formula is undefined: the denominator is 0 at x=3, so 3 is out of the domain.

    The original formula divides by zero there, whatever the simplified version looks like.

  2. Notice that the numerator is 0 at x=3 too, with the factor (x−3) on top and bottom.

    A shared factor means the outputs near 3 do not blow up; the fraction behaves like x+1.

  3. Simplify for x≠3 to f(x)=x+1, and test nearby: f(2.99)=3.99, f(3.01)=4.01.

    The outputs close in on 4, so the graph is the line y=x+1 with one point missing.

  4. Locate the hole at (3,4).

    The hole's height is the simplified function's value at the excluded input: 3+1=4.

Answer: Hole at x=3, no vertical asymptote

Takeaway: A denominator zero that cancels with the numerator is a hole, not an asymptote, and the simplified formula tells you where the hole is.

Example 3 — Find the mistake: the hidden hole

Application

Simplify g(x)=x2−4x−2 and state its domain. Jada writes: "x2−4x−2=(x−2)(x+2)x−2=x+2, so g is the line y=x+2 with domain all real numbers." Find the mistake and correct it.
Show the steps and the answer
  1. Check Jada's factoring: (x−2)(x+2)=x2−4.

    The algebra is right; the error is in what the cancellation hides.

  2. Evaluate the original at x=2: g(2)=4−42−2=00, which is undefined.

    Cancelling cannot make a division by zero legal; x=2 was excluded before simplifying and stays excluded.

  3. State the domain as all reals except 2, with g(x)=x+2 only for x≠2.

    The simplified formula matches g everywhere except the single input the original forbids.

  4. Draw the line y=x+2 with an open circle at (2,4).

    Near x=2 the outputs approach 2+2=4, so the gap is one missing point, not a wall.

Answer: g(x)=x+2 for x≠2; the domain is all reals except 2, and the graph has a hole at (2,4).

Takeaway: Record the excluded inputs before you cancel; a cancelled factor leaves a hole that the simplified formula does not show.

Where You'll See It

  • Average cost of a print run

    A printer charges a $200 setup fee plus $3 per book, so the average cost per book is A(n)=200+3nn. At 50 books it is $7; at 1000 books it is $3.20. The horizontal asymptote y=3 shows the average approaches $3 but never reaches it.

  • Diluting juice concentrate

    Mixing 1 L of concentrate that is 60% juice with w litres of water gives a juice fraction of C(w)=0.61+w. With 2 L of water it is 20%. More water pushes it toward 0, the horizontal asymptote, without ever reaching it.

  • Travel time at different speeds

    A 300 km trip takes 300v hours. Going from 100 to 120 km/h saves 30 minutes, but going from 50 to 60 km/h saves a full hour. The curve is steepest at low speeds, so small speed gains matter most when traffic is slow.

Common Mistakes

  1. The slip: Forgetting to exclude inputs where the denominator is zero

    Instead: those are never in the domain.

  2. The slip: Cancelling a common factor and ignoring the resulting hole

    Instead: the cancelled input stays excluded as a hole.

  3. The slip: Assuming a vertical asymptote wherever the denominator is zero

    Instead: if the factor also cancels, it is a hole, not an asymptote.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Find the domain of f(x)=2xx2−16.

    Hint: Set the denominator equal to zero and solve.

  2. Find the holes and vertical asymptotes of g(x)=x+2(x+2)(x−1).

    Hint: A factor that cancels makes a hole; one that stays in the denominator makes an asymptote.

  3. Find the horizontal asymptote of h(x)=6x+12x−3.

    Hint: Compare the degrees of the top and bottom.

  4. Find the x-intercept and the y-intercept of f(x)=x−4x+2.

    Hint: The x-intercept needs the numerator to be zero; the y-intercept is f(0).

  5. Is f(x)=x2+3x5 a rational function with excluded inputs, or a polynomial?

    Hint: Can the denominator ever be zero?

  6. A student says 'f(x)=x2−9x−3 simplifies to x+3, so its graph is the whole line y=x+3.' Find and correct the mistake.

    Hint: Which input made the original denominator zero?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why does the average cost per copy never drop to zero, however many copies are printed?

If a print run costs $500 to set up plus $2 per copy, the average cost per copy is 500+2nn=2+500n\frac{500+2n}{n}=2+\frac{500}{n}. As nn grows, the setup cost is shared among more copies and the average falls toward $2, the horizontal asymptote. It never reaches $2, because a sliver of setup cost always remains, so big print runs get cheaper per copy but never cheaper than the materials.

Why does 1x2 shoot upward on both sides of 0, while 1x goes up on one side and down on the other?

The sign near a vertical asymptote depends on how many times the factor appears. x2x^2 is positive on both sides of 0, so 1x2\frac{1}{x^2} rises to +∞+\infty from both sides. xx changes sign at 0, so 1x\frac{1}{x} falls to −∞-\infty on the left and rises to +∞+\infty on the right. In general, an even power of the factor keeps the same sign on both sides and an odd power flips it.

How do I find where a rational function crosses the x-axis?

Set the numerator equal to zero, but keep only solutions where the denominator is not also zero. For x2−9x−3\frac{x^2-9}{x-3}, the numerator is zero at 3 and −3-3, but x=3x=3 also makes the denominator zero, so it is a hole, not a crossing. The only xx-intercept is x=−3x=-3. A fraction is zero only when its top is zero and its bottom is not.

Is xx+1 a rational function?

No. A rational function must be a polynomial over a polynomial, and x\sqrt{x} is not a polynomial; the same goes for 2xx\frac{2^x}{x}. Such functions can still have asymptotes and holes, found the same way, by checking where the denominator is zero. They just do not follow the degree-comparison rules for horizontal asymptotes, which only work when both top and bottom are polynomials.

Learning Path

Rational Functions

You are here

Next →

Asymptote
You need Polynomial Functions (degree, factoring, zeros) and Fractions (a zero denominator is undefined). Rational Functions add excluded inputs, holes from cancelled factors, and behavior near and far from the denominator's zeros. Next, Asymptote makes precise the lines these graphs approach: vertical walls, horizontal levels and slanted lines.

See Also