Mathwords logoMathwords

Rational Function

Rational Function

A function that can be written as a polynomial divided by a polynomial.

 

Examples of rational functions: f(x)=(x−4)/(2x²−3x+1), y=1/x, and g(x)=4x+5−x/(x²+1)

 

 

See also

Proper rational expression, improper rational expression, rational expression, rational equation

Key Formula

f(x)=P(x)Q(x),Q(x)0f(x) = \frac{P(x)}{Q(x)}, \quad Q(x) \neq 0
Where:
  • f(x)f(x) = The rational function
  • P(x)P(x) = The numerator polynomial (e.g., 2x² + 3x − 5)
  • Q(x)Q(x) = The denominator polynomial, which cannot be the zero polynomial
  • xx = The independent variable; the domain excludes any x-value where Q(x) = 0

Worked Example

Problem: Find the domain, vertical asymptote(s), and horizontal asymptote of the rational function f(x) = (2x + 6) / (x − 3).
Step 1: Identify P(x) and Q(x). The numerator is P(x) = 2x + 6 and the denominator is Q(x) = x − 3.
f(x)=2x+6x3f(x) = \frac{2x + 6}{x - 3}
Step 2: Find the domain by setting the denominator equal to zero and excluding that value. Solve x − 3 = 0, which gives x = 3.
Domain: all real numbers except x=3\text{Domain: all real numbers except } x = 3
Step 3: Find the vertical asymptote. Since x = 3 makes the denominator zero but does not cancel with any factor in the numerator, x = 3 is a vertical asymptote.
Vertical asymptote: x=3\text{Vertical asymptote: } x = 3
Step 4: Find the horizontal asymptote. The degree of the numerator (1) equals the degree of the denominator (1). When degrees are equal, the horizontal asymptote is the ratio of the leading coefficients: 2/1 = 2.
Horizontal asymptote: y=2\text{Horizontal asymptote: } y = 2
Answer: The domain is all real numbers except x = 3. The vertical asymptote is x = 3, and the horizontal asymptote is y = 2.

Another Example

This example differs from the first because the numerator and denominator share a common factor, creating a hole (removable discontinuity) rather than a vertical asymptote at that x-value.

Problem: Analyze the rational function g(x) = (x² − 4) / (x² − x − 2). Find any holes, vertical asymptotes, and the horizontal asymptote.
Step 1: Factor both the numerator and denominator completely.
g(x)=(x2)(x+2)(x2)(x+1)g(x) = \frac{(x - 2)(x + 2)}{(x - 2)(x + 1)}
Step 2: Identify common factors. The factor (x − 2) appears in both numerator and denominator. This means x = 2 is a hole (removable discontinuity), not a vertical asymptote.
g(x)=x+2x+1,x2g(x) = \frac{x + 2}{x + 1}, \quad x \neq 2
Step 3: Find the vertical asymptote from the remaining denominator factor. Set x + 1 = 0, giving x = −1.
Vertical asymptote: x=1\text{Vertical asymptote: } x = -1
Step 4: Find the horizontal asymptote. The original numerator and denominator both have degree 2. The leading coefficients are both 1, so the horizontal asymptote is y = 1/1 = 1.
Horizontal asymptote: y=1\text{Horizontal asymptote: } y = 1
Step 5: Find the y-coordinate of the hole by substituting x = 2 into the simplified function.
g(2)=2+22+1=43Hole at (2,43)g(2) = \frac{2 + 2}{2 + 1} = \frac{4}{3} \quad \Rightarrow \quad \text{Hole at } \left(2,\, \tfrac{4}{3}\right)
Answer: There is a hole at (2, 4/3), a vertical asymptote at x = −1, and a horizontal asymptote at y = 1.

Frequently Asked Questions

How do you find the asymptotes of a rational function?
Vertical asymptotes occur at x-values that make the denominator zero (after canceling any common factors with the numerator). For horizontal asymptotes, compare the degrees of the numerator and denominator: if the numerator's degree is less, the asymptote is y = 0; if the degrees are equal, divide the leading coefficients; if the numerator's degree is greater by exactly one, you get an oblique (slant) asymptote instead.
What is the difference between a rational function and a polynomial function?
A polynomial function has no division by a variable expression — its denominator is effectively 1. A rational function is a ratio of two polynomials and can have a non-trivial denominator. Every polynomial is technically a rational function (with denominator 1), but not every rational function is a polynomial.
What is a hole in a rational function?
A hole occurs at an x-value where both the numerator and denominator equal zero due to a common factor. After canceling the shared factor, the function is defined at every other point but still undefined at that specific x-value. On the graph it appears as a single missing point, sometimes called a removable discontinuity.

Rational Function vs. Polynomial Function

Rational FunctionPolynomial Function
General formf(x) = P(x)/Q(x), where Q(x) ≠ 0f(x) = aₙxⁿ + … + a₁x + a₀
DomainAll real numbers except where Q(x) = 0All real numbers
AsymptotesCan have vertical, horizontal, or oblique asymptotesNever has asymptotes
ContinuityMay have holes or breaks in the graphAlways continuous everywhere
RelationshipIncludes polynomials as a special case (Q(x) = 1)A subset of rational functions

Why It Matters

Rational functions appear throughout algebra, precalculus, and calculus — from simplifying algebraic expressions to computing limits and integrals. In science and engineering, they model real-world phenomena such as electrical circuits, population dynamics, and rates of chemical reactions. Understanding how to find their domain, asymptotes, and intercepts is essential preparation for graphing more complex functions in advanced courses.

Common Mistakes

Mistake: Calling every x-value that makes the denominator zero a vertical asymptote.
Correction: If a factor cancels between the numerator and denominator, that x-value produces a hole (removable discontinuity), not a vertical asymptote. Always factor and simplify first before identifying asymptotes.
Mistake: Forgetting to exclude denominator-zero values from the domain after simplifying.
Correction: Even after you cancel a common factor, the original function is still undefined at that x-value. The simplified form applies only for all other x. Always state the restriction (e.g., x ≠ 2) alongside the simplified expression.

Related Terms