Skip to content

Rational functions

Algebra · level 8, lesson 3 of 8

A question to start

Printing a small book costs 2000 dollars to set up the press, then 5 dollars for each copy. Print 1 copy and that copy cost 2005 dollars. Print 100 and each cost \(\dfrac{2000 + 500}{100} = 25\) dollars. Print 10 000 and each cost \(\dfrac{2000 + 50\,000}{10\,000} = 5.20\) dollars.

The cost per copy keeps falling as you print more. Does it ever reach 5 dollars? Does it go below? The cost per copy is a new kind of function, a fraction with \(n\) on the bottom, and its graph has a line that it creeps towards forever without touching.

The idea

What a rational function is

A rational function is one polynomial divided by another:

\[f(x) = \frac{p(x)}{q(x)}, \qquad q(x) \text{ not the zero polynomial}.\]

"Rational" comes from ratio, as in rational numbers (\(\tfrac{3}{4}\) is a ratio of whole numbers; \(f\) is a ratio of polynomials). Its domain is every \(x\) except the zeros of \(q\), because we cannot divide by 0.

The book's cost per copy is \(C(n) = \dfrac{2000 + 5n}{n} = 5 + \dfrac{2000}{n}\). The second form answers the opening question: \(\dfrac{2000}{n}\) is always positive but gets as small as you like, so \(C(n)\) is always more than 5 and gets as close to 5 as you like. It never reaches 5.

The parent: \(y = \dfrac1x\)

\(x\) 0.001 0.1 1 10 1000
\(\dfrac1x\) 1000 10 1 0.1 0.001

As \(x\) gets close to 0 (from the right), \(\dfrac1x\) shoots up without limit. As \(x\) grows, \(\dfrac1x\) sinks towards 0. The axes are asymptotes: lines the graph approaches more and more closely. The line \(x = 0\) is a vertical asymptote; \(y = 0\) is a horizontal asymptote. In level 7 you moved this graph around: \(y = \dfrac{a}{x - d} + c\) has asymptotes \(x = d\) and \(y = c\).

Vertical asymptotes and holes

At a zero of the denominator, two things can happen.

  • If the top is not zero there, the fraction is "something divided by almost nothing", which is huge. The graph has a vertical asymptote. Near it, the graph goes up or down, depending on the signs.
  • If the top is zero too, a common factor cancels. The graph is the simpler function with a single point missing, a hole.

Example: \(g(x) = \dfrac{x^2 - 4}{x^2 - x - 2} = \dfrac{(x - 2)(x + 2)}{(x - 2)(x + 1)}\). At \(x = 2\) the factor \((x - 2)\) cancels: \(g(x) = \dfrac{x + 2}{x + 1}\) for \(x \ne 2\). So there is a hole at \(x = 2\), at height \(\dfrac{4}{3}\). At \(x = -1\) the top is \(1 \ne 0\), so \(x = -1\) is a vertical asymptote. Always factor and cancel first, then look for asymptotes.

Horizontal asymptotes: compare the degrees

What happens when \(x\) is huge? Divide top and bottom by the highest power of \(x\) on the bottom. For \(f(x) = \dfrac{2x + 1}{x - 3}\):

\[f(x) = \frac{2 + \frac{1}{x}}{1 - \frac{3}{x}} \to \frac{2 + 0}{1 - 0} = 2 \quad \text{as } x \text{ grows}.\]

So \(y = 2\) is a horizontal asymptote. In general:

  • top degree less than bottom: horizontal asymptote \(y = 0\);
  • degrees equal: \(y = \dfrac{\text{leading coefficient of top}}{\text{leading coefficient of bottom}}\);
  • top degree one more: no horizontal asymptote, but a slanted (oblique) one. For example \(\dfrac{x^2 + 1}{x} = x + \dfrac1x\) gets close to the line \(y = x\).

Another way to see it: divide. \(\dfrac{2x + 1}{x - 3} = 2 + \dfrac{7}{x - 3}\) (check: \(2(x - 3) + 7 = 2x + 1\)). So the graph is \(\dfrac{7}{x}\) moved right 3 and up 2.

x y −3 3 6 9 −5 2 5 10 x = 3 y = 2

A graph can cross a horizontal asymptote in the middle (the asymptote only describes the far ends); it can never cross a vertical one.

Rational equations

To solve an equation with fractions, multiply every term by the lowest common denominator (LCD), which clears all fractions. Then solve. Then check each answer against the domain: multiplying by an expression that can be 0 can create answers that do not work in the original. Such fake answers are called extraneous roots.

Rational inequalities

Never multiply an inequality by an expression whose sign you do not know. Instead:

  1. Move everything to one side, so the other side is 0.
  2. Combine into one fraction.
  3. Make a sign chart using the zeros of the top and the bottom. (A fraction can only change sign where its top or its bottom is 0.)
  4. Zeros of the top may be included for \(\le\) or \(\ge\); zeros of the bottom never are.

Worked examples

1. A full description. Describe \(f(x) = \dfrac{2x + 1}{x - 3}\).

  • Domain \(x \ne 3\). The top is 7 at \(x = 3\), so \(x = 3\) is a vertical asymptote.
  • Equal degrees: horizontal asymptote \(y = \dfrac21 = 2\).
  • \(x\)-intercept: top \(= 0\), so \(x = -\tfrac12\). \(y\)-intercept: \(f(0) = -\tfrac13\).
  • From \(f(x) = 2 + \dfrac{7}{x - 3}\): just right of 3, \(\dfrac{7}{\text{small positive}}\) is huge, so the graph shoots up; just left, it shoots down.

2. A hole. Describe \(g(x) = \dfrac{x^2 - 4}{x^2 - x - 2}\).

  • From above: hole at \(\left(2, \tfrac43\right)\), vertical asymptote \(x = -1\).
  • Equal degrees, both leading coefficients 1: horizontal asymptote \(y = 1\).

3. Rational equations.

  • \(x + \dfrac6x = 5\). Multiply by \(x\): \(x^2 + 6 = 5x\), so \(x^2 - 5x + 6 = 0\), so \(x = 2\) or \(x = 3\). Neither makes a denominator 0. Both work: \(2 + 3 = 5\) and \(3 + 2 = 5\). ✓
  • \(\dfrac{1}{x - 2} + \dfrac{2}{x + 2} = \dfrac{4}{x^2 - 4}\). The LCD is \(x^2 - 4 = (x - 2)(x + 2)\), so \(x \ne \pm2\). Multiply: \((x + 2) + 2(x - 2) = 4\), so \(3x - 2 = 4\), so \(x = 2\). But \(x = 2\) is not allowed. No solution.

4. A rational inequality. Solve \(\dfrac{x + 1}{x - 3} \le 2\).

  • One side 0: \(\dfrac{x + 1}{x - 3} - 2 \le 0\).
  • One fraction: \(\dfrac{x + 1 - 2(x - 3)}{x - 3} = \dfrac{7 - x}{x - 3} \le 0\).
  • Critical numbers: 7 (top) and 3 (bottom).
  • \(x < 3\): top \(+\), bottom \(-\), fraction \(-\). \(3 < x < 7\): \(+\) over \(+\), \(+\). \(x > 7\): \(-\) over \(+\), \(-\).
  • Want \(\le 0\): \(x < 3\) or \(x \ge 7\) (7 included, since the fraction is 0 there; 3 never).
  • Check: \(x = 0\): \(-\tfrac13 \le 2\) ✓. \(x = 5\): \(\tfrac62 = 3\), not \(\le 2\) ✓. \(x = 10\): \(\tfrac{11}{7} \le 2\) ✓.

5. The book. How many copies make the cost per copy at most 7 dollars?

  • \(5 + \dfrac{2000}{n} \le 7\), so \(\dfrac{2000}{n} \le 2\). Since \(n > 0\), multiplying by \(n\) is safe: \(2000 \le 2n\), so \(n \ge 1000\) copies.

Try it

  1. Give the asymptotes of \(y = \dfrac{3}{x + 2} - 1\).
  2. Give the asymptotes and intercepts of \(y = \dfrac{4x - 1}{2x + 5}\).
  3. Describe the graph of \(y = \dfrac{x^2 - 9}{x - 3}\).
  4. Give the asymptotes and zeros of \(y = \dfrac{x}{x^2 - 1}\).
  5. Solve \(\dfrac2x + 3 = \dfrac5x\).
  6. Solve \(\dfrac{x}{x - 1} = \dfrac{1}{x - 1} + 2\).
  7. Solve \(\dfrac{x - 2}{x + 4} \ge 0\).
  8. One pipe fills a tank in \(t\) hours; a second pipe takes 5 hours longer. Together they fill it in 6 hours. Find \(t\).
Answers
  1. Vertical \(x = -2\), horizontal \(y = -1\).
  2. Vertical where \(2x + 5 = 0\): \(x = -\tfrac52\). Equal degrees: horizontal \(y = \tfrac42 = 2\). \(x\)-intercept \(\tfrac14\), \(y\)-intercept \(-\tfrac15\).
  3. \(\dfrac{(x - 3)(x + 3)}{x - 3} = x + 3\) for \(x \ne 3\): the straight line \(y = x + 3\) with a hole at \((3, 6)\). No asymptotes at all.
  4. Vertical \(x = 1\) and \(x = -1\) (the top is \(\pm1\) there, not 0). Top degree less than bottom: horizontal \(y = 0\). Zero at \(x = 0\). (The graph crosses its horizontal asymptote at the origin, which is allowed.)
  5. \(x \ne 0\). Multiply by \(x\): \(2 + 3x = 5\), so \(x = 1\). Check: \(2 + 3 = 5\). ✓
  6. \(x \ne 1\). Multiply by \(x - 1\): \(x = 1 + 2(x - 1) = 2x - 1\), so \(x = 1\). Not allowed: no solution.
  7. Critical numbers \(-4\) (bottom) and 2 (top). \(x < -4\): \(-\) over \(-\), \(+\). \(-4 < x < 2\): \(-\) over \(+\), \(-\). \(x > 2\): \(+\). Solution \(x < -4\) or \(x \ge 2\).
  8. In one hour they fill \(\dfrac1t\) and \(\dfrac{1}{t + 5}\) of the tank, and together \(\dfrac16\). Multiply \(\dfrac1t + \dfrac{1}{t + 5} = \dfrac16\) by \(6t(t + 5)\): \(6(t + 5) + 6t = t(t + 5)\), so \(t^2 - 7t - 30 = 0\), so \((t - 10)(t + 3) = 0\). Time is positive: \(t = 10\) hours (the other pipe takes 15). Check: \(\tfrac{1}{10} + \tfrac{1}{15} = \tfrac{3}{30} + \tfrac{2}{30} = \tfrac16\). ✓

Common mistake

Not checking for extraneous roots. After multiplying by the LCD, an answer that makes any denominator 0 must be thrown out. It is not a solution of the original equation, which is undefined there.

Multiplying an inequality by an unknown. From \(\dfrac{x + 1}{x - 3} \le 2\), writing \(x + 1 \le 2(x - 3)\) is only right when \(x - 3 > 0\). It gives \(x \ge 7\) and loses all of \(x < 3\).

Calling every zero of the denominator an asymptote. Factor and cancel first: a cancelled factor is a hole.

Where it leads