Chapter 3: Rational Functions

Precalculus · Updated February 2026 · 25 min read

Rational functions appear throughout mathematics, science, and engineering. From modeling the concentration of a drug in the bloodstream to describing the relationship between pressure and volume in a gas, these functions capture behaviors that polynomials alone cannot. In this chapter, we study rational functions systematically: their domains, asymptotic behavior, discontinuities, and graphs. We also develop techniques for solving rational equations and inequalities, which arise frequently in applications and in later courses such as calculus.

3.1 Introduction to Rational Functions

You are already familiar with polynomial functions such as $f(x) = 2x^3 - x + 5$. A rational function is simply the ratio of two polynomial functions. Just as a rational number is a ratio of two integers, a rational function is a ratio of two polynomials.

Definition: Rational Function

A rational function is any function that can be written in the form

$$f(x) = \frac{p(x)}{q(x)}$$

where $p(x)$ and $q(x)$ are polynomial functions and $q(x) \neq 0$. The polynomial $p(x)$ is called the numerator and $q(x)$ is the denominator.

Some familiar examples of rational functions include:

Every polynomial is technically a rational function (with denominator 1), but the interesting behavior arises when the denominator can equal zero. This leads us to the most important preliminary concept: finding the domain.

Finding the Domain

The domain of a rational function $f(x) = \frac{p(x)}{q(x)}$ consists of all real numbers $x$ for which $q(x) \neq 0$. Division by zero is undefined, so we must exclude any value of $x$ that makes the denominator zero.

Domain of a Rational Function

To find the domain of $f(x) = \dfrac{p(x)}{q(x)}$:

1. Set the denominator $q(x) = 0$.

2. Solve for $x$ to find the excluded values.

3. The domain is all real numbers except those excluded values.

Example 3.1.1: Finding the Domain of a Rational Function

Find the domain of $f(x) = \dfrac{x + 3}{x^2 - 5x + 6}$.

Solution: Set the denominator equal to zero and solve:

$$x^2 - 5x + 6 = 0$$

$$(x - 2)(x - 3) = 0$$

$$x = 2 \quad \text{or} \quad x = 3$$

The denominator equals zero when $x = 2$ or $x = 3$. Since the numerator is $x + 3$, which does not equal zero at either of these values ($2 + 3 = 5 \neq 0$ and $3 + 3 = 6 \neq 0$), neither factor cancels.

The domain is all real numbers except $x = 2$ and $x = 3$. In interval notation:

$$\text{Domain: } (-\infty, 2) \cup (2, 3) \cup (3, \infty)$$

Notice that when we find excluded values, we are also identifying candidates for vertical asymptotes or holes in the graph. We will return to this distinction in Sections 3.2 and 3.3.

3.2 Vertical and Horizontal Asymptotes

Asymptotes are lines that the graph of a function approaches but never reaches (or reaches only in a limiting sense). Rational functions can have three types of asymptotes: vertical, horizontal, and oblique (slant). Understanding asymptotes is essential for sketching the graph and understanding the long-term behavior of the function.

Vertical Asymptotes

Definition: Vertical Asymptote

The line $x = a$ is a vertical asymptote of $f(x) = \dfrac{p(x)}{q(x)}$ if $q(a) = 0$ but the factor $(x - a)$ does not cancel completely from the numerator and denominator. Near a vertical asymptote, the function values grow without bound: $f(x) \to +\infty$ or $f(x) \to -\infty$.

To find vertical asymptotes:

  1. Factor the numerator $p(x)$ and denominator $q(x)$ completely.
  2. Cancel any common factors (these produce holes, covered in Section 3.3).
  3. Set the remaining denominator equal to zero and solve. Each solution gives a vertical asymptote.

Example 3.2.1: Finding Vertical Asymptotes

Find the vertical asymptotes of $f(x) = \dfrac{x + 1}{x^2 - 1}$.

Solution: Factor both the numerator and denominator:

$$f(x) = \frac{x + 1}{(x - 1)(x + 1)}$$

The factor $(x + 1)$ appears in both numerator and denominator, so it cancels:

$$f(x) = \frac{1}{x - 1}, \quad x \neq -1$$

The remaining denominator is $x - 1$. Setting $x - 1 = 0$ gives $x = 1$.

Therefore, $x = 1$ is the only vertical asymptote. (The value $x = -1$ is a hole, not a vertical asymptote, because the factor canceled.)

Horizontal Asymptotes

While vertical asymptotes describe behavior near excluded $x$-values, horizontal asymptotes describe the end behavior of the function as $x \to \pm\infty$. The key is to compare the degrees of the numerator and denominator.

Horizontal Asymptote Rules

Let $f(x) = \dfrac{p(x)}{q(x)}$ where $\deg(p) = n$ and $\deg(q) = m$.

Case 1: If $n < m$ (numerator degree less than denominator degree), then $y = 0$ is the horizontal asymptote.

Case 2: If $n = m$ (degrees are equal), then $y = \dfrac{a_n}{b_m}$ is the horizontal asymptote, where $a_n$ and $b_m$ are the leading coefficients of $p(x)$ and $q(x)$ respectively.

Case 3: If $n > m$ (numerator degree greater than denominator degree), there is no horizontal asymptote. If $n = m + 1$, there is an oblique (slant) asymptote instead.

These rules follow directly from the behavior of polynomial ratios at infinity. When $x$ is very large, only the highest-degree terms matter.

Example 3.2.2: Determining Horizontal Asymptotes

Find the horizontal asymptote of each function, if one exists.

(a) $f(x) = \dfrac{3x - 1}{5x + 2}$

Both numerator and denominator have degree 1. The ratio of leading coefficients is $\frac{3}{5}$.

$$\text{Horizontal asymptote: } y = \frac{3}{5}$$

(b) $g(x) = \dfrac{4}{x^2 + 1}$

The numerator has degree 0 and the denominator has degree 2. Since $0 < 2$, the horizontal asymptote is $y = 0$.

(c) $h(x) = \dfrac{x^3 + 2}{x - 1}$

The numerator has degree 3 and the denominator has degree 1. Since $3 > 1$, there is no horizontal asymptote.

Oblique (Slant) Asymptotes

When the degree of the numerator is exactly one more than the degree of the denominator, the graph approaches a slanted line as $x \to \pm\infty$. To find this oblique asymptote, perform polynomial long division (or synthetic division).

Example 3.2.3: Finding an Oblique Asymptote

Find the oblique asymptote of $f(x) = \dfrac{x^2 + 3x + 5}{x + 1}$.

Solution: Perform polynomial long division. Divide $x^2 + 3x + 5$ by $x + 1$:

$$x^2 + 3x + 5 = (x + 1)(x + 2) + 3$$

Therefore:

$$f(x) = \frac{x^2 + 3x + 5}{x + 1} = x + 2 + \frac{3}{x + 1}$$

As $x \to \pm\infty$, the remainder term $\frac{3}{x+1} \to 0$. So the graph approaches the line $y = x + 2$.

Oblique asymptote: $y = x + 2$.

Common Mistake: Students sometimes assume that the graph of a function never crosses a horizontal asymptote. This is only guaranteed for vertical asymptotes. A function can cross its horizontal asymptote at finite $x$-values; the asymptote only describes behavior as $x \to \pm\infty$.

3.3 Holes (Removable Discontinuities)

Sometimes when you factor the numerator and denominator of a rational function, a common factor appears in both. Canceling this factor simplifies the function, but the original excluded value remains outside the domain. The result is a single missing point on an otherwise continuous curve — a hole in the graph.

Definition: Hole (Removable Discontinuity)

If $f(x) = \dfrac{p(x)}{q(x)}$ and both $p(a) = 0$ and $q(a) = 0$, and the factor $(x - a)$ cancels completely from the fraction, then $f$ has a hole (also called a removable discontinuity) at $x = a$. The $y$-coordinate of the hole is found by evaluating the simplified function at $x = a$.

The procedure for finding holes is straightforward:

  1. Factor the numerator and denominator completely.
  2. Identify any common factors $(x - a)$.
  3. Cancel the common factors to obtain the simplified function.
  4. Evaluate the simplified function at $x = a$ to find the $y$-coordinate. The hole is at the point $(a, y)$.

Example 3.3.1: Finding a Hole

Find the hole in the graph of $f(x) = \dfrac{x^2 - x - 2}{x - 2}$.

Solution: Factor the numerator:

$$f(x) = \frac{(x - 2)(x + 1)}{x - 2}$$

The factor $(x - 2)$ appears in both the numerator and denominator, so it cancels:

$$f(x) = x + 1, \quad x \neq 2$$

The simplified function is $y = x + 1$, which is a straight line. However, $x = 2$ is still excluded from the domain. To find the $y$-coordinate of the hole, substitute $x = 2$ into the simplified expression:

$$y = 2 + 1 = 3$$

Therefore, there is a hole at the point $(2, 3)$. The graph looks exactly like the line $y = x + 1$, except with a single point missing at $(2, 3)$.

Visualizing a Hole with Desmos

The graph below compares the original function $y = \frac{(x-2)(x+1)}{(x-2)}$ (blue) with the simplified line $y = x + 1$ (dashed gray). The open circle at $(2, 3)$ indicates the hole — the one point where the original function is undefined.

The rational function $y = \frac{(x-2)(x+1)}{x-2}$ has a hole at $(2, 3)$. The dashed line shows $y = x + 1$ for reference.

Example 3.3.2: Distinguishing Holes from Vertical Asymptotes

Find all holes and vertical asymptotes of $g(x) = \dfrac{x^2 - 9}{x^2 - 5x + 6}$.

Solution: Factor completely:

$$g(x) = \frac{(x - 3)(x + 3)}{(x - 2)(x - 3)}$$

The factor $(x - 3)$ cancels:

$$g(x) = \frac{x + 3}{x - 2}, \quad x \neq 3$$

Hole: At $x = 3$. The $y$-coordinate is $g_{\text{simplified}}(3) = \frac{3 + 3}{3 - 2} = \frac{6}{1} = 6$. The hole is at $(3, 6)$.

Vertical asymptote: The remaining denominator is $x - 2$. Setting $x - 2 = 0$ gives $x = 2$. So $x = 2$ is a vertical asymptote.

3.4 Graphing Rational Functions

We now combine all the tools developed in the previous sections into a systematic procedure for graphing rational functions by hand. While graphing calculators can produce a graph instantly, understanding the underlying structure — asymptotes, intercepts, and sign behavior — is essential for solving problems where you need to reason about a function's behavior without technology.

Step-by-Step Procedure for Graphing Rational Functions

Step 1 Factor the numerator and denominator completely.

Step 2 Domain: Identify all excluded values (where the denominator is zero).

Step 3 Simplify: Cancel common factors. Common factors produce holes; remaining denominator zeros produce vertical asymptotes.

Step 4 Horizontal/Oblique Asymptote: Compare degrees of numerator and denominator.

Step 5 Intercepts: Find $x$-intercepts (set numerator of simplified form to zero) and the $y$-intercept (evaluate $f(0)$, if $0$ is in the domain).

Step 6 Sign Analysis: Use a sign chart to determine where $f(x)$ is positive and where it is negative.

Step 7 Plot and connect: Plot the intercepts, asymptotes, and a few additional points. Sketch the curve, ensuring it respects the sign chart and approaches the asymptotes correctly.

Example 3.4.1: Complete Graph of a Rational Function

Graph $f(x) = \dfrac{2x}{x^2 - 4}$.

Step 1 Factor: $f(x) = \dfrac{2x}{(x-2)(x+2)}$. No common factors.

Step 2 Domain: $x \neq 2$ and $x \neq -2$.

Step 3 No holes. Vertical asymptotes at $x = 2$ and $x = -2$.

Step 4 The numerator has degree 1, the denominator has degree 2. Since $1 < 2$, the horizontal asymptote is $y = 0$.

Step 5 $x$-intercept: Set numerator $2x = 0$, so $x = 0$. The $x$-intercept is $(0, 0)$. $y$-intercept: $f(0) = 0$, so the $y$-intercept is also $(0, 0)$.

Step 6 Sign analysis: The critical values that divide the number line are $x = -2, 0, 2$.

Step 7 The function passes through the origin, is negative to the left of $x = -2$ and between $0$ and $2$, and is positive on $(-2, 0)$ and $(2, \infty)$. It approaches $y = 0$ as $x \to \pm\infty$.

Interactive Exploration: Transformations of $y = \frac{a}{x-h} + k$

The function $y = \frac{a}{x - h} + k$ is a transformation of the basic reciprocal function $y = \frac{1}{x}$. The parameter $a$ controls the vertical stretch and reflection, $h$ shifts the vertical asymptote, and $k$ shifts the horizontal asymptote. Use the sliders below to explore how each parameter affects the graph.

Interactive: Adjust sliders for $a$, $h$, and $k$ to see how transformations affect the rational function $y = \frac{a}{x - h} + k$. Red dashed line: vertical asymptote $x = h$. Green dashed line: horizontal asymptote $y = k$.

Example 3.4.2: Using Transformations to Graph a Rational Function

Graph $f(x) = \dfrac{-3}{x + 2} + 1$ by identifying transformations of $y = \dfrac{1}{x}$.

Solution: Rewrite in the form $y = \frac{a}{x - h} + k$:

$$f(x) = \frac{-3}{x - (-2)} + 1$$

So $a = -3$, $h = -2$, and $k = 1$. Starting from $y = \frac{1}{x}$:

Vertical asymptote: $x = -2$. Horizontal asymptote: $y = 1$.

$y$-intercept: $f(0) = \frac{-3}{0 + 2} + 1 = -\frac{3}{2} + 1 = -\frac{1}{2}$. So the $y$-intercept is $\left(0, -\frac{1}{2}\right)$.

$x$-intercept: Set $f(x) = 0$: $\frac{-3}{x+2} + 1 = 0 \Rightarrow \frac{-3}{x+2} = -1 \Rightarrow x + 2 = 3 \Rightarrow x = 1$. So the $x$-intercept is $(1, 0)$.

3.5 Solving Rational Equations and Inequalities

A rational equation is an equation that contains one or more rational expressions. The standard strategy is to eliminate the fractions by multiplying both sides by the least common denominator (LCD). However, this step can introduce extraneous solutions — values that satisfy the transformed equation but make a denominator in the original equation equal to zero.

Solving Rational Equations

Step 1 Identify the LCD of all rational expressions in the equation.

Step 2 Multiply every term on both sides by the LCD to clear all fractions.

Step 3 Solve the resulting polynomial equation.

Step 4 Check for extraneous solutions by substituting each candidate back into the original equation. Reject any value that makes a denominator zero.

Critical Warning: You must always check your answers in rational equations. Multiplying by the LCD can produce extraneous solutions that are not valid. Skipping this check is one of the most common errors in precalculus.

Example 3.5.1: Solving a Rational Equation

Solve $\dfrac{2}{x - 3} + \dfrac{1}{x + 1} = \dfrac{10}{x^2 - 2x - 3}$.

Solution: First, factor the denominator on the right:

$$x^2 - 2x - 3 = (x - 3)(x + 1)$$

So the equation is $\dfrac{2}{x - 3} + \dfrac{1}{x + 1} = \dfrac{10}{(x-3)(x+1)}$.

The LCD is $(x - 3)(x + 1)$. Multiply every term by the LCD:

$$2(x + 1) + 1(x - 3) = 10$$

$$2x + 2 + x - 3 = 10$$

$$3x - 1 = 10$$

$$3x = 11$$

$$x = \frac{11}{3}$$

Check: $x = \frac{11}{3}$ does not make $x - 3 = 0$ or $x + 1 = 0$ (since $\frac{11}{3} \neq 3$ and $\frac{11}{3} \neq -1$), so the solution is valid.

$$\boxed{x = \frac{11}{3}}$$

Example 3.5.2: An Equation with an Extraneous Solution

Solve $\dfrac{x}{x - 2} - \dfrac{2}{x - 2} = 1$.

Solution: The LCD is $(x - 2)$. Combine the left side:

$$\frac{x - 2}{x - 2} = 1$$

This simplifies to $1 = 1$, which is true for all $x$. However, $x = 2$ is excluded from the domain because it makes the denominator zero.

Therefore, the solution set is all real numbers except $x = 2$:

$$\boxed{x \in (-\infty, 2) \cup (2, \infty)}$$

If we had instead multiplied both sides by $(x-2)$ without first simplifying, we would get $x - 2 = x - 2$, which gives $0 = 0$ — true for all $x$. We must still exclude $x = 2$ because the original equation is undefined there.

Rational Inequalities

To solve a rational inequality such as $\frac{p(x)}{q(x)} > 0$, we use a sign chart approach. The key idea is that a rational expression can only change sign at its zeros (where the numerator is zero) and at its undefined points (where the denominator is zero).

Solving Rational Inequalities

Step 1 Move all terms to one side so the inequality has the form $\frac{p(x)}{q(x)} \geq 0$ (or $\leq$, $>$, $<$).

Step 2 Factor the numerator and denominator completely.

Step 3 Find the critical values: zeros of the numerator and zeros of the denominator.

Step 4 Create a sign chart using the critical values. Test one point in each interval.

Step 5 Determine which intervals satisfy the inequality. Include endpoints where the numerator is zero (if the inequality is $\geq$ or $\leq$), but always exclude points where the denominator is zero.

3.6 Practice Problems

Test your understanding of rational functions with the following problems. Each problem has a hidden solution — try to solve it on your own before checking your work.

Problem 1

Find the domain of $f(x) = \dfrac{x^2 + 1}{x^2 - 4x + 3}$.

Show Solution

Set the denominator equal to zero:

$$x^2 - 4x + 3 = 0 \implies (x - 1)(x - 3) = 0 \implies x = 1 \text{ or } x = 3$$

The numerator $x^2 + 1$ is always positive (no real zeros), so no cancellation occurs.

$$\text{Domain: } (-\infty, 1) \cup (1, 3) \cup (3, \infty)$$

Problem 2

Find all vertical and horizontal asymptotes of $g(x) = \dfrac{3x^2 - 12}{x^2 - x - 6}$.

Show Solution

Factor: $g(x) = \dfrac{3(x^2 - 4)}{(x-3)(x+2)} = \dfrac{3(x-2)(x+2)}{(x-3)(x+2)}$

Cancel $(x+2)$: $g(x) = \dfrac{3(x-2)}{x-3}, \quad x \neq -2$

Vertical asymptote: From the remaining denominator, $x = 3$.

Hole: At $x = -2$ (the canceled factor). The $y$-coordinate is $g_{\text{simplified}}(-2) = \frac{3(-2-2)}{-2-3} = \frac{-12}{-5} = \frac{12}{5}$. Hole at $\left(-2, \frac{12}{5}\right)$.

Horizontal asymptote: The simplified form has degree 1 in both numerator and denominator. The ratio of leading coefficients is $\frac{3}{1} = 3$. So $y = 3$.

Problem 3

Find the hole in the graph of $h(x) = \dfrac{x^2 + 5x + 6}{x + 2}$.

Show Solution

Factor the numerator: $h(x) = \dfrac{(x+2)(x+3)}{x+2}$

Cancel $(x+2)$: $h(x) = x + 3, \quad x \neq -2$

The $y$-coordinate at the hole: $h_{\text{simplified}}(-2) = -2 + 3 = 1$.

There is a hole at $(-2, 1)$.

Problem 4

Find the oblique asymptote of $f(x) = \dfrac{2x^2 - x + 3}{x - 1}$.

Show Solution

Perform polynomial long division:

$$2x^2 - x + 3 = (x - 1)(2x + 1) + 4$$

So $f(x) = 2x + 1 + \dfrac{4}{x - 1}$.

As $x \to \pm\infty$, the remainder $\frac{4}{x-1} \to 0$.

Oblique asymptote: $y = 2x + 1$.

Problem 5

Solve: $\dfrac{5}{x + 3} = \dfrac{3}{x - 1}$

Show Solution

Cross-multiply: $5(x - 1) = 3(x + 3)$

$$5x - 5 = 3x + 9$$

$$2x = 14$$

$$x = 7$$

Check: $x = 7$ does not make either denominator zero ($7 + 3 = 10 \neq 0$ and $7 - 1 = 6 \neq 0$).

$$\boxed{x = 7}$$

Problem 6

Solve: $\dfrac{x}{x - 4} + \dfrac{3}{x + 2} = \dfrac{18}{x^2 - 2x - 8}$

Show Solution

Factor the right-side denominator: $x^2 - 2x - 8 = (x-4)(x+2)$. The LCD is $(x-4)(x+2)$.

Multiply every term by the LCD:

$$x(x+2) + 3(x-4) = 18$$

$$x^2 + 2x + 3x - 12 = 18$$

$$x^2 + 5x - 30 = 0$$

Using the quadratic formula: $x = \dfrac{-5 \pm \sqrt{25 + 120}}{2} = \dfrac{-5 \pm \sqrt{145}}{2}$

Check: Neither $\frac{-5 + \sqrt{145}}{2} \approx 3.52$ nor $\frac{-5 - \sqrt{145}}{2} \approx -8.52$ equals $4$ or $-2$, so both solutions are valid.

$$\boxed{x = \frac{-5 \pm \sqrt{145}}{2}}$$

Problem 7

Find all asymptotes and intercepts of $f(x) = \dfrac{x - 1}{x^2 + x - 2}$, then describe the end behavior.

Show Solution

Factor: $f(x) = \dfrac{x-1}{(x+2)(x-1)} = \dfrac{1}{x+2}, \quad x \neq 1$

Hole: At $x = 1$. $y$-value: $\frac{1}{1+2} = \frac{1}{3}$. Hole at $\left(1, \frac{1}{3}\right)$.

Vertical asymptote: $x = -2$.

Horizontal asymptote: Degree of numerator (0) < degree of denominator (1), so $y = 0$.

$x$-intercept: The simplified numerator is $1$, which is never zero. So there is no $x$-intercept.

$y$-intercept: $f(0) = \frac{1}{0+2} = \frac{1}{2}$. The $y$-intercept is $\left(0, \frac{1}{2}\right)$.

End behavior: As $x \to \pm\infty$, $f(x) \to 0^+$ from above on both sides.

Problem 8

Solve the inequality: $\dfrac{x - 2}{x + 4} \geq 0$

Show Solution

Find critical values: Numerator zero at $x = 2$. Denominator zero at $x = -4$.

Sign chart:

  • $(-\infty, -4)$: test $x = -5$: $\frac{-7}{-1} = 7 > 0$ (positive)
  • $(-4, 2)$: test $x = 0$: $\frac{-2}{4} = -\frac{1}{2} < 0$ (negative)
  • $(2, \infty)$: test $x = 3$: $\frac{1}{7} > 0$ (positive)

We need $\frac{x-2}{x+4} \geq 0$. The expression is positive on $(-\infty, -4)$ and $(2, \infty)$, and zero at $x = 2$. We must exclude $x = -4$ (denominator zero).

$$\boxed{(-\infty, -4) \cup [2, \infty)}$$

Problem 9

A function is defined as $f(x) = \dfrac{x^3 - 8}{x^2 - 4}$. Find all asymptotes, holes, and intercepts.

Show Solution

Factor using difference of cubes and difference of squares:

$$f(x) = \frac{(x-2)(x^2 + 2x + 4)}{(x-2)(x+2)}$$

Cancel $(x - 2)$: $f(x) = \dfrac{x^2 + 2x + 4}{x + 2}, \quad x \neq 2$

Hole: At $x = 2$. $y$-value: $\frac{4 + 4 + 4}{4} = \frac{12}{4} = 3$. Hole at $(2, 3)$.

Vertical asymptote: $x = -2$ (remaining denominator zero).

Oblique asymptote: Degree of numerator is 2, denominator is 1, so divide: $x^2 + 2x + 4 = (x + 2)(x) + 4$. So $f(x) = x + \frac{4}{x+2}$.

Oblique asymptote: $y = x$.

$y$-intercept: $f(0) = \frac{4}{2} = 2$. So $(0, 2)$.

$x$-intercept: Set $x^2 + 2x + 4 = 0$. Discriminant: $4 - 16 = -12 < 0$. No real zeros, so no $x$-intercepts.

Problem 10

Solve: $\dfrac{2x + 1}{x - 3} = \dfrac{x + 5}{x - 3} + 2$

Show Solution

Note that $x \neq 3$ (both denominators are $x - 3$). Multiply both sides by $(x - 3)$:

$$2x + 1 = (x + 5) + 2(x - 3)$$

$$2x + 1 = x + 5 + 2x - 6$$

$$2x + 1 = 3x - 1$$

$$1 + 1 = 3x - 2x$$

$$x = 2$$

Check: $x = 2 \neq 3$, so the solution is valid.

Verify: LHS = $\frac{5}{-1} = -5$. RHS = $\frac{7}{-1} + 2 = -7 + 2 = -5$. Confirmed.

$$\boxed{x = 2}$$

← Chapter 2: Polynomial Functions Chapter 4: Exponential & Logarithmic Functions →