#### xaktly | Algebra | Functions

Polynomial functions
{graphing}

This section focuses on sketching graphs of polynomial functions,

$$f(x) = Ax^n + Bx^{n-1} + \dots + Cx^2 + Dx + E$$

Learn the details on the polynomial functions page.

#### Practical advice on how to sketch the graphs of polynomial functions

In this section we'll focus on how to sketch the graph of any polynomial function, a really important skill. Anybody can plot a function on a computer, but you'll need to know what you're doing to see if the computer has done what you think you asked it to.

We'll outline a few key steps for graphing polynomials below.

At the end of this section is a brief bit about how calculus can help in sketching polynomial graphs. You don't need calculus at all to work through the examples before that section. When you learn calculus, you'll see that it can be very helpful in visualizing the shapes and figuring out the details of graphs of all kinds.

#### Why do I need to learn to graph functions by hand?

Well, nobody's really asking you to be able to plot an extremely accurate graph, point-by-point, by hand. That's one thing that computers are very good at, and ought to be used for. But everyone, from time-to-time, makes an input mistake when plotting a graph on a computer, and we need to be able to recognize when a mistake was made. The computer-plotted graph should be a nice refinement of the sketch you already have on paper or in your head.

### Steps for sketching polynomial graphs

1.

#### Find the roots if you can

Roots, or zeros, of a functions are the points where f(x) = 0. They are found by setting the function equal to zero and solving for x. Not all functions have real roots. Some have imaginary roots, which come in pairs of complex conjugates (a ± ib). Imaginary roots can't be graphed on a real plane, so they're not of much help in sketching a graph.

Remember that you have many methods of finding roots of polynomials at your disposal. You can freshen your memory here.

2.

#### Determine the behavior of the ends

The end behavior of a polynomial graph – what the function does as x → ±∞ – is determined by two things:

• The sign of the coefficient of the leading term, and
• whether the power of the leading term is even or odd.

We'll review that below.

3.

#### Find easy points

Often, there are points on the graph of a polynomial function that are just too easy not to calculate. One is the y-intercept, or f(0). These can help you get the details of a graph correct.

### Roots and turning points

#### Roots

The fundamental theorem of algebra tells us that

Every polynomial function of degree n has n complex roots. Some may be real, and any imaginary roots come in pairs of complex conjugates.

#### Turning points

Every polynomial function of degree n has at most n - 1 turning points. These are also points at which a local maximum or minimum exist, and where the slope of the curve changes from positive-to-negative or vice-versa. A cubic function, for example, may have two turning points, but it also may have none. Turning points can be "smeared out" in any polynomial.

The red cubic curve has two turning points and three real roots. The black curve has no turning points (the slope is positive over the whole domain) and one real root. We'd expect the other two roots to be a pair of complex conjugates, a ± ib.

### Single, double and triple roots

The fully-factored function

$$f(x) = x^3 (x - 2)(x + 4)^2 = 0$$

has three different kinds of roots (not all functions have all kinds; I just made this one up like that so we can look at them all). Let's look at them one at a time.

The x3 term is a triple root at x = 0. Think of it as x·x·x = 0, and that if either of the three x's are zero, then the whole function has a zero value. A triple root at x = 0 means that there is an inflection point there, a point where the curvature of the function changes between concave-upward and concave-downward. It's possible to have an inflection point not located at zero. The factor (x-3)2, for example, indicates an inflection point at x = 3.

The binomial (x + 4) is squared. This is a double root, which means that the graph of this function just touches the x-axis at x = -4. That point might be a minimum or a maximum. We'll figure that out from the end behavior and by plotting selected points later.

The binomial (x - 2) is a single root. The exponent of this binomial is one. The function graph passes through x = 2.

In the previous section we discussed several ways of finding the roots of polynomial functions. Make sure you're an expert at those.

### End behavior

When the independent variable increases in size in either direction ( ± ), the ends of a polynomial graph will eventially increase or decrease without bound (infinitely). In the previous section we showed that the end behavior depends on the sign of the leading coefficient and on the degree of the polynomial. The results are summarized in the table below.

End behavior is a clue about the shape of a polynomial graph that you just can't do without, so you should either memorize these possibilities or (better yet) understand where they come from.

The table below also shows that a polynomial function of degree n can have at most n - 1 points where it changes direction from down-going to up-going.

Here are examples of each of the kinds of end behavior.

### Example 1

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

We can easily factor f(x) by first removing a common factor (x) to get

$$f(x) = x(x^2 - x - 6),$$

and then recognizing that we can factor the quadratic by eye to get

$$f(x) = x(x - 3)(x + 2)$$

If we set that equal to zero, our roots are x = 0, x = 3 and x = -2. Notice that all three roots are single roots, so the function graph has to pass right through the x-axis at those points (and no others). This function doesn't have an inflection point on the x-axis (it may have one or more elsewhere, but we won't be able to find those until we can use calculus). And finally, f(x) doesn't have any points where it just touches the axis and "bounces off" – there are no double roots.

The end behavior is down on the left and up on the right, consistent with an odd-degree polynomial with a positive leading coefficient.

Finally, f(0) is easy to calculate, f(0) = 0. With this information, it's possible to sketch a graph of the function.

Start by sketching the axes, the roots and the y-intercept, then add the end behavior:

Finally, just complete the smooth curve the only way the evidence will allow you to do so. Often you'll find that there's no other way but one to complete the path of a function between two points, such as two roots. That's true on the left side (x < 0) of the graph in the next figure. The downward left-end behavior combined with the left and center roots forces the function to bump upward.

It takes a few tries to get the hang of this kind of curve sketching, but it will develop with practice. Notice that there's really no other option for the segment of f(x) between -2 and 0. The curve has to smoothly pass right through both points on the x-axis and go to -∞ on the left.

Likewise there are no other options, given the right-end behavior, for the part of f(x) between 0 and 3.

What we don't know from such a sketch is just exactly how high the maxima rise and how low the minima dive. That will be a job for calculus much later on, or for a computer.

Here is a plot of f(x) made with Mathematica. You can see that it has all of the essential features of our sketch, but that the details are filled in. Because we've already sketched the graph, we can be confident that the computer output is reliable.

### Example 2

Sketch the graph of   $f(x) = x^4 - 4x^3 - 5x^2 + 36x - 36.$

You could find the factorization of this function using the rational root theorem, and you'd get

$$f(x) = (x - 2)^2 (x + 3)(x - 3)$$

Notice that x = 2 is a double root, and x = ±3 are single roots. The ends of this function both go in the same direction because its degree is even, and that direction is upward because the coefficient of the leading term, x4, is positive.

The y-intercept is easy to find from the original form of the function; it's -36. That's enough information to sketch the function. Here it is in one sketch with some explanations, but the process goes like this: Draw in the roots, then the end behavior. Note that the root at x = 2 is one where the function just bounces off the axis. The rest is relatively easy. Except for the fine detail, there's only one way to draw it.

Below is a version of that function plotted with Mathematica. You can see that all of the essential features of our sketch were correct; we just have to blow up the region in green to see the other 3 roots (1 double, 1 single). Graphs are often like this. You should become very accustomed to rescaling – changing the "window" on your calculator, for example – to see features that are relatively small compared to the rest.

### Example 3

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

The key to sketching a function like this quickly is seeing that it's just the parent function of all cubic functions, y = x3, shifted to the right by 2 units and inverted across the x-axis.

Never forget how function transformations affect any function. They work the same way every time, and knowing how they affect a known function will really help you visualize the transformed function.

For these kinds of graphs, I like to lightly sketch in the parent function, then apply the transformations one at a time. Here is y = x3 and y = (x - 2)3. Here is the parent function (black) shifted two units to the right:

... and here is the final transformation, superimposed upon the other graphs. The -1 on the outside of the function "flips" or reflects it across the x-axis.

The message here is an important one: We don't always need to find roots, intercepts, etc. If we can identify the function as just a series of transformations of some parent function that we know, the graph is pretty easy to visualize. Just take it in steps.

The root at x = 2 is a triple-root, which, for a polynomial function, indicates a an inflection point, a point where the curvature of the graph changes from concave-upward to the left of x = 2 to concave-downward on the right. Polynomial graphs are full of inflection points, but not all are indicated by triple roots. Calculus will help you find those.

### Practice problems

Sketch graphs of these polynomial functions. Peek at the solutions if you need a hint, then compare your graph to a computer-generated graph of the function.

 1 $f(x) = 2x^3 - 8x^2 - 10x$ Solution First divide everything by 2x (the GCF) and find the roots by factoring (because we can): \begin{align} 2x(x^2 -4x + 5) &= 0 \\[5pt] 2x(x - 5)(x + 1) &= 0 \\[5pt] x &= -1, \, 0, \, 5 \end{align} This is a cubic function with a positive leading coefficient, so the ends will look like ↙   ↗ We've already found the y-intercept, f(0), because it's a root, so no extra information there. That should still be enough to sketch the graph. The information we've got about this graph doesn't tell us about the precise locations of the local maximum and minimum (both starred) of this graph, so don't worry about getting those exactly right in your sketch. 2 $f(x) = x^3 - 3x^2 - 28x$ Solution First divide everything by x (the GCF) and find the roots by factoring (because we can): \begin{align} x(x^2 - 3x - 28) &= 0 \\[5pt] x(x - 7)(x + 4) &= 0 \\[5pt] x &= -4, \, 0, \, 7 \end{align} This is a cubic function with a positive leading coefficient, so the ends will look like ↙   ↗ We've already found the y-intercept, f(0), because it's a root, so no extra information there. That should still be enough to sketch the graph. The information we've got about this graph doesn't tell us about the precise (*) locations of the local maximum and minimum of this graph, so don't worry about getting those exactly right in your sketch. Calculus helps with that, by the way. 3 $f(x) = x^3 + x^2 - 10x - 10$ Solution We can find the roots of this function by grouping the first two and last two terms, like this: \begin{align} x^3 + x^2 - 10x - 10 &= 0 \\[5pt] x^2(x + 1) - 10(x + 1) &= 0 \\[5pt] (x + 1)(x^2 - 10) &= 0 \\[5pt] x &= -1, \, ±\sqrt{10} \end{align} The y-intercept is $f(0) = -10.$ The end behavior is ↙   ↗, which puts us in good position to sketch the graph. Here again, you don't have any information about te precise locations of the maxima and minima ("extrema"), but you can still get a pretty good idea of how the graph will look. 4 $f(x) = x^3 + 5x^2 - x - 5$ Solution We can find the roots of this function by grouping the first and third, and second and fourth terms, like this: \begin{align} x^3 + 5x^2 - x - 5 &= 0 \\[5pt] x(x^2 - 1) + 5(x^2 - 1) &= 0 \\[5pt] (x^2 - 1)(x + 5) &= 0 \\[5pt] x &= ±1, \, -5 \end{align} The y-intercept is $f(0) = -5.$ The end behavior is ↙   ↗, which is enough information to sketch the graph. 5 $f(x) = x^3 + x^2 - 14x - 24$   (given that -4 is a root) Solution Given that 4 is a root, we can use synthetic substitution to partially factor the polynomial. We'll set it equal to zero to find the roots: \begin{align} (x - 4)(x^2 + 5x + 6) &= 0 \\[5pt] (x - 4)(x + 2)(x + 3) &= 0 \\[5pt] x &= -3, -2, 4 \end{align} The y-intercept is y = -24 and the end behavior is ↙   ↗. 6 $f(x) = 2x^3 + 14x^2 - 4x - 28$ Solution This function can be factored by grouping like this: \begin{align} 2x^3 + 14x^2 - 4x - 28 &= 0 \\[5pt] 2x(x^2 - 2) + 14(x^2 - 2) &= 0 \\[5pt] (x^2 - 2)(2x + 14) &= 0 \\[5pt] x &= ±\sqrt{2}, \, -7 \end{align} The y-intercept is y = -28, and the end behavior is ↙   ↗. 7 $f(x) = 2x^4 - 8x^2 + 8$ Solution This function has the form of a quadratic, so we can solve it by factoring like this: \begin{align} 2x^4 - 8x^2 + 8 &= 0 \\[5pt] 2(x^4 - 4x^2 + 4) &= 0 \\[5pt] 2(x^2 - 2)(x^2 - 2) &= 0 \\[5pt] x &= ± \sqrt{2} \end{align} There are two double roots here, x = ± 1.414, so we expect to the graph to "bounce" off of the x-axis at those points. The y-intercept is y = 8, and the end behavior of this quartic function with a positive leading coefficient is ↖   ↗. The graph looks like this: 8 $f(x) = 3x^4 - 34x^2 + 63$ Solution This function has the form of a quadratic, so we can solve it by factoring like this: \begin{align} 3x^4 - 34x^2 + 63 &= 0 \\[5pt] (3x^2 - 7)(x^2 - 9) &= 0 \\[5pt] x &= ± \sqrt{\frac{7}{2}}, ±3 \\[5pt] \sqrt{\frac{7}{2}} &\approx ±1.87 \end{align} The y-intercept is y = 63, and the end behavior of this quartic function with a positive leading coefficient is ↖   ↗. 9 $f(x) = -x^4 + 20x^2 - 64$ Solution This function has the form of a quadratic, so we can solve it by factoring like this: \begin{align} -x^4 + 20x^2 - 64 &= 0 \\[5pt] -(x^4 - 20x^2 + 64) &= 0 \\[5pt] -(x^2 - 16)(x^2 - 4) &= 0 \\[5pt] x &= ± 4, \, ± 2 \end{align} The y-intercept is y = -64, and the end behavior of this quartic function with a negative leading coefficient is ↙   ↘. 10 $f(x) = x^4 - 4x^3 - 7x^2 + 34x - 24$   (given that x = 1 and x = 2 are roots.) Solution Using our two known roots, we can partially factor, then completely factor the function: So far the function can be replaced by $$f(x) = (x - 1)(x^3 - 3x^2 - 10x + 24)$$ Now the function is \begin{align} (x - 1)(x - 2)(x^2 - x - 12) &= 0 \\[5pt] (x - 1)(x - 2)(x - 4)(x + 3) &= 0 \\[5pt] x = 1, 2, 4, &-3 \end{align} The y-intercept is y = 24, and the end behavior is ↖   ↗. Here is the graph.

### Where calculus can help

The derivative is the slope of a curve. That slope has a value of zero at maxima and minima of a function, where the slope changes from positive to negative, or vice-versa, so we can find the derivative, set it equal to zero and solve for locations of maxima and minima. This can be very handy in situations where we can't find rational roots or where there are no (or relatively few) real roots. Here's an example of a function without rational roots:

$$f(x) = x^3 - 4x^2 + 14x - 24$$

This is a difficult function to graph because we don't know the roots, but we can find the derivative:

$$f'(x) = 3x^2 - 8x + 14$$

Setting this quadratic function to zero and completing the square gives us these roots:

$$x = \frac{8 ± i \sqrt{26}}{3}$$

Now both of these roots are imaginary, which means our graph has no maxima or minima. That might be boring, but it is good information to have. We can go further by setting the second derivative equal to zero and finding potential inflection points:

$$f''(x) = 6x - 8 = 0 \\[5pt] x = \frac{4}{3}$$

So there is an inflection point at $x = \frac{4}{3}.$ The function value there is about y = -10, and the y-intercept is y = -24, so we can make a quick sketch of this cubic function like this:

So especially when we have scant information about a function otherwise, calculus can be a big help in visualizing a function graph.

xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012-2019, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.