math.wiki
Functions › Polynomial functions › Graphing polynomial functions
Open on the map
Algebra 2 · A.APR.B.3 · F.IF.C.7C

Graphing polynomial functions

You know where a polynomial crosses the axis, where it only touches, and which way its two ends point. How do those pieces fit together into one picture of the whole graph, and how much of that picture can you trust?

Where you are 6 in Polynomial functions

When you reach for it

You reach for this when you need the shape of a polynomial graph without plotting dozens of points: to see where a quantity is positive, roughly where it peaks, or whether a picture on a screen is believable. Every piece comes from an earlier lesson. The behavior at each zero is Zeros and multiplicity, the ends and the count of turns are Degree, end behavior and the shape of a polynomial graph, and the intercepts are Intercepts and zeros of a function. A sketch puts those pieces into one picture and adds a few computed points to set the heights.

The lesson runs over two days. Part 1 sketches polynomials given in factored form. Part 2 starts from an expanded rule, factors it first, and handles factors that have no real zeros.

The procedure

Part 1: from factored form

The zeros. A product is zero exactly when one factor is (Solving quadratics by factoring), so each linear factor gives a zero. Its multiplicity says what the graph does there: an odd one crosses, an even one touches and turns back, and a multiplicity of 3 or more lies flat as it meets the axis.

The ends. Expanding the factors would multiply their leading terms, and nothing else reaches the highest power. So the leading term of -2(x + 1)^3(x - 3) is -2 \cdot x^3 \cdot x = -2x^4 with no expanding at all, and the leading term decides the end behavior.

The y-intercept is f(0), the product of the factors’ constant parts.

A sign chart. A polynomial graph has no breaks (Continuous graphs, jumps and holes), so it cannot change sign without passing through a zero. The zeros cut the number line into intervals, and on each interval the sign is fixed. Find it from the sign of each factor, or from one value inside the interval. The sign flips at a zero of odd multiplicity and not at one of even multiplicity, which matches crossing and touching and makes a useful check.

Test points. The sign chart says above or below; a value or two inside each interval says how far.

Peaks and valleys. Between two neighboring zeros the graph leaves the axis and comes back, so it turns at least once: a peak if it is above the axis there, a valley if below. A zero where the graph touches is itself a peak or valley sitting on the axis. These are the relative maximums and minimums of the function. A polynomial of degree n has at most n - 1 of them, so once the sketch has found n - 1, there is no room for any other.

What a sketch cannot show. The zeros, the intercept, the signs and the ends are exact. The peaks and valleys between zeros are not: test points bracket them but do not say exactly where they are or how high. Pinning them down takes calculus (Maxima, minima and critical points), or, for a few special forms, completing the square (Example 5). And when the count found is below n - 1, a sketch alone cannot rule out a small extra peak and valley (Example 6). So a careful sketch marks the exact points and draws the turns as estimates.

Part 2: factoring first

An expanded rule hides its zeros, so factor it completely first (Factoring completely and choosing a strategy). Take out any common factor such as x or x^2. A quartic with only x^4, x^2 and constant terms is a quadratic in x^2. Four terms may group (Factoring by grouping). When one zero c is known, divide by x - c (The remainder and factor theorems, Synthetic division); finding a first zero when none is given is the The rational root theorem.

A factor with no real zeros. A quadratic factor with a negative discriminant (The discriminant) is never zero, so it has one sign for every x: x^2 + 1 \geq 1, for instance. Such a factor adds no zero, no crossing and nothing to the sign chart. It still counts toward the degree and the leading term, and it multiplies every height by a number that changes with x, so it stretches the graph, moves its peaks and valleys, and can add bends of its own.

Worked examples

Examples 1 to 3 go with Part 1, and Examples 4 to 7 with Part 2.

Example 1

A complete sketch from factored form

Sketch the graph of f(x) = x(x - 2)^2(x + 3).

Solution

Zeros. 0 and -3 are simple, so the graph crosses there at a slant. 2 is a double zero, so the graph touches and turns back.

Ends. The leading term is x \cdot x^2 \cdot x = x^4: even degree, positive coefficient, so both ends rise.

y-intercept. f(0) = 0: the graph passes through the origin, which is also a zero.

Signs. Take the sign of each factor on each interval.

x < -3-3 < x < 00 < x < 2x > 2
x--++
(x - 2)^2++++
x + 3-+++
f(x)+-++

The sign flips at -3 and 0 and not at 2, as the multiplicities say.

Heights. f(-2) = (-2)(16)(1) = -32, f(-1) = (-1)(9)(2) = -18, f(1) = (1)(1)(4) = 4 and f(3) = (3)(1)(6) = 18.

Together. From the top left the graph comes down and crosses at -3, dips to a valley in -3 < x < 0 at least 32 deep, climbs through the origin to a peak in 0 < x < 2, comes down to touch the axis at (2, 0), and rises off to the top right. Valley, peak, valley: three turns, which is n - 1 for degree 4, so there are no others.

What the sketch does not say. Calculus puts the valley at exactly (-2, -32) and the peak at x = 0.75, with f(0.75) \approx 4.39, a little higher than f(1) = 4. The sketch placed both only roughly, which is all it can do.

−3 −2 −1 1 2 3 −40 −20 20 40 x y
Figure 1Example 1. The dots are the zeros and the test points; the curve between them is a sketch’s best guess, which a graphing tool confirms.
Example 2

A negative leading coefficient and a flat crossing

Sketch the graph of g(x) = -2(x + 1)^3(x - 3).

Solution

The zeros are -1, of multiplicity 3, where the graph crosses lying flat, and 3, simple. The leading term is -2x^4, so both ends fall. The y-intercept is g(0) = -2(1)(-3) = 6.

Signs: (x + 1)^3 is negative, positive, positive on the three intervals and x - 3 is negative, negative, positive, so their product is +, -, +, and the factor -2 turns that into -, +, -. The graph is below the axis for x < -1, above it for -1 < x < 3, and below for x > 3. Near -1, g(x) \approx -2(-4)(x + 1)^3 = 8(x + 1)^3: it crosses going up.

Heights: g(1) = -2(8)(-2) = 32, g(2) = -2(27)(-1) = 54 and g(4) = -2(125)(1) = -250, so the right end falls fast.

There is one peak, in -1 < x < 3, near x = 2. The flat crossing at -1 is not a turn: the graph rises on both sides and only levels for an instant. So the graph turns once, though degree 4 would allow three; calculus confirms the only turning point is (2, 54).

−2 −1 1 2 3 −40 20 40 x y
Figure 2Example 2. The flat crossing at -1 is not a turning point; the graph keeps rising through it.
Example 3

Counting peaks and valleys

List the peaks and valleys of p(x) = \tfrac{1}{4}(x + 3)(x + 1)^2(x - 2)^2, and say which of them a sketch knows exactly.

Solution

The degree is 1 + 2 + 2 = 5 and the leading term is \tfrac{1}{4}x^5, so the graph falls to the left and rises to the right. The zero -3 is simple; -1 and 2 are double. The y-intercept is p(0) = \tfrac{1}{4}(3)(1)(4) = 3.

The two squares are never negative, so the sign of p is the sign of x + 3: negative for x < -3, positive for x > -3 apart from the zeros at -1 and 2. The graph crosses going up at -3, then touches the axis from above at -1 and at 2.

Between -3 and -1 the graph is above the axis and comes back to it: a peak. At (-1, 0) it touches: a valley. Between -1 and 2: another peak. At (2, 0): another valley. That is four turns, n - 1 for degree 5, so there are no more.

The two valleys are exact, because they are zeros. The peaks are only bracketed: p(-2) = \tfrac{1}{4}(1)(1)(16) = 4 and p(1) = \tfrac{1}{4}(4)(4)(1) = 4, so each peak is at least 4 high, but where each one sits needs calculus.

Example 4

Taking out a common factor

Sketch the graph of h(x) = x^3 - x^2 - 6x.

Solution

Every term contains x, so h(x) = x(x^2 - x - 6). Two numbers with product -6 and sum -1 are -3 and 2, so

h(x) = x(x - 3)(x + 2).

The zeros -2, 0 and 3 are all simple. The leading term is x^3, so the graph falls to the left and rises to the right, and h(0) = 0.

For x > 3 every factor is positive. Each simple zero flips the sign, so moving left the signs are + on x > 3, - on 0 < x < 3, + on -2 < x < 0 and - on x < -2.

Heights: h(-1) = -1 - 1 + 6 = 4, h(1) = 1 - 1 - 6 = -6 and h(2) = 8 - 4 - 12 = -8. The graph rises from the bottom left through -2, peaks in -2 < x < 0 at about 4, comes down through the origin to a valley in 0 < x < 3 at least 8 deep, and rises through 3. Two turns, the most a cubic can have.

Check. Multiplying out x(x - 3)(x + 2) gives back x^3 - x^2 - 6x.

Example 5

A quartic that is a quadratic in disguise

Sketch k(x) = x^4 - 20x^2 + 64 and find its peaks and valleys exactly.

Solution

Only even powers appear, so put u = x^2: u^2 - 20u + 64 = (u - 4)(u - 16), since 4 \cdot 16 = 64 and 4 + 16 = 20. Then

\begin{aligned} k(x) &= (x^2 - 4)(x^2 - 16) \\ &= (x - 2)(x + 2)(x - 4)(x + 4). \end{aligned}

The four zeros \pm 2 and \pm 4 are simple. The leading term is x^4, so both ends rise, and k(0) = 64. From the right each simple zero flips the sign: +, -, +, -, +. Since k(-x) = k(x), the graph is its own mirror image across the y-axis (Symmetry about the vertical axis and the origin).

This rule has a special form that pins the turns down. Completing the square in u,

k(x) = (x^2 - 10)^2 - 36.

A square is never negative, so k(x) \geq -36, with equality when x^2 = 10: the valleys are \displaystyle (\pm\sqrt{10}, -36), at x \approx \pm 3.16. For -2 < x < 2, x^2 - 10 lies between -10 and -6, and its square is largest when x = 0: the peak is (0, 64). Three turns, n - 1.

Check. k(3) = 81 - 180 + 64 = -35, just above the valley height -36.

Example 6

A factor with no real zeros

Sketch the graph of m(x) = x^3 - 2x^2 + x - 2.

Solution

Group the terms in pairs: x^2(x - 2) + 1(x - 2) = (x^2 + 1)(x - 2). Since x^2 + 1 \geq 1, the only real zero is 2, and it is simple. The leading term is x^3, so the graph falls to the left and rises to the right, and m(0) = (1)(-2) = -2. The factor x^2 + 1 is positive, so m has the sign of x - 2: negative for x < 2, positive for x > 2.

So far this is the line y = x - 2 bent into a cubic. Test points show more: m(-1) = (2)(-3) = -6, m(0) = -2, m(1) = (2)(-1) = -2 and m(3) = (10)(1) = 10. Since m(0) = m(1), the graph cannot only rise between 0 and 1: it must turn there. And m(0.5) = (1.25)(-1.5) = -1.875 is higher than both, so it goes up to a small peak and comes back down; since m(3) = 10, it must turn again, at a valley, before it climbs. Calculus puts the peak at x = \tfrac{1}{3}, with m\left(\tfrac{1}{3}\right) = -\tfrac{50}{27} \approx -1.85, and the valley at (1, -2).

The factor x^2 + 1 added no crossing, but its bending gave the graph two turns that x - 2 alone does not have. They are less than 0.15 apart in height, too small to see at the usual scale.

−1 1 2 3 −6 4 8 x y whole graph 0.5 1 −1.9 −1.8 x close-up
Figure 3Example 6. In the close-up the horizontal line is y = -2 and the vertical scale is about fifty times larger. The peak and valley are less than 0.15 apart in height.
Example 7

Mieszko’s nursery

Mieszko runs a tree nursery. If he grows x thousand saplings in a season, his profit in thousands of dollars is

P(x) = -x^3 + 5x^2 + 8x - 12

for 0 \leq x \leq 7. He knows he breaks even, P = 0, at 1 thousand saplings. (a) Factor P. (b) For which x does he make a profit? (c) Sketch P and estimate the best number to grow.

Solution

(a) Since P(1) = -1 + 5 + 8 - 12 = 0, x - 1 is a factor by the The remainder and factor theorems. Synthetic division of -1, 5, 8, -12 by 1 gives -1, 4, 12 with remainder 0, so

\begin{aligned} P(x) &= (x - 1)(-x^2 + 4x + 12) \\ &= -(x - 1)(x - 6)(x + 2). \end{aligned}

(b) The zeros are 1, 6 and -2, and -2 is outside the domain. P(0) = -(-1)(-6)(2) = -12: growing nothing loses 12 thousand dollars. The simple zeros flip the sign, so on the domain P is negative for 0 \leq x < 1, positive for 1 < x < 6 and negative for 6 < x \leq 7. He makes a profit when he grows between 1 thousand and 6 thousand saplings.

(c) P(3) = -(2)(-3)(5) = 30, P(4) = -(3)(-2)(6) = 36, P(5) = -(4)(-1)(7) = 28 and P(7) = -(6)(1)(9) = -54. The one peak lies in 1 < x < 6, and the highest test value is at 4, so the best is near 4 thousand saplings, for a profit of about 36 thousand dollars. The sketch cannot promise the peak is exactly at 4; calculus confirms that it is. Only the graph over 0 \leq x \leq 7 means anything here.

1 2 3 4 5 6 7 −40 −20 20 40 x P
Figure 4Example 7, drawn only over the domain 0 \leq x \leq 7.

Boundaries

Real, complete factors. Zeros are read from linear factors, so every quadratic factor needs a look: x^2 - 9 hides two zeros and x^2 + 9 has none. A quadratic factor with a negative discriminant has the sign of its leading coefficient for every x.

Rules that do not factor nicely. When no rational zero exists the real zeros are irrational, or there are none. A sketch can still trap a zero: if f(a) and f(b) have opposite signs, the unbroken graph must cross between a and b.

Turns are estimates. A peak or valley is exact only when it is a touching zero or the rule has a special form, as in Example 5. When the turns found number fewer than n - 1, extra ones may hide in pairs, as in Example 6.

A model’s domain. In context only the part of the graph over the domain has meaning, as in Example 7.

Where this goes next

Building a polynomial from its zeros runs the sketch backwards, from a graph to its rule, and Modeling with polynomial functions fits such rules to data, where the sign chart says when a quantity is positive. The sign chart alone solves Polynomial and rational inequalities with sign charts. The The fundamental theorem of algebra counts the complex zeros that a factor such as x^2 + 1 holds, and calculus finds peaks and valleys exactly (Maxima, minima and critical points).

Exercises

Part 1: sketching from factored form

For each rule, give the zeros and what the graph does at each, the end behavior, the y-intercept, the sign on each interval, and the peaks and valleys.

  1. f(x) = (x - 5)(x + 1)^2
  2. g(x) = -x^2(x + 2)(x - 3)
  3. h(x) = -(x - 2)^3(x + 1)
  4. q(x) = \tfrac{1}{2}(x + 3)(x + 1)(x - 2)(x - 4)
  5. Without expanding, give the degree, the end behavior and the y-intercept of r(x) = -3(x - 1)^2(x + 2)^3(x - 4), and what its graph does at each zero.

Part 1: test points and turns

  1. For f(x) = x(x - 4)(x + 2), find f(1), f(2) and f(3). What do they say about the valley between 0 and 4?
  2. Explain why the graph of p(x) = (x + 2)(x - 1)(x - 5) has exactly two turning points, and say which interval each lies in.

Part 1: matching graphs

−3 −1 1 2 x y A −3 −1 1 2 x y B −3 −1 1 2 x y C
Figure 5The graphs for exercises 8 to 10. Tick marks are one unit apart.

Each graph belongs to one of these rules, and one rule is left over. Match each graph to its rule and give one reason.

  • (i) y = \tfrac{1}{4}(x + 3)(x + 1)(x - 2)^2
  • (ii) y = -\tfrac{1}{4}(x + 3)(x + 1)(x - 2)^2
  • (iii) y = \tfrac{1}{4}(x + 3)(x + 1)^2(x - 2)
  • (iv) y = -\tfrac{1}{2}(x + 3)(x + 1)(x - 2)
  1. Graph A
  2. Graph B
  3. Graph C

Part 2: factor first

Factor completely, then give the zeros and what the graph does at each, the ends, the y-intercept, the signs, and the peaks and valleys.

  1. x^3 + x^2 - 12x
  2. x^4 - 2x^3 - 8x^2
  3. x^4 - 26x^2 + 25. Also write it as (x^2 - 13)^2 - 144 and find its valleys exactly.
  4. x^4 + 3x^2 - 4
  5. x^3 + 3x^2 + 4x + 12
  6. x^3 - 8x^2 + 9x + 18, given that 3 is a zero.

Part 2: in context

  1. Tamsyn’s nursery makes a profit of P(x) = -x^3 + 9x^2 - 15x - 25 thousand dollars from x thousand saplings, for 0 \leq x \leq 8, and P(5) = 0. Factor P, find P(0), and say whether any number of saplings gives her a profit.
  2. The temperature in Vesper’s seedling tunnel, in degrees Celsius, t hours after 8 p.m. is T(t) = -\tfrac{1}{20}(t - 2)(t - 9)(t - 14) for 0 \leq t \leq 12. Find T(0), find when the tunnel is below freezing, and use T(4), T(5) and T(6) to estimate the coldest time.

Reasoning

  1. Explain why a factor x^2 + 4 can never change the sign of a polynomial. Name two things about the graph it can change, and one it cannot.
  2. Explain why a polynomial graph must have a peak or a valley strictly between any two neighboring zeros.
  3. Orvar says y = (x - 1)^2 and y = (x^2 + 1)(x - 1)^2 have the same graph, since the extra factor adds no zeros. Compare their values at x = 0, x = 2 and x = -1, and say what is the same and what differs.
  4. Przemek says every polynomial of degree 4 has a graph with three turning points. Give a counterexample from these exercises and explain what the degree really says.
Answers
  1. -1 is double: touches. 5 is simple: crosses. Leading term x^3: falls left, rises right. f(0) = -5. Negative for x < 5 except f(-1) = 0; positive for x > 5. A peak on the axis at (-1, 0) and a valley in -1 < x < 5: f(2) = -27, f(3) = -32.
  2. 0 is double: touches. -2 and 3 are simple: cross. Leading term -x^4: both ends fall. g(0) = 0. Signs -, +, +, - on x < -2, -2 < x < 0, 0 < x < 3, x > 3. A peak in -2 < x < 0 (g(-1) = 4), a valley on the axis at (0, 0), a peak in 0 < x < 3 (g(2) = 16).
  3. 2 is triple: crosses, lying flat. -1 is simple. Leading term -x^4: both ends fall. h(0) = 8. Negative for x < -1, positive on -1 < x < 2, negative for x > 2. One peak in -1 < x < 2: h(0) = 8, h(1) = 2. The flat crossing is not a turn.
  4. Four simple zeros -3, -1, 2, 4: all cross. Leading term \tfrac{1}{2}x^4: both ends rise. q(0) = 12. Signs +, -, +, -, +. A valley in -3 < x < -1 (q(-2) = -12), a peak in -1 < x < 2, a valley in 2 < x < 4 (q(3) = -12).
  5. Degree 2 + 3 + 1 = 6, leading term -3x^6: both ends fall. r(0) = -3(1)(8)(-4) = 96. Touches at 1, crosses lying flat at -2, crosses at a slant at 4.
  6. f(1) = -9, f(2) = -16, f(3) = -15. Since f(2) is below both neighbors, the graph comes down and goes back up within 1 < x < 3: the valley lies there, at or below -16.
  7. The zeros -2, 1, 5 are simple. Between neighboring zeros the graph must turn: a peak in -2 < x < 1, since p(0) = 10 > 0, and a valley in 1 < x < 5. A cubic has at most 3 - 1 = 2 turns, so these are all.
  8. (i). Crosses at -3 and -1, touches at 2, both ends rise; the y-intercept is \tfrac{1}{4}(3)(1)(4) = 3. Rule (ii) has the same zeros but both ends fall.
  9. (iii). Touches at -1 and crosses at -3 and 2; the y-intercept is \tfrac{1}{4}(3)(1)(-2) = -1.5.
  10. (iv). Three crossings, high at the left end and low at the right: odd degree, negative leading coefficient. The y-intercept is -\tfrac{1}{2}(3)(1)(-2) = 3.
  11. x(x + 4)(x - 3). Simple zeros -4, 0, 3. Falls left, rises right; y-intercept 0. Signs -, +, -, +. A peak in -4 < x < 0 (f(-2) = 20), a valley in 0 < x < 3 (f(2) = -12).
  12. x^2(x - 4)(x + 2). Crosses at -2 and 4, touches at 0. Both ends rise; y-intercept 0. Signs +, -, -, +. A valley in -2 < x < 0 (g(-1) = -5), a peak on the axis at (0, 0), a valley in 0 < x < 4 (g(2) = -32).
  13. (x^2 - 1)(x^2 - 25), which is (x - 1)(x + 1)(x - 5)(x + 5), four simple zeros. Both ends rise; y-intercept 25; signs +, -, +, -, +; symmetric about the y-axis. Since (x^2 - 13)^2 - 144 \geq -144, with equality when x^2 = 13, the valleys are \displaystyle (\pm\sqrt{13}, -144), at x \approx \pm 3.61. The peak is (0, 25).
  14. (x^2 + 4)(x^2 - 1), which is (x^2 + 4)(x - 1)(x + 1). Real zeros \pm 1 only, both crossing. Both ends rise; y-intercept -4; signs +, -, +. Since x^4 + 3x^2 grows as x moves away from 0, the only turn is the valley (0, -4).
  15. x^2(x + 3) + 4(x + 3) = (x + 3)(x^2 + 4). One real zero, -3, crossing. Falls left, rises right; y-intercept 12. Negative for x < -3, positive for x > -3. No turns: the test b^2 - 3ac = 9 - 12 = -3 < 0 from Cubic, quartic and higher degree functions.
  16. Synthetic division of 1, -8, 9, 18 by 3 gives 1, -5, -6 with remainder 0, so the rule is (x - 3)(x^2 - 5x - 6), which is (x - 3)(x - 6)(x + 1). Simple zeros -1, 3, 6. Falls left, rises right; y-intercept 18; signs -, +, -, +. A peak in -1 < x < 3, a valley in 3 < x < 6 (q(5) = -12).
  17. Synthetic division of -1, 9, -15, -25 by 5 gives -1, 4, 5 with remainder 0, so P(x) = -(x - 5)(x^2 - 4x - 5), which is -(x - 5)^2(x + 1). P(0) = -25: a loss of 25 thousand dollars. On the domain (x - 5)^2 \geq 0 and x + 1 > 0, so P(x) \leq 0, zero only at the double zero 5. No profit is possible; the best she can do is break even at exactly 5 thousand saplings.
  18. T(0) = 12.6 degrees. The zeros 2 and 9 are simple (14 is outside the domain). Positive for t < 2, negative for 2 < t < 9, positive for 9 < t \leq 12: below freezing from 10 p.m. to 5 a.m. T(4) = -5, T(5) = -5.4, T(6) = -4.8, so the coldest time is between 4 and 6 hours after 8 p.m., around 1 a.m., at least 5.4 degrees below zero.
  19. x^2 + 4 \geq 4 for every real x, so it is always positive and multiplying by it keeps every sign. It raises the degree by 2 and multiplies each height by at least 4, more far from 0: the graph steepens and its peaks and valleys move, and it may gain turns. It cannot change the zeros, the sign chart, or the ends, since it adds an even degree with a positive coefficient.
  20. Between two neighboring zeros the graph is never zero and has no breaks, so it stays on one side of the axis. It starts and ends at height 0, so it must go out and come back, and its farthest point from the axis in between is a peak or a valley.
  21. At 0 both are 1; at 2 they are 1 and 5; at -1 they are 4 and 8. Both touch the axis at 1 from above, are never negative, and rise at both ends. But the second has degree 4 and climbs much more steeply away from 1: not the same graph.
  22. x^4 + 3x^2 - 4 (exercise 14) has degree 4 and one turning point, its valley at (0, -4). The degree gives at most n - 1 = 3 turns, not exactly 3; a quartic has one or three.
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0