What Is a Rational Function?
A rational function is any function that can be written as one polynomial divided by another:
$$f(x) = \frac{p(x)}{q(x)}$$
where \(p(x)\) and \(q(x)\) are both polynomials and \(q(x) \neq 0\). The name comes from the same root as "rational number" — both involve ratios (fractions). Just as \(\frac{3}{4}\) is a rational number, \(\frac{x^2 + 1}{x - 3}\) is a rational function.
Some examples:
$$f(x) = \frac{x^3 - 2x + 3}{3x - 1} \qquad g(x) = \frac{x^2 - 4}{x + 2} \qquad h(x) = \frac{1}{x}$$
Every polynomial is technically a rational function too — just with \(q(x) = 1\) in the denominator. But when people say "rational function" they usually mean one where the division actually matters.
Domain Restrictions
The key difference between rational functions and polynomials: you can't divide by zero. Any value of \(x\) that makes the denominator equal zero is excluded from the domain.
Example 1
Find the domain of \(f(x) = \dfrac{x + 1}{x - 3}\).
Set the denominator equal to zero: \(x - 3 = 0 \implies x = 3\).
The domain is all real numbers except \(x = 3\). In interval notation: \((-\infty, 3) \cup (3, \infty)\).
Example 2
Find the domain of \(g(x) = \dfrac{2x}{x^2 - x - 6}\).
Factor the denominator: \(x^2 - x - 6 = (x-3)(x+2)\).
The denominator is zero when \(x = 3\) or \(x = -2\). Both are excluded.
Domain: all real numbers except \(x = 3\) and \(x = -2\).
For any rational function (or any other function), the Domain and Range Calculator finds both the domain and the range and shows the work in interval notation.
Simplifying Rational Functions
Just like numeric fractions, rational functions can sometimes be simplified by canceling common factors. The process: factor numerator and denominator, then cancel any factors that appear in both.
Example 3
Simplify \(\dfrac{x^2 - 4}{x + 2}\).
Factor the numerator (difference of squares): \(x^2 - 4 = (x+2)(x-2)\).
$$\frac{(x+2)(x-2)}{x+2} = x - 2 \quad (x \neq -2)$$
The simplified form is \(x - 2\), but the restriction \(x \neq -2\) stays — canceling doesn't change where the original function is undefined.
Example 4
Simplify \(\dfrac{x^2 + 5x + 6}{x^2 - x - 6}\).
Factor numerator: \((x+2)(x+3)\). Factor denominator: \((x-3)(x+2)\).
$$\frac{(x+2)(x+3)}{(x-3)(x+2)} = \frac{x+3}{x-3} \quad (x \neq -2,\ x \neq 3)$$
The domain excludes both \(x = -2\) (where the original was undefined) and \(x = 3\) (where the simplified form is undefined).
Practice Problems
1. What is the domain of \(\dfrac{3x}{x^2 - 16}\)? Show answerFactor denominator: \((x-4)(x+4) = 0\) when \(x = 4\) or \(x = -4\). Domain: all reals except \(x = \pm 4\).
2. Simplify \(\dfrac{x^2 - 9}{x - 3}\). Show answer\(x^2 - 9 = (x-3)(x+3)\), so \(\frac{(x-3)(x+3)}{x-3} = x + 3\), with \(x \neq 3\).
3. Simplify \(\dfrac{2x^2 + 7x + 3}{2x + 1}\). Show answerFactor numerator: \(2x^2 + 7x + 3 = (2x+1)(x+3)\). Cancel: \(\frac{(2x+1)(x+3)}{2x+1} = x + 3\), with \(x \neq -\frac{1}{2}\).
4. Is \(f(x) = x^2 + 5\) a rational function? What about \(g(x) = x^{-2} + 3\)? Show answer\(f(x) = x^2 + 5\) is a polynomial and therefore a rational function with denominator 1. \(g(x) = x^{-2} + 3 = \frac{1}{x^2} + 3 = \frac{1 + 3x^2}{x^2}\) — also a rational function, since it's a polynomial over a polynomial.