math.wiki
Functions › Rational functions › Domain and zeros of a rational function
Open on the map
Algebra 2 · F.IF.C.7D

Domain and zeros of a rational function

A function is one polynomial divided by another. Which inputs can it take, and which of those give an output of zero?

Where you are 5 in Rational functions

When you reach for it

A rational function is a function whose formula is one polynomial divided by another,

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

where p and q are polynomials and q is not the zero polynomial. Before you can graph one, solve with one, or use one as a model, you need two lists of numbers.

The first is its domain: the inputs the formula can accept. A rational function has no square root and no logarithm in it, so the only way its formula can break is a division by zero. Its implied domain is therefore every real number except the zeros of the denominator. This is the same question the excluded values of a rational expression answers, now asked of a function.

The second is its zeros: the inputs in the domain whose output is 0. They are the places where the graph meets the horizontal axis.

The two lists are tied together. A zero must be in the domain first, so the domain is always found first, and a number that the denominator excludes can never be a zero, even when the numerator is 0 there too.

The procedure

Take the lead function of this lesson,

f(x) = \frac{x + 6}{x^2 + 2x - 35}

The domain comes from the denominator

The formula fails exactly when the denominator is 0, because division by 0 has no answer. Nothing else can go wrong: a polynomial accepts every real number, so the numerator, and the denominator itself, can always be worked out. To find the inputs that fail, solve

x^2 + 2x - 35 = 0

Factoring gives (x + 7)(x - 5) = 0, since 7 \cdot (-5) = -35 and 7 + (-5) = 2. A product is 0 exactly when one of its factors is 0 (the zero product property), so x = -7 or x = 5. Those two numbers are removed, and every other real number stays:

\text{domain: } x \ne -7,\ x \ne 5

In interval notation that is (-\infty, -7) \cup (-7, 5) \cup (5, \infty): three open intervals, each stopping just short of an excluded number. The symbol \cup joins them into one set.

−7 0 5
Figure 1The domain of \displaystyle f(x) = \frac{x + 6}{x^2 + 2x - 35}. Every real number is allowed except -7 and 5.

The domain is read from the denominator as the function is given, before anything is simplified. The reason is in the next part.

The zeros come from the numerator, inside the domain

A fraction \displaystyle \frac{a}{b} with b \ne 0 equals 0 exactly when a = 0. One direction: if a = 0 then \displaystyle \frac{0}{b} = 0. The other: if \displaystyle \frac{a}{b} = 0, multiply both sides by b, which is allowed because b is a real number, and get a = 0 \cdot b = 0.

So the zeros of f are the inputs where the numerator is 0 and the denominator is not. Here x + 6 = 0 gives x = -6, and -6 is in the domain, since it is neither -7 nor 5. Checking:

f(-6) = \frac{-6 + 6}{(-6 + 7)(-6 - 5)} = \frac{0}{-11} = 0

The only zero of f is x = -6, and the graph of f crosses the horizontal axis at (-6, 0).

When numerator and denominator share a zero

Sometimes a number makes the numerator and the denominator 0 at the same time. Then the formula reads \displaystyle \frac{0}{0}, which is still a division by zero, so that number is not in the domain and not a zero, whatever the numerator does there.

This is why the domain must be found before simplifying. If x - a is a factor of both the numerator and the denominator, canceling it uses \displaystyle \frac{x - a}{x - a} = 1, and that is true only when x \ne a. The simplified formula agrees with the original at every input except a, and it quietly accepts a, which the original refuses. Two formulas with different domains are different functions, even if they agree everywhere else. The simplified formula is still useful: when its denominator is no longer 0 at a, its value at a tells you where the single missing point of the graph sits, which Example 3 shows and graphing rational functions uses.

Worked examples

Example 1

Domain and zeros of the lead function

Find the domain and the zeros of \displaystyle f(x) = \frac{x + 6}{x^2 + 2x - 35}, and write the domain in interval notation.

Solution

The denominator factors as (x + 7)(x - 5), because 7 \cdot (-5) = -35 and 7 - 5 = 2. It is 0 at x = -7 and x = 5, so those are excluded:

\text{domain: } (-\infty, -7) \cup (-7, 5) \cup (5, \infty)

The numerator x + 6 is 0 only at x = -6. That number is in the domain, and \displaystyle f(-6) = \frac{0}{(1)(-11)} = 0, so the one zero is x = -6.

Example 2

A denominator that is never zero

Find the domain and the zeros of \displaystyle g(x) = \frac{x^2 - 2}{x^2 + 5}.

Solution

For any real x, x^2 \ge 0, so x^2 + 5 \ge 5. The denominator is never 0, nothing has to be removed, and the domain is all real numbers, (-\infty, \infty).

The numerator is 0 when x^2 = 2, that is \displaystyle x = \sqrt{2} or \displaystyle x = -\sqrt{2}. Both are in the domain (every real number is), so g has two zeros, \displaystyle x = \pm\sqrt{2}.

The equation x^2 + 5 = 0 does have solutions, \displaystyle x = \pm i\sqrt{5}, but they are not real numbers, and the inputs of g are real. They exclude nothing.

Example 3

A zero of the numerator that is not a zero

Find the domain and the zeros of \displaystyle h(x) = \frac{x^2 - 4x - 12}{x^2 - 3x - 18}. Then find the point missing from its graph.

Solution

Factor both parts. The numerator is (x - 6)(x + 2), since -6 \cdot 2 = -12 and -6 + 2 = -4. The denominator is (x - 6)(x + 3), since -6 \cdot 3 = -18 and -6 + 3 = -3:

h(x) = \frac{(x - 6)(x + 2)}{(x - 6)(x + 3)}

The denominator is 0 at x = 6 and x = -3, so the domain is every real number except -3 and 6.

The numerator is 0 at x = 6 and x = -2. But 6 is not in the domain: there h reads \displaystyle \frac{0}{0}, which is undefined. Only -2 survives, and \displaystyle h(-2) = \frac{(-8)(0)}{(-8)(1)} = 0. The one zero is x = -2.

For every x in the domain, x - 6 \ne 0, so the common factor may be canceled:

h(x) = \frac{x + 2}{x + 3} \quad \text{for } x \ne -3,\ x \ne 6

Near x = 6 the values of h come as close as you like to \displaystyle \frac{6 + 2}{6 + 3} = \frac{8}{9}, but h(6) itself does not exist. The graph runs through where \displaystyle \left(6, \frac{8}{9}\right) would be and has one point missing there, drawn as an open circle. At x = -3 only the denominator is 0, and the graph breaks into two pieces along an asymptote instead.

x
y
-2
\left(6,\,\tfrac{8}{9}\right)
x = -3
Figure 2Example 3. The graph crosses the axis at x = -2. At x = 6 the numerator is also zero, but h is not defined there, so the graph has a missing point instead of a crossing.
Example 4

A numerator that is never zero

Find the domain and the zeros of \displaystyle k(x) = \frac{5}{x^2 - 3x}.

Solution

Factor out the common x: x^2 - 3x = x(x - 3), which is 0 at x = 0 and x = 3. The domain is (-\infty, 0) \cup (0, 3) \cup (3, \infty).

The numerator is the constant 5, which is never 0. A fraction is 0 only when its numerator is, so k(x) is never 0, and k has no zeros. Its graph never meets the horizontal axis.

Example 5

A denominator that needs the quadratic formula

Find the domain and the zeros of \displaystyle p(x) = \frac{2x - 3}{x^2 - 2x - 2}.

Solution

No two integers multiply to -2 and add to -2, so use the quadratic formula on x^2 - 2x - 2 = 0, with a = 1, b = -2, c = -2:

\begin{aligned} x &= \frac{2 \pm \sqrt{(-2)^2 - 4(1)(-2)}}{2} \\ &= \frac{2 \pm \sqrt{12}}{2} = \frac{2 \pm 2\sqrt{3}}{2} \\ &= 1 \pm \sqrt{3} \end{aligned}

So the domain is every real number except \displaystyle 1 - \sqrt{3} and \displaystyle 1 + \sqrt{3} (about -0.73 and 2.73):

\begin{aligned} &(-\infty, 1 - \sqrt{3}) \\ \cup \; &(1 - \sqrt{3}, 1 + \sqrt{3}) \\ \cup \; &(1 + \sqrt{3}, \infty) \end{aligned}

The numerator 2x - 3 is 0 at \displaystyle x = \frac{3}{2}. Is that input allowed? The denominator there is \displaystyle \frac{9}{4} - 3 - 2 = -\frac{11}{4}, not 0, so yes. The one zero is \displaystyle x = \frac{3}{2}.

Example 6

Cubics on top and bottom

Find the domain and the zeros of \displaystyle q(x) = \frac{x^3 - x}{x^3 + 2x^2 - 8x}.

Solution

Take out the common factor x from each, then factor what is left:

q(x) = \frac{x(x^2 - 1)}{x(x^2 + 2x - 8)} = \frac{x(x - 1)(x + 1)}{x(x + 4)(x - 2)}

The denominator is 0 at x = 0, x = -4 and x = 2, so the domain is every real number except -4, 0 and 2.

The numerator is 0 at x = 0, x = 1 and x = -1. The input 0 is excluded, so it is not a zero. The other two are in the domain: the denominator is (-1)(3)(-3) = 9 at x = -1 and (1)(5)(-1) = -5 at x = 1. The zeros are x = -1 and x = 1.

Canceling x gives \displaystyle \frac{x^2 - 1}{x^2 + 2x - 8}, which is \displaystyle \frac{-1}{-8} = \frac{1}{8} at x = 0, so the graph of q has a missing point at \displaystyle \left(0, \frac{1}{8}\right).

Example 7

Building a function to order

Write a rational function whose domain is every real number except -1 and 8, and whose only zero is x = 2. Then give a second, different one with the same domain and zeros.

Solution

Work backwards from the two facts the procedure uses. The denominator must be 0 at exactly -1 and 8, so give it the factors x + 1 and x - 8. The numerator must be 0 at 2 and at no other number in the domain, so give it the factor x - 2:

r(x) = \frac{x - 2}{(x + 1)(x - 8)} = \frac{x - 2}{x^2 - 7x - 8}

Check: (x + 1)(x - 8) = x^2 - 8x + x - 8 = x^2 - 7x - 8, which is 0 only at -1 and 8, and x - 2 is 0 only at 2, which is allowed.

The answer is not unique. Multiplying by a nonzero constant changes neither list, so \displaystyle \frac{3(x - 2)}{x^2 - 7x - 8} also works. Less obviously, so does

s(x) = \frac{(x - 2)(x + 1)}{(x + 1)(x - 8)}

Its numerator is 0 at -1 as well, but -1 is excluded by the denominator, so it is not a zero. The domain and the zeros match those of r, though the graphs differ: the graph of s has a point missing at x = -1.

Boundaries

  • The domain found here is the implied one. It is every real number the formula accepts. If a domain is stated, or a context limits the inputs (a length cannot be negative), the domain is the part of the implied domain that is also allowed by those limits, as the implied domain explains. The zeros are then only the ones inside it.
  • Real inputs only. A denominator such as x^2 + 5 has complex zeros, \displaystyle \pm i\sqrt{5}, but they are not real numbers and exclude nothing from a function of a real variable.
  • Read the domain before simplifying. Canceling a common factor x - a is valid only for x \ne a. The simplified formula accepts a and the original does not, so they are different functions, and a number where numerator and denominator are both 0 is in neither the domain nor the list of zeros.
  • The denominator may not be the zero polynomial, since then every input divides by zero and the formula defines nothing. If the numerator is the zero polynomial, as in \displaystyle \frac{0}{x - 1}, the function is 0 everywhere in its domain and every allowed input is a zero.
  • Finding the numbers needs the polynomial’s zeros. When a denominator does not factor and is of degree three or more, its zeros may have no simple exact form. The rule for the domain still holds; the excluded numbers may then only be found approximately.

Where this goes next

The domain and the zeros are the first two facts about a rational function, and everything about its graph is built on them. A number excluded by the denominator is either a missing point, when canceling the common factors leaves a denominator that is no longer 0 there, or a place where the graph shoots off along a vertical asymptote. The zeros are the horizontal intercepts. With the asymptotes and the intercepts in hand you can sketch the whole graph.

In a model, the domain says which inputs mean anything at all. An average cost per item (the total cost divided by the number of items made), or a concentration (the amount of salt divided by the volume of the mixture), is undefined when the divisor is 0, and reading that off is the first step in rational functions in context. The same care, excluding what the denominator forbids before canceling, returns when you solve an equation with rational expressions, where a solution that makes a denominator 0 has to be thrown away.

Exercises

Find the domain

Give the domain of each function, as a list of excluded numbers and in interval notation.

  1. \displaystyle \frac{x - 2}{x + 9}
  2. \displaystyle \frac{4x}{x^2 - 144}
  3. \displaystyle \frac{x + 3}{x^2 - 3x - 28}
  4. \displaystyle \frac{1}{3x^2 + 5x - 2}
  5. \displaystyle \frac{x^2 + 4}{x^2 + 1}
  6. \displaystyle \frac{x - 1}{x^3 - 16x}

Find the domain and the zeros

  1. \displaystyle \frac{x - 8}{x + 3}
  2. \displaystyle \frac{x^2 - 5x}{x^2 + 2}
  3. \displaystyle \frac{6}{x + 11}
  4. \displaystyle \frac{x^2 + 4x - 21}{x^2 - 3x}
  5. \displaystyle \frac{3x + 2}{x^2 + 6x + 4}
  6. \displaystyle \frac{x^3 - 9x}{x^2 - 3x}

Shared factors and missing points

  1. Find the domain and the zeros of \displaystyle \frac{x^2 - 1}{x^2 + x}, and the point missing from its graph.
  2. Find the domain and the zeros of \displaystyle \frac{x^2 + 4x + 4}{x^2 + 9x + 14}, and the point missing from its graph.
  3. Are \displaystyle \frac{x^2 - 7x}{x} and x - 7 the same function? Say where they agree and where they differ.
  4. Write a rational function whose domain is every real number except 1 and -6 and whose zeros are exactly 0 and 3.

Explain

  1. Dashiell simplifies \displaystyle \frac{x^2 - 6x}{x - 6} to x, then says the function has domain (-\infty, \infty) and one zero, x = 0. Which of his two claims is right, and why?
  2. Explain why a rational function whose denominator is x^2 + c, with c > 0, has domain (-\infty, \infty).
  3. Give a rational function whose domain is every real number and which has no zeros, and explain why it works.
  4. Explain why every zero of \displaystyle \frac{p(x)}{q(x)} is a zero of p, but a zero of p need not be a zero of \displaystyle \frac{p(x)}{q(x)}.
  5. Explain why the domain of a rational function can leave out only finitely many real numbers, and at most as many as the degree of its denominator.
Answers
  1. Excluded: x = -9. Domain (-\infty, -9) \cup (-9, \infty). The denominator x + 9 is 0 only at -9.
  2. Excluded: x = -12 and x = 12. Domain (-\infty, -12) \cup (-12, 12) \cup (12, \infty), since x^2 - 144 = (x + 12)(x - 12).
  3. Excluded: x = -4 and x = 7. Domain (-\infty, -4) \cup (-4, 7) \cup (7, \infty), since x^2 - 3x - 28 = (x - 7)(x + 4).
  4. Excluded: x = -2 and \displaystyle x = \frac{1}{3}. Domain \displaystyle (-\infty, -2) \cup \left(-2, \frac{1}{3}\right) \cup \left(\frac{1}{3}, \infty\right), since 3x^2 + 5x - 2 = (3x - 1)(x + 2).
  5. Nothing is excluded: domain (-\infty, \infty). For real x, x^2 + 1 \ge 1, so the denominator is never 0.
  6. Excluded: x = -4, x = 0 and x = 4. Domain (-\infty, -4) \cup (-4, 0) \cup (0, 4) \cup (4, \infty), since x^3 - 16x = x(x + 4)(x - 4).
  7. Domain: x \ne -3. Zero: x = 8, since x - 8 = 0 there and the denominator is 11.
  8. Domain (-\infty, \infty), as x^2 + 2 \ge 2. Zeros: x = 0 and x = 5, from x^2 - 5x = x(x - 5).
  9. Domain: x \ne -11. No zeros: the numerator 6 is never 0.
  10. Domain: x \ne 0, x \ne 3, from x^2 - 3x = x(x - 3). The numerator is (x + 7)(x - 3), 0 at -7 and 3, but 3 is excluded. Zero: x = -7 only.
  11. Domain: \displaystyle x \ne -3 - \sqrt{5}, \displaystyle x \ne -3 + \sqrt{5}, from the quadratic formula, \displaystyle x = \frac{-6 \pm \sqrt{36 - 16}}{2} = -3 \pm \sqrt{5}. Zero: \displaystyle x = -\frac{2}{3}, where the denominator is \displaystyle \frac{4}{9} - 4 + 4 = \frac{4}{9} \ne 0.
  12. Domain: x \ne 0, x \ne 3. The numerator is x(x - 3)(x + 3), 0 at 0, 3 and -3; the first two are excluded. Zero: x = -3 only.
  13. The function is \displaystyle \frac{(x - 1)(x + 1)}{x(x + 1)}. Domain: x \ne -1, x \ne 0. Zero: x = 1 (-1 is excluded). Canceling gives \displaystyle \frac{x - 1}{x}, which is \displaystyle \frac{-2}{-1} = 2 at x = -1, so the missing point is (-1, 2).
  14. The function is \displaystyle \frac{(x + 2)^2}{(x + 2)(x + 7)}. Domain: x \ne -7, x \ne -2. The numerator is 0 only at -2, which is excluded, so there are no zeros. Canceling gives \displaystyle \frac{x + 2}{x + 7}, which is 0 at x = -2, so the missing point is (-2, 0): it sits on the horizontal axis, yet the graph never touches the axis.
  15. No. They agree at every x \ne 0, because there \displaystyle \frac{x(x - 7)}{x} = x - 7. At x = 0 the first is \displaystyle \frac{0}{0}, undefined, while the second is -7. The first has domain x \ne 0, the second (-\infty, \infty). Both have the single zero x = 7.
  16. One answer: \displaystyle \frac{x(x - 3)}{(x - 1)(x + 6)} = \frac{x^2 - 3x}{x^2 + 5x - 6}. The denominator is 0 only at 1 and -6; the numerator is 0 at 0 and 3, both allowed. Any nonzero multiple also works.
  17. The zero is right and the domain is wrong. In the original, x - 6 is the denominator, so x = 6 is excluded and the domain is (-\infty, 6) \cup (6, \infty). Canceling x - 6 is allowed only for x \ne 6, so the simplified x hides that exclusion. As for the zero, 0 is in the domain and \displaystyle \frac{0 - 0}{0 - 6} = 0. The numerator’s other zero, 6, is excluded, so x = 0 is the only zero.
  18. For every real x, x^2 \ge 0, so x^2 + c \ge c > 0. The denominator is never 0, so no real input divides by zero, and since a rational function can fail only by dividing by zero, every real number is in the domain.
  19. One answer: \displaystyle \frac{1}{x^2 + 1}. The denominator is at least 1, never 0, so the domain is (-\infty, \infty). The numerator is the constant 1, never 0, and a fraction is 0 only when its numerator is, so there are no zeros.
  20. If x = a is a zero, then q(a) \ne 0 and \displaystyle \frac{p(a)}{q(a)} = 0; multiplying by q(a) gives p(a) = 0. The converse fails when q(a) = 0 as well: then a is outside the domain, so it cannot be a zero. Example 3 shows this at a = 6.
  21. The excluded numbers are the real zeros of the denominator q, which is not the zero polynomial. By the factor theorem, each zero a gives a factor x - a of q. If q had more than n distinct zeros, their factors x - a would all divide q, and their product, of degree more than n, would divide a polynomial of degree n, which is impossible. So a polynomial of degree n has at most n zeros. So at most n numbers are left out, and if q is a nonzero constant, none are.
kg1128 · updated 2026-10-19 · CC-BY-SA-4.0