Quarry School

Writing a rational function from its graph

Subject: MathematicsLeans on: Subtracting a negativeLeans on: When a factor is zeroLeans on: Reading a pointLeans on: Undoing a multiplicationLeans on: Signs when multiplying and dividingLeans on: Horizontal asymptote by degreesLeans on: Height of a hole
Level 1 · FoundationsAbout 22 min read3 new terms
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Quick review (2 minutes)

    In plain words

    So far you were handed a formula and you drew its graph.

    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.

    Step

    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.

    Question

    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.

    Answer

    f(x) = 2(x−1)x+2, which multiplies out to 2x−2x+2

    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.

    Strategy

    1. List every feature the graph shows: x-intercepts, vertical asymptotes, holes, the horizontal asymptote, and at least one other point.

    2. Turn each x-intercept at x = p into a factor on the top: (x − p) where the graph crosses, (x − p)2 where it touches and turns back.

    3. Turn each vertical asymptote at x = r into a factor (x − r) on the bottom, squared if both sides of the wall go the same way.

    4. Turn each hole at x = c into a factor (x − c) on both the top and the bottom.

    5. Write a in front, plug in a point that is off the x-axis and is not the hole, and solve for a.

    6. Check the finished formula against a feature you did not use.

    Term

    rational function

    Definition

    A function written as a fraction: one polynomial on top, another polynomial on the bottom. It is defined everywhere except where the bottom equals zero.

    Term

    vertical asymptote

    Definition

    A vertical line x = a that the graph shoots up or down beside and never touches. It sits at an input where the bottom is zero after canceling. Say it AS-im-toht.

    Term

    horizontal asymptote

    Definition

    A horizontal line y = b that the graph settles toward as x goes far right or far left. It describes the far ends only. The graph may cross it in the middle.

    Term

    slant asymptote

    Definition

    A tilted line y = mx + b that the graph follows far out. It appears when the top's degree is exactly one more than the bottom's. Dividing gives its equation.

    Term

    removable discontinuity

    Definition

    A single missing point in a graph, also called a hole. It appears when a factor (x − a) cancels from top and bottom with no copy of it left in the bottom: the curve looks unbroken, but that one input has no output.

    1 In plain words

    So far you were handed a formula and you drew its graph. This lesson runs the other way: you are handed the graph of a rational function and you write its formula. Think of tasting a soup and writing down the recipe. Each flavor you notice names one ingredient. On a graph, each feature names one piece of the formula. A place where the graph crosses the x-axis puts a piece on the top of the fraction. A vertical asymptote, the dashed wall the graph never touches, puts a piece on the bottom. A hole puts the same piece on both. The last question is how much: one number out in front, and one extra point on the graph tells you what it is.

    2 Picture it

    (2, 0)(0, −6)−8−448−12−661218(2, 0)(0, −6)−8−448−12−661218
    Notice the crossing at x = 2, the wall at x = −1 and the point (0, −6).

    Reminder

    Reminder: Subtracting a negative, When a factor is zero, Reading a point, Undoing a multiplication, Signs when multiplying and dividing, Horizontal asymptote by degrees, Height of a hole
    • Subtracting a negative. x − (−2) = x + 2. A crossing or a wall at a negative number gives a plus sign inside the factor.
    • When a factor is zero. (x − 4) is 0 only at x = 4, because 4 − 4 = 0.
    • Reading a point. (0, −1) means the input is 0 and the output is −1: x = 0 and f(x) = −1.
    • Undoing a multiplication. To free a in −3a = 6, divide both sides by −3: a = −2.
    • Signs when multiplying and dividing. Two negatives make a positive: (−1)(−2) = 2 and −4−6 = 23. One negative makes a negative: 6 ÷ (−3) = −2.
    • Horizontal asymptote by degrees. Same degree on top and bottom: y is the ratio of leading coefficients, so 2x−2x+2 levels off at y = 21 = 2. Larger degree on the bottom: y = 0.
    • Height of a hole. Cancel the shared factor first, then plug in: 3(x−1)(x+1)(x−2)(x+1) becomes 3(x−1)x−2, and at x = −1 that is −6−3 = 2.

    3 Why

    Every earlier fact works in both directions. A zero of the simplified top where the original bottom is not 0 is an x-intercept, so an x-intercept at x = 1 means the top holds the factor (x − 1), the piece that equals 0 when x is 1. A zero of the bottom that survives is a vertical asymptote, so a wall at x = −2 means the bottom holds (x + 2). Multiplying the whole fraction by a number a ≠ 0 moves no crossing and no wall, because a times 0 is still 0. So the crossings and walls cannot tell you a. Once the factors are chosen, one point off the x-axis can, and so can the height of a horizontal asymptote other than 0.

    4 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.

    The same idea, five ways

    Say it

    f of x equals a, times the crossing factors, over the wall factors.

    Write it

    A first candidate formula is a number a times one factor for each x-intercept, divided by one factor for each vertical asymptote, with the factor of any hole written on both the top and the bottom. Square a factor where the graph touches the x-axis and turns back, or where it goes the same way on both sides of a vertical asymptote. Then check the candidate against the rest of the graph, which can call for higher powers or for factors with no real zero.

    In math
    • f(x)=a·(x−p)(x−q)(x−r)(x−s)
    • x-intercept at x = p where the graph crosses: factor (x − p) on the top
    • x-intercept at x = p where the graph touches and turns back: factor (x − p)2 on the top
    • vertical asymptote at x = r, one side up and one side down: factor (x − r) on the bottom
    • vertical asymptote at x = r, both sides the same way: factor (x − r)2 on the bottom
    • hole at x = c: factor (x − c) on the top and on the bottom
    • point (x0, y0) on the graph: solve y0 = f(x0) for a
    Like

    Tasting a soup and writing the recipe: each flavor names an ingredient, and one spoonful tells you how much salt.

    See it

    crossing at x = p: (x − p) on the top

    wall at x = r: (x − r) on the bottom

    hole at x = c: (x − c) on both

    a in front

    one point off the x-axis gives a

    The same idea, other ways

    As a picture

    Flatten the graph onto the x-axis and keep only two kinds of marks. An open circle sits where a wall stands: the function has no output there, so that number goes into a bottom factor. A tick sits where the graph crosses: the output is 0 there, so that number goes into a top factor. For the graph above, the open circle at −1 gives (x + 1) on the bottom and the tick at 2 gives (x − 2) on the top.

    −1crossing(−∞, −1) ∪ (−1, ∞)
    The open circle at −1 is the wall and the tick at 2 is the crossing.
    As a story

    A friend describes a house over the phone: a door here, a wall there. You can draw the floor plan from that. You cannot tell how tall the house is until your friend gives you one measurement. Crossings and walls are the floor plan of the graph: they give the simplest factors of the formula. The one extra point, off the x-axis and away from the walls, is the measurement, and it sets a.

    With small numbers

    Start with 1x, whose wall is at x = 0. You want the wall at x = 5, so make the bottom x − 5: now the bottom is 0 at 5, since 5 − 5 = 0. Suppose the graph passes through (6, 4). The formula 1x−5 gives 16−5 = 1 at x = 6. That is four times too low, so a = 4. The formula is 4x−5, and 46−5 = 4.

    Why it must be true

    Take any formula with the right factors and multiply it by 5. Where the top was 0, 5 × 0 is still 0, so the crossings stay. Where the bottom was 0, it is still 0, so the walls stay. Many formulas share the same crossings and walls, one for each value of a other than 0. A single point off the x-axis picks out one of them, because at that point different values of a give different heights.

    With your hands

    Slide h. The wall stands at x = h every time, because the bottom x − h is 0 there. Now slide a to any value other than 0. The wall does not move and no crossing appears. Only the height of the curve at each input changes: the curve stretches, and a negative a also flips it over the x-axis. That is the reason a wall alone cannot give you a, and one point can.

    −6−4−2246−6−4−2246
    Sliding h moves the wall, and sliding a changes the curve without moving the wall.
    What you see on the graphThe simplest thing to writeWhy
    Crosses the x-axis at x = p(x − p) on the topThe top is 0 there, so the output is 0.
    Touches the x-axis at x = p and turns back(x − p)2 on the topA square is never negative, so the output keeps its sign on both sides.
    Vertical asymptote at x = r, one side up and one side down(x − r) on the bottomThe bottom is 0 there and changes sign as x passes r.
    Vertical asymptote at x = r, both sides the same way(x − r)2 on the bottomA square is never negative, so both sides keep the same sign, as on the graph of 1x2.
    Hole at x = c(x − c) on the top and on the bottomThe factor cancels and leaves a gap at the one input that makes it 0.
    Horizontal asymptote y = 0A lower degree on the top than on the bottom, or a top that is the constant 0When the bottom has the larger degree, the outputs shrink toward 0. A top that is the constant 0 makes every output 0.
    Horizontal asymptote y = k with k ≠ 0Equal degrees on top and bottom; with factors like (x − p), a = kWith equal degrees the graph levels off at the ratio of leading coefficients, which is a.
    One more point (x, y) off the x-axisPlug in x and y, solve for aOnly one value of a makes the formula true at that point.

    5 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.

    Writing a rational function from its graph

    1
    Does the graph meet the x-axis?
    YesFor each crossing at x = p, put (x − p) on the top; for each touch that turns back, put (x − p)2.
    NoTry the simplest top, with no x in it: only the number a. Check it against the rest of the graph.
    ↓
    2
    Is there a vertical asymptote?
    YesFor each wall at x = r, put (x − r) on the bottom.
    NoGo on.
    ↓
    3
    Does the graph go the same way (both up or both down) on the two sides of a wall?
    YesSquare that bottom factor: (x − r)2.
    NoLeave that factor to the first power, the simplest choice.
    ↓
    4
    Is there a hole (an open circle)?
    YesPut (x − c) on both the top and the bottom. Keep it there in the final answer, or cancel it and write x ≠ c beside the formula.
    NoGo on.
    ↓
    5
    Do you have a point that is off the x-axis and is not the hole?
    YesPlug in its x and y and solve for a.
    NoIf the top and bottom have the same number of x factors, a is the height of the horizontal asymptote.
    ↓
    6
    Does the finished formula match every feature and point the graph shows?
    YesYou are done.
    NoRecheck the signs inside the factors and the arithmetic for a. If those hold, the graph needs other powers or more factors: build a new candidate.
    1. List every feature the graph shows: x-intercepts, vertical asymptotes, holes, the horizontal asymptote, and at least one other point.
    2. Turn each x-intercept at x = p into a factor on the top: (x − p) where the graph crosses, (x − p)2 where it touches and turns back.
    3. Turn each vertical asymptote at x = r into a factor (x − r) on the bottom, squared if both sides of the wall go the same way.
    4. Turn each hole at x = c into a factor (x − c) on both the top and the bottom.
    5. Write a in front, plug in a point that is off the x-axis and is not the hole, and solve for a.
    6. Check the finished formula against a feature you did not use.

    6 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.

    Ladder: from easy to exam-hard

    Try each rung before you open its steps.

    Rung 1 of 5

    One wall, no crossing

    The graph of a rational function has a vertical asymptote at x = 3 and a horizontal asymptote at y = 0. It never crosses the x-axis. It passes through (4, 2) and (5, 1). Write a formula. In plain words: find the fraction whose graph has this wall and passes through these points.

    (4, 2)(5, 1)−22468−8−448
    Notice the wall at x = 3, no crossing of the x-axis, and the points (4, 2) and (5, 1).
    Show the steps and the answer
    1. Look for x-intercepts. There are none, so try the simplest top, with no x in it: only the number a.A factor such as (x − p) on the top would make the output 0 at p, and this graph never reaches height 0. A top that is only a number is the simplest choice that fits.
    2. The wall is at x = 3, so write (x − 3) on the bottom: f(x)=ax−3.(x − 3) is 0 when x = 3, since 3 − 3 = 0. A bottom of 0 is what makes the wall.
    3. Plug in the point (4, 2): 2=a4−3=a1=a.The point is on the graph, so its input 4 and output 2 must make the formula true. This step finds the one value of a that does it.
    4. Write the formula with a = 2: f(x)=2x−3.Every unknown is now filled in.
    Answer
    f(x)=2x−3
    Double-check Use the point that was not used. At x = 5: 25−3 = 22 = 1, and the graph passes through (5, 1). Also the top has degree 0 and the bottom has degree 1, so the horizontal asymptote is y = 0, as the graph shows.

    Rung 2 of 5

    One crossing, one wall, and a negative a

    The graph of a rational function has a vertical asymptote at x = 1, crosses the x-axis at (−3, 0), crosses the y-axis at (0, 6), and levels off at the horizontal asymptote y = −2. Write a formula. In plain words: build the fraction with this crossing and this wall that also passes through (0, 6).

    (−3, 0)(0, 6)−8−448−12−6612
    Notice the wall at x = 1, the crossing at (−3, 0), the point (0, 6) and the level line y = −2.
    Show the steps and the answer
    1. The x-intercept is at x=−3, so write (x+3) on the top.x − (−3) = x + 3, and −3 + 3 = 0, so this factor is 0 at the crossing.
    2. The wall is at x = 1, so write (x − 1) on the bottom: f(x)=a·x+3x−1.(x − 1) is 0 when x = 1, since 1 − 1 = 0.
    3. Plug in the point (0, 6): 6=a·0+30−1=a·3−1=−3a.The y-intercept is on the graph and off the x-axis, so it can find a. 3 divided by −1 is −3.
    4. Solve −3a = 6 by dividing both sides by −3: a=−2.6 ÷ (−3) = −2. A positive divided by a negative is negative. A negative a is allowed: it flips the graph over.
    5. Write the formula: f(x)=−2(x+3)x−1.Every piece is now known. Multiplied out, the top is −2x − 6.
    Answer
    f(x) = −2(x+3)x−1, which multiplies out to −2x−6x−1
    Double-check The top and 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. Also f(−3) = −2(0)−4 = 0, the crossing.

    Rung 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.

    Rung 4 of 5

    A hole in the graph

    The graph of a rational function has a vertical asymptote at x = 2, crosses the x-axis at (1, 0), has a hole (an open circle, also called a removable discontinuity) at (−1, 2), and passes through (3, 6). Write a formula. In plain words: build the fraction with this crossing, this wall and this gap that also passes through (3, 6).

    (1, 0)(3, 6)hole (−1, 2)−448−44812
    The open circle at (−1, 2) marks the one point the graph skips.
    Show the steps and the answer
    1. The x-intercept is at x=1, so write (x−1) on the top.1 − 1 = 0, so this factor makes the output 0 at the crossing.
    2. The wall is at x=2, so write (x−2) on the bottom.2 − 2 = 0, so this factor makes the bottom 0 at the wall.
    3. The hole is at x=−1, so write (x+1) on both the top and the bottom.A factor on both top and bottom cancels, here with no copy of it left in the bottom, so it leaves a hole at the input that makes it 0: −1 + 1 = 0.
    4. Put a in front: f(x)=a·(x−1)(x+1)(x−2)(x+1).The features fix the factors but not the number in front.
    5. Plug in the point (3, 6): 6=a·(3−1)(3+1)(3−2)(3+1)=a·(2)(4)(1)(4)=a·84=2a.Use a point that is not the hole and not on the x-axis. At the hole the uncanceled formula would read 0 over 0, which has no value.
    6. Solve 2a = 6 by dividing both sides by 2: a=3.6 ÷ 2 = 3.
    7. Write the formula: f(x)=3(x−1)(x+1)(x−2)(x+1). Keep (x+1) on both the top and the bottom, or cancel it and write x≠−1 beside the formula.If you cancel (x + 1) and write nothing more, the formula forgets the hole.
    Answer
    f(x)=3(x−1)(x+1)(x−2)(x+1)
    Double-check Use the height of the hole, which was not used. Cancel (x + 1) to get 3(x−1)x−2, then plug in x = −1: 3(−2)−3 = −6−3 = 2. The hole on the graph is at height 2.

    Rung 5 of 5

    Two walls and two crossings

    The graph of a rational function has vertical asymptotes at x = −2 and x = 3, and it goes opposite ways on the two sides of each wall. It crosses the x-axis at (−4, 0) and (1, 0), crosses the y-axis at (0, 2), passes through (−3, −2), and levels off at the horizontal asymptote y = 3. Write a formula. In plain words: build the fraction with both crossings and both walls that also passes through (0, 2).

    walls: x = −2 and x = 3

    crossings: (−4, 0) and (1, 0)

    y-intercept: (0, 2)

    another point: (−3, −2)

    levels off at y = 3

    −23crossingcrossing(−∞, −2) ∪ (−2, 3) ∪ (3, ∞)
    The open circles at −2 and 3 are the walls, and the ticks at −4 and 1 are the crossings.
    Show the steps and the answer
    1. The crossings are at x=−4 and x=1, so the top is (x+4)(x−1).x − (−4) = x + 4 is 0 at −4, and (x − 1) is 0 at 1. Each crossing needs its own factor.
    2. The walls are at x=−2 and x=3, so the bottom is (x+2)(x−3).x − (−2) = x + 2 is 0 at −2, and (x − 3) is 0 at 3. The graph goes opposite ways at each wall, so neither factor is squared.
    3. Put a in front: f(x)=a·(x+4)(x−1)(x+2)(x−3).There is no hole, so no factor is shared. The number in front is still unknown.
    4. Plug in the point (0, 2): 2=a·(0+4)(0−1)(0+2)(0−3)=a·(4)(−1)(2)(−3)=a·−4−6=a·23.A negative divided by a negative is positive, and 4 and 6 both divide by 2, so −4−6 = 23.
    5. Solve 23·a=2. Multiply both sides by 3 to get 2a=6, then divide both sides by 2: a=3.Multiplying by 3 clears the bottom of the fraction. Dividing by 2 leaves a alone.
    6. Write the formula: f(x)=3(x+4)(x−1)(x+2)(x−3).Every piece is now known. Multiplied out, the top is 3x2 + 9x − 12 and the bottom is x2 − x − 6.
    Answer
    f(x) = 3(x+4)(x−1)(x+2)(x−3), which multiplies out to 3x2+9x−12x2−x−6
    Double-check Two features were held back. Horizontal asymptote: the top and bottom both have degree 2 and the leading coefficients are 3 and 1, so y = 31 = 3, as on the graph. The point (−3, −2): 3(−3+4)(−3−1)(−3+2)(−3−3) = 3(1)(−4)(−1)(−6) = −126 = −2.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: A crossing at x = 1 gives (x + 1) on the top, and a wall at x = −2 gives (x − 2) on the bottom.
    (x + 1) is 0 at x = −1, not at 1. (x − 2) is 0 at x = 2, not at −2. The signs inside the factors are backwards.
    ✓ Instead: The factor is x minus the number. A crossing at 1 gives (x − 1). A wall at −2 gives x − (−2) = x + 2. Test each one: plugging the number in must give 0.
    ✗ Not this: Using the x-intercept (1, 0) to find a in f(x) = a · x−1x+2.
    Plugging in gives 0 = a · 03, which is 0 = 0. That is true for every a, so it tells you nothing.
    ✓ Instead: Use a point off the x-axis, such as the y-intercept (0, −1): −1 = a · −12, so a = 2.
    ✗ Not this: Putting the wall factor on the top and the crossing factor on the bottom: x+2x−1 for a wall at −2 and a crossing at 1.
    That fraction is 0 at x = −2 and has a bottom of 0 at x = 1. Its crossing and its wall have traded places.
    ✓ Instead: Crossings go on the top, walls go on the bottom: x−1x+2, then find a.
    ✗ Not this: Finding a by plugging the x of a hole into the uncanceled formula.
    At the hole both the top and the bottom are 0, so the formula reads 0 over 0, which has no value.
    ✓ Instead: Use a different point, or cancel the shared factor first and then plug in the hole to check its height.
    ✗ Not this: Canceling the shared factor in the final answer: writing 3(x−1)x−2 for a graph with a hole at x = −1.
    The canceled formula has an ordinary point at x = −1, so its graph has no hole.
    ✓ Instead: Keep the factor on both the top and the bottom: 3(x−1)(x+1)(x−2)(x+1).

    Tips and tricks

    • Memory device: crossings on top, walls below, holes on both, a out front.
    • Check every factor by plugging its number in. The factor must come out 0: for a wall at −2, (x + 2) gives −2 + 2 = 0.
    • The y-intercept is usually the most convenient point for finding a, because plugging in x = 0 leaves only the numbers inside the factors.
    • Compare degrees against the horizontal asymptote, counting each factor like (x − p) once for each power. An asymptote at y = 0 means a lower degree on the top than on the bottom, or a top that is the constant 0. An asymptote at another height means equal degrees, and with factors like (x − p), that height equals a. A slant asymptote means the top's degree is one more than the bottom's.
    • Hold one feature back. Build the formula from the crossings, the walls and one point, then test it on the horizontal asymptote or a second point.
    • A sketch can fit more than one formula. Start with the simplest candidate, the one with the fewest factors, and raise a power or add a factor with no real zero only when the graph calls for it.

    7 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.

    Flash cards

    Say the answer out loud, then flip.

    A graph has a hole (an open circle) at x = 5. Where does the factor (x − 5) go in the formula?
    On both the top and the bottom of the fraction. A hole puts the same piece in both places.
    The graph goes up on both sides of the vertical asymptote at x = 4. How do you write that bottom factor?
    Squared, as the simplest choice: (x − 4)2. When the graph goes the same way on both sides of the wall, the factor needs an even power, and 2 is the smallest.
    The crossing and the wall give f(x) = a · x−1x+2. The graph passes through (0, −1). What is a?
    • a = 2.
    • Plug in x = 0 and y = −1: a · −12 = −1, so a = 2.
    Why can the x-intercepts and vertical asymptotes not tell you the number a in front?
    Multiplying the fraction by a ≠ 0 moves no crossing and no wall, because a times 0 is still 0. It is like tasting a soup: the flavors name the ingredients, not how much of each. So they leave a open, and you need one more fact, such as a point off the x-axis.