Quarry School

Rational functions: crash course

about 33 min to listen7 lessons15 questions to tryUnit 16 of 17

Short view. Each lesson's rule, its steps and its trap. Switch to Full for a worked example and a question to try in every lesson.Full view. Each lesson's rule, its steps, one worked example with Watch it solved, the trap, and one question to try.

You need first

1 The reciprocal function and arrow notation

about 5 minOpen the full lessonOnly this lesson

The rule

The reciprocal function is f(x)=1x.

Its domain and its range are both (−∞,0)∪(0,∞): every real number except 0. Near zero: as x→0+,f(x)→∞, and as x→0−,f(x)→−∞. Far away: as x→∞,f(x)→0, and as x→−∞,f(x)→0. In arrow notation the arrow reads "approaches" or "goes to", a raised + means from the right, and a raised − means from the left.

How

  1. Cross out x = 0. The division 1 ÷ 0 has no value, so the graph has no point on the y-axis.
  2. Plot three anchor points on the right: (12, 2), (1, 1) and (2, 12).
  3. Plot the matching points on the left by switching both signs: (−12, −2), (−1, −1) and (−2, −12). A negative input gives the same size of output with a minus sign.
  4. Near zero, test inputs closer and closer to 0 from each side. From the right the outputs climb without bound. From the left they drop without bound.
  5. Far away, test inputs of larger and larger size. The outputs close in on 0, from above on the right and from below on the left.
  6. Draw two separate smooth branches, one in Quadrant I and one in Quadrant III. Do not join them across x = 0.
  7. Write each trend in arrow notation: first where x heads, then where f(x) heads.

Worked example

Worked example

From a table to a sketch to four arrow statements

Sketch the graph of f(x) = 1x and write, in arrow notation, what it does near zero and far away. In plain words: find enough points to draw the curve, then say where the outputs head as the inputs slide toward 0 from each side and as they run off to the right and to the left.

Show the steps and the answer
input xoutput f(x)−0.1−10−0.01−100−0.001−10000.00110000.011000.110
Near zero.
input xoutput f(x)−1000−0.001−100−0.01−10−0.1100.11000.0110000.001
Far away: the farther the input is from 0, the closer the output is to 0.
(0.5, 2)(1, 1)(2, 0.5)(−0.5, −2)(−1, −1)(−2, −0.5)−4−224−4−224
Six anchor points, three on each branch, with 0.5 standing for 12: the two branches never meet.
  1. Try the input 0: f(0) would be 1÷0, which has no value. Leave x=0 out and put no point on the y-axis.No number times 0 gives 1, so the division has no answer. This step finds the one input the function refuses, so we know where the graph breaks.
  2. Compute three points on the right: f(12)=2,f(1)=1,f(2)=12. Plot (12,2), (1, 1) and (2,12).Dividing 1 by 12 means multiplying 1 by the flip, 2. Dividing 1 by 1 gives 1. Dividing 1 by 2 gives 12.
  3. Compute three points on the left: f(−12)=−2,f(−1)=−1,f(−2)=−12. Plot (−12,−2),(−1,−1) and (−2,−12).A positive divided by a negative is negative, so each output keeps its size and takes a minus sign.
  4. Slide toward 0 from the right. In the first table, the columns under 0.1, 0.01 and 0.001 hold 10, 100 and 1000. Write: as x→0+,f(x)→∞.The outputs grow past every number, and the raised + records that the inputs came in from the right.
  5. Slide toward 0 from the left. In the first table, the columns under −0.1,−0.01 and −0.001 hold −10,−100 and −1000. Write: as x→0−,f(x)→−∞.The outputs fall below every number, and the raised − records that the inputs came in from the left.
  6. Run far to the right. In the second table, the columns under 10, 100 and 1000 hold 0.1, 0.01 and 0.001. Write: as x→∞,f(x)→0.The outputs close in on 0 and stay positive.
  7. Run far to the left. In the second table, the columns under −10,−100 and −1000 hold −0.1,−0.01 and −0.001. Write: as x→−∞,f(x)→0.The outputs close in on 0 and stay negative.
  8. Join the three right points with one smooth curve that climbs steeply beside the y-axis and flattens toward the x-axis. Draw a second, separate curve through the three left points. Do not connect the two curves across x=0.There is no point at x = 0, and the outputs head in opposite directions on the two sides, so nothing joins the branches.
Answer
  • Two separate branches: one in Quadrant I through (12, 2), (1, 1), (2, 12) and one in Quadrant III through (−12, −2), (−1, −1), (−2, −12).
  • As x → 0+, f(x) → ∞.
  • As x → 0−, f(x) → −∞.
  • As x → ∞, f(x) → 0.
  • As x → −∞, f(x) → 0.
Double-check A second way: every point on this graph must satisfy x × y = 1, because y is 1 divided by x. Test the six plotted points: 12 × 2 = 1, 1 × 1 = 1, 2 × 12 = 1, (−12) × (−2) = 1, (−1) × (−1) = 1, (−2) × (−12) = 1. All six pass. The same product explains the arrows: when x is tiny, y must be huge to keep the product at 1, and when x is huge, y must be tiny. The product is positive, so x and y share a sign, which puts the branches in Quadrants I and III.

The trap

The most common mistake is running the two behaviors together: thinking a small input gives a small output, or writing "as x → 0, f(x) → 0". It is the reverse. Inputs near 0 give outputs far from 0, and inputs far from 0 give outputs near 0. Before you write any arrow statement, plug in one test number, such as 0.01 or 1000, and look at both the size and the sign of the answer.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

How far out is far enough

For f(x) = 1x with positive x, how large must x be before the output drops below 1500? In plain words: the output has a ceiling of 1500. Find the inputs that keep the output under it.

Show the steps and the answer
  1. Find the border input, where the output is exactly 1500: 1x=1500 gives x=500.Two fractions with the same top, 1, are equal only when their bottoms match. This finds the one input that sits exactly on the ceiling, so we know where to look on each side of it.
  2. Plug it back in: f(500)=1500=0.002.Plugging the value back in shows it does what we wanted: the output equals the ceiling, not below it.
  3. Test a larger input: f(1000)=11000=0.001, and 0.001 < 0.002.A larger bottom makes a smaller fraction, so inputs past 500 fall under the ceiling.
  4. Test a smaller input: f(100)=1100=0.01, and 0.01 > 0.002.A smaller bottom makes a larger fraction, so inputs before 500 are over the ceiling.
  5. State the result: the output is below 1500 for every x > 500.The border is at 500 and the outputs keep shrinking as x grows.
Answer
x > 500
Double-check Try the neighbors of the border. f(501) = 1501 ≈ 0.001996 (rounded), which is below 0.002. f(499) = 1499 ≈ 0.002004 (rounded), which is above 0.002. The switch happens at 500, as found. Any positive ceiling you choose, however low, has a border like this one. That is what "as x → ∞, f(x) → 0" promises.

2 The domain of a rational function

about 4 minOpen the full lessonOnly this lesson

The rule

A rational function has the form f(x)=P(x)Q(x), where P(x) and Q(x) are polynomials and Q(x) is not the zero polynomial.

Domain of f: every real number x with Q(x)≠0. Solve Q(x)=0 on the original formula, before any canceling, and leave out each solution.

How

  1. Say what is asked. 'Find the domain' means: list every input x that gives an output.
  2. Cover the top. Copy down only the bottom of the formula as it was given. Do not cancel anything first.
  3. Set the bottom equal to 0. This hunts for the inputs that would make the machine divide by 0.
  4. Solve that equation. If the bottom is a line, undo the adding and the multiplying. If it has x2 or higher, factor it and set each factor equal to 0.
  5. Plug each solution back into the original bottom and confirm that you get 0.
  6. Write the domain: all real numbers except those solutions. On a number line, put an open dot at each excluded number and write the pieces between them in interval notation, joined by ∪.

Worked example

Worked example

A quadratic bottom with two excluded inputs

Find the domain of f(x) = 2x+1x2−x−12. In plain words: list every input x that gives an output, by first finding the inputs that do not.

Show the steps and the answer
−34(−∞, −3) ∪ (−3, 4) ∪ (4, ∞)
Open dots at −3 and 4 cut the line into the three pieces of the domain.
  1. Cover the top, 2x+1. Write down only the bottom: x2−x−12.The top is a polynomial, and a polynomial accepts every real number. Only the bottom can stop the division.
  2. Set the bottom equal to 0: x2−x−12=0.This step hunts for the inputs that would make the machine divide by 0, so they can be thrown out. It is not solving f(x) = 0.
  3. Factor the bottom. Find two numbers that multiply to −12 and add to −1. They are −4 and 3, so x2−x−12=(x−4)(x+3).(−4) × 3 = −12 and −4 + 3 = −1. A factored bottom shows its zeros one factor at a time.
  4. Set each factor equal to 0. x−4=0 gives x=4. x+3=0 gives x=−3.A product is 0 only when one of its factors is 0, so these two small equations find every zero of the bottom.
  5. Plug each value back into the original bottom. At x=4: 42−4−12=16−4−12=0. At x=−3: (−3)2−(−3)−12=9+3−12=0.Both make the bottom 0. The top is 9 at x = 4 and −5 at x = −3, so f(4) would be 9 ÷ 0 and f(−3) would be −5 ÷ 0. Neither has an answer.
  6. Throw out −3 and 4 and keep everything else. On the number line, put an open dot at −3 and an open dot at 4, then shade the three stretches around them.Two excluded numbers cut the line into three pieces: left of −3, between −3 and 4, and right of 4.
  7. Write the pieces in interval notation from left to right: (−∞,−3)∪(−3,4)∪(4,∞).A round parenthesis means that end is left out, and ∪ joins the pieces into one set.
Answer
  • Excluded inputs: x = −3 and x = 4
  • Domain: (−∞, −3) ∪ (−3, 4) ∪ (4, ∞)
  • In words: all real numbers except −3 and 4
Double-check A second way, in two parts. First, multiply the factors back out: (x − 4)(x + 3) = x2 + 3x − 4x − 12 = x2 − x − 12, which matches the bottom, so the factoring is right. Second, test one number from each piece in the bottom: x = −4 gives 16 + 4 − 12 = 8, x = 0 gives −12, and x = 5 gives 25 − 5 − 12 = 8. None is 0, so all three pieces belong to the domain, and f(0) = 1−12 = −112 is a real output.

The trap

Canceling before you find the domain. f(x) = x2−1x−1 factors to (x−1)(x+1)x−1 and cancels to x + 1, which looks as if it accepts every number. But the original formula at x = 1 is 0 ÷ 0, which has no answer. The domain is still (−∞, 1) ∪ (1, ∞). Always solve bottom = 0 on the formula as it was given, and simplify only after that.

Quick check

Try it before you open its steps. It is question 3 of 6 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 6

A bottom that is never zero

Find the domain of h(x) = x−3x2+9. In plain words: is there any input that makes the bottom 0?

Show the steps and the answer
no square ever lands below 0(−3, 9)(3, 9)(0, 0)−33−49
The graph of y = x2 never dips below the x-axis, so x2 plus a positive number can never be 0.
  1. Write the bottom and set it equal to 0: x2+9=0.Same hunt as always: look for inputs that make the bottom zero.
  2. Subtract 9 from both sides: x2=−9.This asks which number, multiplied by itself, gives −9.
  3. Stop. No real number squared is negative, so this equation has no solution.x2 is 0 or more for every real x, so x2 + 9 is 9 or more. The bottom never reaches 0.
  4. Exclude nothing. Domain: (−∞,∞).With no input that breaks the division, every real number is allowed.
Answer
  • Excluded inputs: none
  • Domain: (−∞, ∞), all real numbers
Double-check Test the tempting numbers. At x = 3 the bottom is 32 + 9 = 18. At x = −3 it is (−3)2 + 9 = 18. At x = 0 it is 9, the smallest value it ever takes. It is never 0. The gotcha: x2 + 9 is not (x − 3)(x + 3). That product is x2 − 9. Also, x = 3 makes the top 0, which gives h(3) = 018 = 0, an ordinary output.

3 Vertical asymptotes and holes

about 4 minOpen the full lessonOnly this lesson

The rule

Factor the top and the bottom and cancel every common factor.

If x = a still makes the bottom zero after canceling, the line x = a is a vertical asymptote. If x = a makes the original bottom zero but no longer makes the simplified bottom zero, the graph has a hole (a removable discontinuity) at x = a, and the height of the hole is the value of the simplified formula at a.

How

  1. Factor the top and the bottom completely.
  2. Set the original bottom equal to 0 and solve. These are the inputs the function cannot take. Every break in the graph sits at one of them.
  3. Cancel every factor that appears in both the top and the bottom. Write the simplified formula, and keep a note of every input you excluded in step 2.
  4. Test each excluded input in the simplified bottom. If the bottom is still zero there, the line x = a is a vertical asymptote.
  5. If the simplified bottom is no longer zero there, the graph has a hole at x = a. Plug a into the simplified formula to get the height b, and write the hole as the point (a, b).
  6. Count. The vertical asymptotes and the holes together must account for every excluded input from step 2.

Worked example

Worked example

One wall and one hole in the same function

Find every vertical asymptote and every hole of f(x) = 2x−6x2−4x+3. In plain words: find each input where the graph breaks, and say whether the break is a wall or a single missing point.

hole (3, 1)−224−6−4−2246
The curve is y = 2x−1.
Show the steps and the answer
  1. Factor the top: 2x−6=2(x−3).Both terms share a 2. Pulling it out shows the factor (x − 3).
  2. Factor the bottom: x2−4x+3=(x−1)(x−3).You need two numbers that multiply to 3 and add to −4. Those are −1 and −3.
  3. Set the original bottom equal to 0: (x−1)(x−3)=0, so x=1 or x=3.This finds the inputs that make the bottom zero, the only places the graph can break. Plug back in: 12 − 4(1) + 3 = 0 and 32 − 4(3) + 3 = 9 − 12 + 3 = 0.
  4. Cancel the common factor (x−3): f(x)=2(x−3)(x−1)(x−3)=2x−1, for x≠3.x−3x−3 is 1 for every x except 3. The note x ≠ 3 keeps the record that 3 is still not allowed.
  5. Test x=1 in the simplified bottom: 1−1=0. Still zero, so x=1 is a vertical asymptote.The factor (x − 1) did not cancel. Near 1 the top is 2 and the bottom is tiny, so the outputs are huge.
  6. Test x=3 in the simplified bottom: 3−1=2. Not zero, so there is a hole at x=3.The factor that made the bottom zero at 3 canceled away, so the simplified formula has an ordinary value there.
  7. Find the height of the hole: 23−1=22=1. The hole is at (3, 1).The graph follows the simplified formula everywhere else, so the missing point sits where that formula would have put it.
  8. Describe the wall in arrow notation: as x→1+,f(x)→∞, and as x→1−,f(x)→−∞.A little right of 1 the bottom x − 1 is a small positive number, and 2 over a small positive number is large and positive. A little left of 1 the bottom is a small negative number, so the output is large and negative.
Answer
  • Vertical asymptote: x = 1
  • Hole: (3, 1)
Double-check Use the original formula on a calculator. Near 1: f(1.01) = 2(1.01)−61.012−4(1.01)+3 = −3.98−0.0199 = 200 and f(0.99) = −4.020.0201 = −200. Huge outputs with opposite signs: a wall, with the signs the arrows predicted. Near 3: f(2.9) = −0.2−0.19 ≈ 1.053 and f(3.1) = 0.20.21 ≈ 0.952. Both sit close to 1: a hole at height 1. Two excluded inputs, one wall and one hole, so every one is accounted for.

The trap

The most common mistake is to stop at the domain: you find the zeros of the bottom and call every one of them a vertical asymptote. Some of them may be holes. Always factor and cancel first, then sort each excluded input by whether it still makes the simplified bottom zero. Still zero means a wall. No longer zero means a hole, with its height taken from the simplified formula.

Quick check

Try it before you open its steps. It is question 3 of 6 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 6

One wall and one hole

Find the vertical asymptotes and holes of f(x) = x+3x2+x−6. In plain words: find the two inputs that make the bottom zero and sort each one into wall or hole.

Show the steps and the answer
hole−4−2246−4−224
The wall stands at x = 2, and the open circle at (−3, −15), a little below the x-axis.
  1. Factor the bottom: x2+x−6=(x+3)(x−2).You need two numbers that multiply to −6 and add to 1. Those are 3 and −2.
  2. Set the bottom equal to 0: (x+3)(x−2)=0, so x=−3 or x=2.This finds the excluded inputs. Plug back in: (−3)2 + (−3) − 6 = 9 − 3 − 6 = 0 and 22 + 2 − 6 = 0.
  3. Cancel (x+3): f(x)=x+3(x+3)(x−2)=1x−2, for x≠−3.When the whole top cancels, a 1 is left on top, not a 0, because x+3x+3 is 1.
  4. Test x=2 in the simplified bottom: 2−2=0. Still zero, so x=2 is a vertical asymptote.The factor (x − 2) stayed in the bottom.
  5. Test x=−3 in the simplified bottom: −3−2=−5. Not zero, so there is a hole at x=−3.The factor (x + 3) canceled completely.
  6. Find the height: 1−3−2=1−5=−15. The hole is at (−3,−15).Plug the excluded input into the simplified formula, never into the original.
Answer
  • Vertical asymptote: x = 2
  • Hole: (−3, −15)
Double-check Original formula near −3: f(−2.9) = 0.18.41−2.9−6 = 0.1−0.49 ≈ −0.204, close to −15 = −0.2. Near 2: f(2.1) = 5.14.41+2.1−6 = 5.10.51 = 10 and f(2.01) = 5.010.0501 = 100. The outputs settle near −3 and blow up near 2.

4 Horizontal and slant asymptotes

about 3 minOpen the full lessonOnly this lesson

The rule

For a top that is not the constant 0, compare the degree of the top with the degree of the bottom.

Top degree < bottom degree: horizontal asymptote y=0. Degrees equal: horizontal asymptote y=leadingcoefficientofthetopleadingcoefficientofthebottom. Top degree = bottom degree +1: no horizontal asymptote, and the slant asymptote is y= the quotient of top ÷ bottom with the remainder dropped. Top degree bigger by 2 or more: neither.

How

  1. Find the degree of the top and the degree of the bottom: the highest power of x in each. Write both numbers down. A top that is the constant 0 has no degree: that function is 0 wherever it is defined.
  2. If the top's degree is smaller, the horizontal asymptote is y = 0. Stop.
  3. If the degrees are equal, divide the leading coefficient of the top by the leading coefficient of the bottom, keeping both signs. That number is the height of the horizontal asymptote. Stop.
  4. If the top's degree is exactly one more, divide the top by the bottom with polynomial division. The quotient, without the remainder, is the slant asymptote.
  5. If the top's degree is two or more above the bottom's, report that there is no horizontal asymptote and no slant asymptote.
  6. As a consistency check, try a big input such as x = 100 or x = 1000; the output is usually close to the line you found. The degrees or the division decide the asymptote; the number only checks it.

Worked example

Worked example

Equal degrees: reading the horizontal asymptote

Find the horizontal asymptote of f(x) = 8x2−3x+12x2+7. In plain words: when x is huge, positive or negative, what height does the graph settle at?

input xoutput f(x)103.7251003.98410003.998
x: 10, 100, 1000; f(x): 3.725, 3.984, 3.998.
Show the steps and the answer
input xoutput f(x)103.7251003.98410003.998
Outputs of f rounded to three decimals: each step farther out lands closer to 4.
  1. Find the degree of the top: 8x2−3x+1 has highest power x2, so the degree is 2.The degree is the highest power of x. It measures how strong the top is when x is huge.
  2. Find the degree of the bottom: 2x2+7 has highest power x2, so the degree is 2.The same measurement for the other side of the tug of war.
  3. Compare the degrees: 2=2. They are equal.Equal degrees means neither side wins, so the graph levels off at a number that is not 0.
  4. Read the leading coefficients: 8 on the top and 2 on the bottom.Far out, −3x + 1 and + 7 are tiny next to the x2 terms, so the fraction behaves like 8x22x2.
  5. Divide: 8÷2=4. The horizontal asymptote is y=4.In 8x22x2 the x2 on the top and the bottom cancel, leaving 82 = 4.
  6. Say it in arrow notation: as x→∞,f(x)→4, and as x→−∞,f(x)→4.A horizontal asymptote describes both far ends of the graph, and a rational function settles at the same height on both.
Answer
The horizontal asymptote is the line y = 4.
Double-check Plug in big inputs, the columns of the table. f(100) = 7970120007 ≈ 3.984 and f(1000) = 79970012000007 ≈ 3.998 (both rounded). The outputs close in on 4. A third way: divide every term by x2 to get (8 − 3x + 1x2) ÷ (2 + 7x2). The small fractions go to 0, leaving 8 ÷ 2 = 4.

The trap

Dividing the leading coefficients without first comparing the degrees. The ratio of leading coefficients is the horizontal asymptote only when the two degrees are equal. For 3x+1x2−4 the tempting answer y = 3 is wrong: the bottom is stronger, so the answer is y = 0. Write the two degrees down before you touch the coefficients.

Quick check

Try it before you open its steps. It is question 4 of 7 in the full lesson, where they run from easy to exam-hard.

Try it · level 4 of 7

Factored form

Find the horizontal asymptote of m(x) = (2x−1)(x+3)(x−2)(4x+5). In plain words: what height do the outputs settle at when x is huge?

Show the steps and the answer
  1. Leading term of the top: multiply the x terms of the two brackets, 2x·x=2x2. The degree is 2 and the leading coefficient is 2.When brackets are multiplied out, the highest power comes only from multiplying the highest terms together. You do not need the rest of the expansion.
  2. Leading term of the bottom: x·4x=4x2. The degree is 2 and the leading coefficient is 4.The same shortcut on the bottom.
  3. Compare: the degrees are equal.So divide the leading coefficients.
  4. Divide: 2÷4=12. The horizontal asymptote is y=12.24 reduces to 12. A fraction is a perfectly good height for a horizontal line.
Answer
Horizontal asymptote: y = 12.
Double-check Multiplying out fully gives 2x2+5x−34x2−3x−10, with the same leading coefficients 2 and 4. With numbers: m(100) = 2049739690 ≈ 0.516 and m(1000) = 20049973996990 ≈ 0.502 (both rounded). The outputs close in on 0.5.

5 Intercepts of a rational function

about 5 minOpen the full lessonOnly this lesson

The rule

Let f(x)=p(x)q(x) be a rational function, where p(x) is the top and q(x) is the bottom.

y-intercept: the point (0, f(0)), when q(0) ≠ 0. When q(0) = 0 there is no y-intercept.
x-intercepts: every point (a, 0) where p(a) = 0 and q(a) ≠ 0. A zero of the top that also makes the bottom 0 is never an x-intercept.

How

  1. Factor the top and the bottom. Use the original bottom to list the domain: every x except the ones that make the bottom 0.
  2. For the y-intercept, ask whether 0 is in the domain. If it is, compute f(0) and write the point (0, f(0)). If it is not, write: no y-intercept.
  3. For the x-intercepts, set the top equal to 0 and solve. These answers are the candidates.
  4. Test each candidate in the original bottom. Cross out any candidate that makes the bottom 0.
  5. Write each surviving candidate a as the point (a, 0).
  6. Check: put each surviving candidate into the original formula. You should get 0 over a number that is not 0.

Worked example

Worked example

Both intercepts when a factor cancels

Find the y-intercept and every x-intercept of f(x) = x2−x−6x2−4. In plain words: first, the input is 0, find the output. Second, the output is 0, find every input that gives it.

Show the steps and the answer
(0, 1.5)(3, 0)hole (−2, 5/4)−4−2246−4−2246
The curve crosses the y-axis at (0, 32) and the x-axis at (3, 0), and the open circle at (−2, 54) is the hole.
  1. Factor the top: x2−x−6=(x−3)(x+2).Two numbers that multiply to −6 and add to −1 are −3 and 2. Multiply back to be sure: x2 + 2x − 3x − 6 = x2 − x − 6.
  2. Factor the bottom: x2−4=(x−2)(x+2).It is a difference of squares: x2 − 22 = (x − 2)(x + 2).
  3. Set the bottom equal to 0: (x−2)(x+2)=0, so x=2 or x=−2. The domain is every real number except −2 and 2.This finds the inputs that would make the bottom zero, so we can throw them out. Plug back: 22 − 4 = 0 and (−2)2 − 4 = 0.
  4. y-intercept: 0 is in the domain, so compute f(0)=02−0−602−4=−6−4=32. The point is (0,32).Every point on the y-axis has x = 0. A negative divided by a negative is positive, and 64 reduces to 32 when top and bottom are both divided by 2.
  5. x-intercept candidates: set the top equal to 0. (x−3)(x+2)=0, so x=3 or x=−2.A fraction is 0 only when its top is 0. This step finds the only inputs that could give an output of 0.
  6. Test x=3 in the original bottom: 32−4=5. Keep x=3.5 ≠ 0, so 3 is in the domain and f(3) = 05 = 0.
  7. Test x=−2 in the original bottom: (−2)2−4=0. Throw out x=−2.The bottom is 0, so −2 is not in the domain. f(−2) would be 0 ÷ 0, which is undefined.
  8. See what the graph does at x=−2. Cancel the common factor: f(x)=x−3x−2 for x≠−2. Put −2 into this shorter form: −2−3−2−2=−5−4=54. The graph has a hole at (−2,54).This factor cancels with no copy of it left in the bottom, so it gives a hole, also called a removable discontinuity. The hole sits at height 54, above the x-axis, so the graph does not meet the x-axis there.
  9. Write the x-intercept: (3, 0).3 is the only candidate that survived the test.
Answer
  • y-intercept: (0, 32)
  • x-intercept: (3, 0)
  • Not an intercept: x = −2, where the graph has a hole at (−2, 54)
Double-check Second way for the y-intercept: use the shorter form x−3x−2 at x = 0. It gives −3−2 = 32, the same value. For the x-intercept, put 3 into the original formula: 9−3−69−4 = 05 = 0. For x = −2, the original formula gives 4+2−64−4 = 00, which is undefined, so there is no point there.

The trap

Keeping a zero of the top that also makes the bottom zero. For f(x) = x2−1x−1, the top is 0 at x = 1 and at x = −1. But x = 1 makes the bottom 0 too, so f(1) is 0 ÷ 0, which is undefined. The graph has a hole at (1, 2) there, and the only x-intercept is (−1, 0). Test every candidate in the original bottom before you call it an intercept.

Quick check

Try it before you open its steps. It is question 3 of 6 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 6

Two x-intercepts

Find the intercepts of f(x) = x2−4x+3x+3. In plain words: find the output when the input is 0, then find every input whose output is 0.

Show the steps and the answer
  1. Set the bottom equal to 0: x+3=0, so x=−3. The domain is every x except −3.This finds the input to throw out. Plug back: −3 + 3 = 0.
  2. y-intercept: f(0)=0−0+30+3=33=1. The point is (0, 1).0 is in the domain, and every term with x becomes 0.
  3. Factor the top: x2−4x+3=(x−1)(x−3).Two numbers that multiply to 3 and add to −4 are −1 and −3.
  4. Set the top equal to 0: (x−1)(x−3)=0, so x=1 or x=3.If a product is 0, one of its factors is 0. These are the candidates.
  5. Test the bottom. At x=1: 1+3=4. At x=3: 3+3=6. Keep both.Neither bottom is 0, so both inputs are in the domain.
Answer
  • y-intercept: (0, 1)
  • x-intercepts: (1, 0) and (3, 0)
Double-check f(1) = 1−4+31+3 = 04 = 0. f(3) = 9−12+33+3 = 06 = 0. Both outputs are 0.

6 Graphing a rational function from its features

about 7 minOpen the full lessonOnly this lesson

The rule

For a top that is not the constant 0, split the x-axis at every x-intercept, every vertical asymptote and every hole.

On each interval between neighboring split points, f(x) keeps one sign, so one test point tells whether the graph is above or below the x-axis there. The sketch is: dashed asymptotes, plotted intercepts, an open circle at each hole, one test point per interval, then smooth branches that never cross a vertical asymptote and, at the far left and far right, level toward the horizontal asymptote or slant asymptote. When the top's degree is two or more above the bottom's, there is neither, and the far ends follow the polynomial quotient that division gives.

How

  1. Factor the top and the bottom completely. Set the original bottom equal to 0 to find the inputs to throw out, and write the domain.
  2. Cancel any factor the top and bottom share. Each canceled factor (x − a) with no copy of it left in the bottom marks a hole at x = a: plug a into the simplified formula to get the hole's height, and plan an open circle there.
  3. Set the simplified bottom equal to 0. Each solution is a vertical asymptote. Draw a dashed vertical line at each one.
  4. Compare the degrees of top and bottom to get the horizontal asymptote, or divide when the top's degree is one more to get the slant asymptote. Draw it dashed.
  5. Find the intercepts: f(0) for the y-intercept when 0 is in the domain, and for the x-intercepts the zeros of the simplified top where the original bottom is not 0. Plot them.
  6. Mark every x-intercept, vertical asymptote and hole on the x-axis; with a top that is not the constant 0 there are finitely many. These split points cut the axis into intervals.
  7. Pick one test point inside each interval, plug it in, and plot the point. A positive output means that stretch is above the x-axis. A negative output means it is below.
  8. Draw each branch last: through its plotted points, climbing or diving beside each vertical asymptote on the side its test point says, and, at the far left and far right, leveling toward the horizontal or slant asymptote, or following the quotient from division when there is neither. Put the open circle at each hole.
  9. Check with one input very close to each vertical asymptote and one input far out, such as x = 100.

Worked example

Worked example

A sketch with a hole, a wall and a level line

Sketch the graph of f(x) = x2−x−2x2−4. In plain words: find every feature of the graph from the formula, then draw the one curve that fits all of them.

Show the steps and the answer
−2−12+−++
Three split points, four intervals, four test points: above, below, above, above.
(−3, 2)(−1.5, −1)(−1, 0)(0, 1/2)(3, 4/5)hole (2, 3/4)−8−44−4−2246
The finished sketch: the open circle at (2, 34) marks the hole, because the function has no output at x = 2.
  1. Factor the top and the bottom: f(x)=(x−2)(x+1)(x−2)(x+2).Factors show where the top and bottom are zero. For the top, −2 and 1 multiply to −2 and add to −1. The bottom is a difference of squares.
  2. Set the original bottom equal to 0: (x−2)(x+2)=0 gives x=2 and x=−2. The domain is all real numbers except −2 and 2.This finds the two inputs that would make the bottom zero, so we can throw them out. Plug back: 22 − 4 = 0 and (−2)2 − 4 = 0.
  3. Cancel the shared factor (x−2). The simplified formula is x+1x+2, with x≠2. The hole is at x=2, at height 2+12+2=34. Plan an open circle at (2,34).This factor cancels with no copy of it left in the bottom, so it gives a hole, also called a removable discontinuity, not a wall. The simplified formula tells the height the curve is heading for.
  4. Set the simplified bottom equal to 0: x+2=0 gives x=−2. Draw a dashed vertical line at x=−2.A zero of the bottom that survives canceling is a vertical asymptote. Plug back: −2 + 2 = 0, and the top there is −1, not zero.
  5. Compare degrees: top degree 2, bottom degree 2. The leading coefficients are 1 and 1, so the horizontal asymptote is y=11=1. Draw a dashed level line at y=1.When the degrees are equal, the far-out height is the ratio of the leading coefficients.
  6. Find the intercepts. Simplified top: x+1=0 gives x=−1, so the x-intercept is (−1,0). At x=0: f(0)=0−0−20−4=−2−4=12, so the y-intercept is (0,12).The graph meets the x-axis where the simplified top is zero and the original bottom is not, and it meets the y-axis at the input 0. A negative divided by a negative is positive.
  7. Mark the split points −2,−1 and 2 on the x-axis. They make four intervals: (−∞,−2),(−2,−1),(−1,2) and (2,∞).The sign of f can change only at an x-intercept, a vertical asymptote or a hole. Look at the open dots on the sign chart.
  8. Test one input in each interval with the simplified formula. f(−3)=−2−1=2. f(−1.5)=−0.50.5=−1. f(0)=12. f(3)=45. Plot (−3,2),(−1.5,−1) and (3,45).One output per interval tells the side of the x-axis for the whole interval: above, below, above, above. The y-intercept already serves as the test point for (−1, 2).
  9. Draw the left branch. It passes through (−3,2), climbs without bound as x approaches −2 from the left, and levels toward y=1 at the far left.The test point says this stretch is above the x-axis, so beside the wall the curve must go up. Far out it must follow the horizontal asymptote.
  10. Draw the right branch. It starts far below, immediately right of x=−2, rises through (−1.5,−1),(−1,0) and (0,12), has an open circle at (2,34), passes (3,45), and levels toward y=1.The test point −1.5 says the curve is below the x-axis next to the wall, so it comes up from below. The open circle shows that x = 2 is not in the domain.
Answer
  • Domain: all real numbers except −2 and 2.
  • Hole (removable discontinuity): open circle at (2, 34).
  • Vertical asymptote: x = −2.
  • Horizontal asymptote: y = 1.
  • Intercepts: (−1, 0) and (0, 12).
  • Left branch: above y = 1, through (−3, 2), climbing as x approaches −2 from the left.
  • Right branch: rising from far below beside x = −2, through (−1.5, −1), (−1, 0), (0, 12), the open circle at (2, 34) and (3, 45), leveling toward y = 1 from below.
Double-check Test the sketch with numbers it has not seen. Near the wall: f(−2.1) = −1.1−0.1 = 11, large and positive, and f(−1.9) = −0.90.1 = −9, large and negative. Both match the branches. Far out: f(98) = 99100 = 0.99, close to 1 and below it. Near the hole: f(2.1) = 3.14.1 ≈ 0.756 (rounded), close to 34, so nothing blows up there. The original formula agrees with the simplified one at x = 3: 9−3−29−4 = 45.

The trap

The most common mistake is to plot a handful of points and join them all in one stroke, straight through a vertical asymptote. The function has no output at a vertical asymptote, so no part of the curve may pass through that dashed line. Draw every asymptote first, lift the pencil at each vertical one, and let the test point on each side decide whether that side climbs or dives.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

Both sides of the wall go the same way

Sketch the graph of f(x) = x2−4x+3x2−4x+4. In plain words: find the features from the formula, then draw the curve that fits them.

Show the steps and the answer
123+−−+
Notice the two minus signs on either side of 2: the sign does not flip at this wall.
(0, 3/4)(1, 0)(1.5, −3)(2.5, −3)(3, 0)(4, 3/4)−4−22468−8−6−4−224
Both branches dive beside x = 2, as the two test points next to the wall confirm.
  1. Factor. Top: −1 and −3 multiply to 3 and add to −4, so the top is (x−1)(x−3). Bottom: −2 and −2 multiply to 4 and add to −4, so the bottom is (x−2)2. Set the bottom equal to 0: x=2. The domain is all real numbers except 2.This finds the one input that would make the bottom zero, so we can throw it out. Plug back: 4 − 8 + 4 = 0.
  2. No factor is shared, so there is no hole. The vertical asymptote is x=2.The top's factors are (x − 1) and (x − 3). Neither one matches (x − 2).
  3. Compare degrees: 2 and 2, with leading coefficients 1 and 1. The horizontal asymptote is y=1.Equal degrees give the ratio of the leading coefficients.
  4. Intercepts: (x−1)(x−3)=0 gives x=1 and x=3, so the x-intercepts are (1, 0) and (3, 0). f(0)=34, so the y-intercept is (0,34).Zeros of the simplified top where the original bottom is not 0 are x-intercepts. At x = 0 only the constants remain.
  5. Split points: 1, 2 and 3. Intervals: (−∞,1), (1, 2), (2, 3), (3,∞). Test with the factored form: f(0)=34. f(1.5)=(0.5)(−1.5)(−0.5)2=−0.750.25=−3. f(2.5)=(1.5)(−0.5)(0.5)2=−0.750.25=−3. f(4)=(3)(1)(2)2=34.The signs are +, −, −, +. The sign does not change across x = 2, because the squared bottom is positive on both sides.
  6. Left branch: leveling near y=1 at the far left, through (0,34) and (1, 0), then diving through (1.5,−3) as x approaches 2 from the left. Right branch: coming up from far below beside x=2, through (2.5,−3), (3, 0) and (4,34), leveling toward y=1.Both test points next to the wall are negative, so both branches dive beside it.
Answer
  • Domain: all real numbers except 2.
  • No hole.
  • Vertical asymptote: x = 2, with the graph diving on both sides.
  • Horizontal asymptote: y = 1.
  • Intercepts: (1, 0), (3, 0) and (0, 34).
  • Both branches stay below y = 1 and mirror each other across x = 2.
Double-check Near the wall: f(1.9) = (0.9)(−1.1)0.01 = −99 and f(2.1) = (1.1)(−0.9)0.01 = −99, both large and negative. Far out: f(102) = 101·991002 = 999910000 = 0.9999, close to 1 and below it.

7 Writing a rational function from its graph

about 4 minOpen the full lessonOnly this lesson

The rule

The first candidate formula, with the simplest factors, for a graph that crosses the x-axis at x=p and x=q, has vertical asymptotes at x=r and x=s, and has a hole at x=c is f(x)=a·(x−p)(x−q)(x−c)(x−r)(x−s)(x−c) with a≠0.

With no hole, leave out both (x−c) factors. Find a by plugging in one more point of the graph that is not on the x-axis. If the graph goes the same way on both sides of a vertical asymptote, square that bottom factor, the simplest even power. If the graph touches the x-axis at an intercept and turns back, square that top factor. Check the candidate against the rest of the graph: a graph can call for higher powers or for factors with no real zero, such as x2+1.

How

  1. Say what the question asks: build the fraction whose graph has exactly the features you see.
  2. List the x-intercepts. For a crossing at x = p, write the factor (x − p) on the top, and for a touch that turns back, (x − p)2. If there are no x-intercepts, try a top with no x in it, the simplest choice; the rest of the graph can still call for a factor with no real zero, such as x2 + 1.
  3. List the vertical asymptotes. For a wall at x = r, write the factor (x − r) on the bottom. If the graph goes the same way (both up or both down) on the two sides of the wall, write (x − r)2 instead.
  4. Look for a hole (an open circle). For a hole at x = c, write (x − c) on both the top and the bottom.
  5. Put an unknown number a in front of the fraction.
  6. Pick one point on the graph that is not on the x-axis and is not the hole. The y-intercept is usually the most convenient. Plug in its x and its y, then solve for a.
  7. Write the finished formula. Check it against a feature you did not use: the horizontal asymptote or a second point.

Worked example

Worked example

One crossing, one wall, one point

The graph shows a rational function. It has a vertical asymptote at x = −2, crosses the x-axis at (1, 0), crosses the y-axis at (0, −1), and levels off at the horizontal asymptote y = 2. Write a formula for it. In plain words: build the fraction whose graph has exactly these features.

(1, 0)(0, −1)−8−44−8−44812
Notice the wall at x = −2, the crossing at (1, 0), the point (0, −1) and the level line y = 2.
Show the steps and the answer
  1. List what the graph tells you: a wall at x=−2, a crossing at x=1, the point (0,−1), and a horizontal asymptote at y=2.These four facts are everything the picture gives. The first three build the formula. The fourth is saved for the check.
  2. The x-intercept is at x=1, so write (x−1) on the top.(x − 1) is 0 when x = 1, since 1 − 1 = 0. A top of 0 gives an output of 0, which is a crossing.
  3. The vertical asymptote is at x=−2, so write (x+2) on the bottom.x − (−2) = x + 2, and −2 + 2 = 0. A bottom of 0 that does not cancel makes the wall.
  4. There is no hole, so no factor is shared. Put a in front: f(x)=a·x−1x+2.The crossing and the wall fix the factors. They cannot fix the number in front, so it stays a letter for now.
  5. Plug in the point (0, −1): −1=a·0−10+2=a·−12.The point is on the graph, so its input 0 and output −1 must make the formula true. This step finds the one value of a that does it.
  6. Multiply both sides by −2: a=2.−12 times −2 is 1, which leaves a alone. On the other side, (−1)(−2) = 2.
  7. Write the formula: f(x)=2(x−1)x+2.Every piece is now known. Multiplied out, the top is 2x − 2.
Answer
f(x) = 2(x−1)x+2, which multiplies out to 2x−2x+2
Double-check Use the feature that was held back. The top and the bottom both have degree 1, so the horizontal asymptote is the ratio of leading coefficients: y = 21 = 2. The graph levels off at y = 2. Plugging back in also works: f(1) = 2(0)3 = 0 and f(0) = 2(−1)2 = −1.

The trap

Stopping after the factors. x−1x+2 has the right crossing and the right wall, but its graph passes through (0, −12) and levels off at y = 1. The graph in the example passes through (0, −1) and levels off at y = 2. Always write a in front and use a point to find it, even when a turns out to be 1.

Quick check

Try it before you open its steps. It is question 3 of 5 in the full lesson, where they run from easy to exam-hard.

Try it · level 3 of 5

Both sides of the wall go up

The graph of a rational function has a vertical asymptote at x = 1. On both sides of the wall the graph shoots up. It never crosses the x-axis, its horizontal asymptote is y = 0, and it passes through (2, 3) and (0, 3). Write a formula. In plain words: find the fraction whose graph climbs on both sides of the wall and passes through these points.

(2, 3)(0, 3)−4−2246−2246810
Notice that the graph goes up on both sides of the wall at x = 1 and sits at height 3 one step to each side.
Show the steps and the answer
  1. There are no x-intercepts, so try the simplest top: only the number a.The graph never reaches height 0, so the top can never be 0.
  2. The wall is at x=1, so the bottom needs the factor (x−1). Try the first power: ax−1.(x − 1) is 0 when x = 1, which makes the wall.
  3. Test the trial against the two points. At x=2 the bottom is 2−1=1. At x=0 the bottom is 0−1=−1. The bottoms have opposite signs, so the two outputs would have opposite signs. The graph shows both at height 3.A first power changes sign as x passes the wall, which sends one side up and the other side down. That is not this graph.
  4. Square the factor: f(x)=a(x−1)2.A square is never negative: (1)2 = 1 and (−1)2 = 1. Both sides of the wall now have the same sign, so both go the same way.
  5. Plug in the point (2, 3): 3=a(2−1)2=a1=a. So a=3.The point is on the graph, so it must make the formula true. This finds a.
  6. Write the formula: f(x)=3(x−1)2.Every piece is now known.
Answer
f(x)=3(x−1)2
Double-check Use the other point. At x = 0: 3(0−1)2 = 31 = 3, and the graph passes through (0, 3). The top has degree 0 and the bottom has degree 2, so the horizontal asymptote is y = 0, as on the graph.

8 Quick checks for the whole unit

8 questions

Quick check 1 of 8

What is the domain of f(x) = x+5x2−16?

Show the steps and the answer
Answer
All real x except −4 and 4, or (−∞, −4) ∪ (−4, 4) ∪ (4, ∞). The bottom factors as (x − 4)(x + 4), which is zero at those two inputs.

Quick check 2 of 8

For f(x) = x−1(x−1)(x+6), what happens at x = 1 and at x = −6?

Show the steps and the answer
Answer
  • Hole at x = 1: the factor (x − 1) cancels, leaving 1x+6, so the hole is at (1, 17).
  • Vertical asymptote at x = −6: that factor stays in the bottom.

Quick check 3 of 8

What is the horizontal asymptote of f(x) = 5x2+12x2−3?

Show the steps and the answer
Answer
y = 52. The degrees are equal (both 2), so divide the leading coefficients: 5 ÷ 2.

Quick check 4 of 8

What is the horizontal asymptote of f(x) = 7xx2+1?

Show the steps and the answer
Answer
y = 0. The bottom has the higher degree (2 against 1), so it outgrows the top and the fraction shrinks toward 0. Check: f(100) = 70010001 ≈ 0.07.

Quick check 5 of 8

What kind of asymptote does f(x) = x2+4x−2 have far out, and what is its equation?

Show the steps and the answer
Answer
A slant asymptote, because the top's degree (2) is exactly one more than the bottom's (1). Dividing gives x + 2 with remainder 8, so the line is y = x + 2. Check: (x − 2)(x + 2) + 8 = x2 − 4 + 8 = x2 + 4.

Quick check 6 of 8

Find the intercepts of f(x) = x−6x+2.

Show the steps and the answer
Answer
  • y-intercept: f(0) = −62 = −3, the point (0, −3).
  • x-intercept: the top is zero at x = 6 and the bottom is not, the point (6, 0).

Quick check 7 of 8

For f(x) = 1x, finish both sentences. As x → 0−, f(x) → ? As x → ∞, f(x) → ?

Show the steps and the answer
Answer
  • As x → 0−, f(x) → −∞: for example, f(−0.01) = −100.
  • As x → ∞, f(x) → 0: for example, f(1000) = 0.001.

Quick check 8 of 8

A rational function has one vertical asymptote, x = 4, one x-intercept, (1, 0), and passes through (5, 8). Write a formula for it.

Show the steps and the answer
Answer
  • Start with f(x) = a(x−1)x−4. The point gives f(5) = a·41 = 4a = 8, so a = 2.
  • f(x) = 2(x−1)x−4. Check: f(5) = 2·41 = 8.