# 5.7 Introduction to Graphing Polynomials

## Learning Objectives

By the end of this section, you will be able to:

• Graph a basic polynomial function of the form $f(x)=ax^2+k$.
• Graph a basic polynomial function of the form $f(x)=ax^3+k$.

In this section, we will focus on graphing simple polynomial functions by identifying some important characteristics and creating a table of values. Polynomial functions can be represented graphically in the rectangular coordinate system, and these graphical representations can allow us to learn about the function visually and better understand the relationship between the variables. Polynomial functions can undergo many transformations to their form, but in this section, we will focus on vertical reflections and translations only.

Please note that the figures created for this section were created using the desmos graphing calculator. Feel free to use this calculator in your studies to better understand the graph of functions.

Let’s examine the general shape of a graph of a general quadratic function $f(x)=ax^2$. The graph of a quadratic equation is called a parabola.

In the figure below (Figure 5.7.1), we see the graphs of the functions $f(x)=x^2$ and $f(x)=-x^2$. Notice that the only difference between these two equations is the sign in front of the $x^2$. This shows us that the sign of the leading coefficient, $a$, determines the direction of opening of a parabola. If the leading coefficient of a quadratic function is positive, $a>0$, the parabola will open upwards, whereas if the leading coefficient of a quadratic function is negative, $a<0$, the parabola will open downwards.

### Quadratic Equations Direction of Opening

For a function of the form $f(x)=ax^2$,

if $a>0$, the parabola opens upwards.

if $a<0$, the parabola opens downwards.

Another important characteristic of a parabola is its vertex. Here, we see that the vertex is the origin $(0,0)$ regardless of the leading coefficient. In this case, the vertex is also the $y$-intercept. When graphing any function, it is always important to find the value of the $y$-intercept to use this point in the graphing process. To find the $y$-intercept of a function, set the $x$-value to zero and evaluate for $y$.

Let’s examine a couple more graphs of quadratic functions.

This time, the figure below shows $f(x)=x^2$, $f(x)=2x^2$ and $f(x)=\frac{1}{2}x^2$ all in the same Cartesian plane for comparison purposes.

Graphically, we can see that when the leading coefficient is $2$, the parabola is stretched vertically, whereas when the leading coefficient is $\frac{1}{2}$, the parabola has been compressed vertically. This allows us to learn about the nature of a graph of a parabola when the leading coefficient is a value other than $1$. In fact, the absolute value of $a$ dictates the vertical stretch or compression of the graph of a quadratic equation.

### Quadratic Equations Vertical Stretch or Compression

For a function of the form $f(x)=ax^2$,

if $|a|>1$, the function is stretched by a factor of $a$.

if $|a|<1$, the function is compressed by a factor of $a$.

Another way to observe the effects of vertical stretches and compressions is in the table of values associated with a particular function. For example, let’s compare the table of values for the functions $f(x)=x^2$ and $f(x)=2x^2$. You will see that the $y$-values of the graph of $f(x)=2x^2$ have been multiplied by $2$ and these values are reflected in Figure 5.7.2.

$x$ $f(x)=x^2$
$-2$ $4$
$-1$ $1$
$0$ $0$
$1$ $1$
$2$ $4$
$x$ $f(x)=2x^2$
$-2$ $8$
$-1$ $2$
$0$ $0$
$1$ $2$
$2$ $8$

Finally, let’s examine what happens when we add a vertical translation of $k$ to the quadratic equation. In the figure below (Figure 5.7.3), we see graphs of the equations $f(x)=x^2$, $f(x)=x^2+2$, and $f(x)=x^2-2$.

Graphically, we can see that a vertical translation either moves the parabola up by $k$ units or down by $|k|$ units.

Once again, we can also see these transformations within the table of values associated with the given functions. Below, we compare $f(x)=x^2$ to $f(x)=x^2-2$. We see that the $y$-values have all been reduced by $2$. It is also important to notice that the $y$-intercept (vertex) was also shifted down by $2$ units.

$x$ $f(x)=x^2$
$-2$ $4$
$-1$ $1$
$0$ $0$
$1$ $1$
$2$ $4$
$x$ $f(x)=x^2-2$
$-2$ $2$
$-1$ $-1$
$0$ $-2$
$1$ $-1$
$2$ $2$

For a function of the form $f(x)=ax^2+k$,

if $k>0$, the function is translated up by $k$ units.

if $k<0$, the function is translated down by $|k|$ units.

### HOW TO

#### Graph a polynomial function of the form $f(x)=ax^2+k$.

1. Find the direction of opening by observing the sign of $a$.
2. Find the $y$-intercept, which is also the vertex, by setting $x=0$ and evaluating for $y$.
3. Make a table of values for $-2\le x\le 2$.
4. Plot the vertex and the ordered pairs from the table of values.
5. Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.
6. Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

### Example 5.7.1

Graph the function $f(x)=-x^2+5$.

Solution

Step 1: Note that the leading coefficient $a=-1$. This means that the parabola will open downwards.

Step 2: The $y$-intercept can be found by setting $x=0$, and evaluating for the value of the function.

$\begin{eqnarray*}f(x)&=&-x^2+5\\f(0)&=&-(0)^2+5\\f(0)&=&5\end{eqnarray*}$

Therefore, the $y$-intercept is the point $(0,5)$

Step 3: Make a table of values for $-2\le x\le 2$.

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

Step 4: Plot the vertex and the ordered pairs from the table of values.

Step 5: Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.

Step 6: Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

### Example 5.7.2

Graph the function $f(x)=2x^2-4$.

Solution

Step 1: Note that the leading coefficient $a=2$. This means that the parabola will open downwards.

Step 2: The $y$-intercept can be found by setting $x=0$, and evaluating for the value of the function.

$\begin{eqnarray*}f(x)&=&2x^2-4\\f(0)&=&2(0)^2-4\\f(0)&=&-4\end{eqnarray*}$

Therefore, the $y$-intercept is the point $(0,-4)$

Step 3: Make a table of values for $-2\le x\le 2$.

$x$ $f(x)=2x^2-4$
$-2$ $4$
$-1$ $-2$
$0$ $-4$
$1$ $-2$
$2$ $4$

Step 4: Plot the vertex and the ordered pairs from the table of values.

Step 5: Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.

Step 6: Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

### Try It

1) Graph the function $f(x)=-3x^2+6$.

Solution

2) Graph the function $f(x)=x^2-10$.

Solution

## Graphs of Cubic Equations

A cubic equation is one that contains a cubed variable term. In this section, we will focus on the graphs of cubic equations of the form $f(x)=ax^3+k$. It is important to note that cubic equations can have graphs that do not have this general shape, but we restrict our focus to cubic equations whose graphs have not undergone any further transformations other than vertical reflections and translations. We will see that changing the leading coefficient and the value of $k$ will affect the graphs of cubic equations in the same (or similar) way as those transformations affected the graphs of quadratic equations.

Let’s begin by comparing the graphs of the equations $f(x)=x^3$ and $f(x)=-x^3$.

As we can see above, the only difference between the two graphs is their orientation, and the only difference between the equations is the sign of the leading coefficient, $a$. When $a$ is positive ($a>0$), the graph increases initially and for all of the values of $x$. Contrarily, when $a$ is negative ($a<0$), the graph decreases initially and for all of the values of $x$. It is important to note that some cubic functions do have intervals of both increase and decrease, but since we are only studying cubic equations of the form $f(x)=ax^3+k$, we will not investigate that case.

### Cubic Equations Direction of Increase or Decrease

For cubic equations of the form $f(x)=ax^3+k$,

If $a>0$, the function is increasing for all values of $x$.

If $a<0$, the function is decreasing for all values of $x$.

We can also make note that the $y$-intercept of these graphs is the origin, $(0,0)$. In the case of cubic equations of this particular form, the $y$-intercept is also the point of inflection. An inflection point is a point where a curve changes its concavity.

Next, we’ll examine the graphs $f(x)=2x^3$ and $f(x)=\frac{1}{2}x^3$, alongside $f(x)=x^3$ for comparison. The figure below shows that cubic equations can undergo vertical stretches and compressions in the same way that quadratic equations could.

### Cubic Equations Vertical Stretch and Compression

For a function of the form $f(x)=ax^3$,

if $|a|>1$, the function is stretched by a factor of $a$.

if $|a|<1$, the function is compressed by a factor of $a$.

What do we think would happen if we added a vertical translation to the equation? What might that look like? As was the case with quadratic equations, the graphs of cubic equations behave in the same way when they undergo vertical translations. The following figure show the graphs of $f(x)=x^3$, $f(x)=x^3+2$ and $f(x)=x^3-2$.

### Cubic Equations Vertical Translation

For a function of the form $f(x)=ax^3+k$,

if $k>0$, the function is translated up by $k$ units.

if $k<0$, the function is translated down by $|k|$ units.

If we were to make a table of values for the cubic equations $f(x)=x^3$ and $f(x)=x^3-3$, we would see that the $y$-values have been reduced by $3$.

$x$ $f(x)=x^3$
$-2$ $-8$
$-1$ $-1$
$0$ $0$
$1$ $1$
$2$ $8$
$x$ $f(x)=x^3-3$
$-2$ $-11$
$-1$ $-4$
$0$ $-3$
$1$ $-2$
$2$ $5$

### Try It

3) Make a table of values for the functions $f(x)=x^3$ and $f(x)=x^3+7$ for $-2\le x\le 2$. What transformation has occurred?

Solution

A translation of seven units upwards.

$x$ $f(x)=x^3$
$-2$ $-8$
$-1$ $-1$
$0$ $0$
$1$ $1$
$2$ $8$
$x$ $f(x)=x^3+7$
$-2$ $-1$
$-1$ $6$
$0$ $7$
$1$ $8$
$2$ $15$

### HOW TO

#### Graph a polynomial function of the form $f(x)=ax^3+k$.

1. Find the direction of the curve by observing the sign of $a$.
2. Find the $y$-intercept, which is also the inflection point, by setting $x=0$ and evaluating for $y$.
3. Make a table of values for $-2\le x\le 2$.
4. Plot the $y$-intercept and the ordered pairs from the table of values.
5. Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.
6. Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant direction, and original equations labelled).

### Example 5.7.3

Graph the function $f(x)=-x^3+2$.

Solution

Step 1: Note that the leading coefficient $a=-1$. This means that the graph of the cubic will be decreasing.

Step 2: The $y$-intercept can be found by setting $x=0$, and evaluating for the value of the function.

$\begin{eqnarray*}f(x)&=&-x^3+2\\f(0)&=&-(0)^3+2\\f(0)&=&2\end{eqnarray*}$

Therefore, the $y$-intercept is the point $(0,2)$

Step 3: Make a table of values for $-2\le x\le 2$.

$x$ $f(x)=-x^3+2$
$-2$ $10$
$-1$ $3$
$0$ $2$
$1$ $1$
$2$ $-6$

Step 4: Plot the $y$-intercept and the ordered pairs from the table of values.

Step 5: Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.

Step 6: Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

### Example 5.7.4

Graph the function $f(x)=3x^3-10$.

Solution

Step 1: Note that the leading coefficient $a=3$. This means that the graph of the cubic will be increasing.

Step 2: The $y$-intercept can be found by setting $x=0$, and evaluating for the value of the function.

$\begin{eqnarray*}f(x)&=&3x^3-10\\f(0)&=&3(0)^3-10\\f(0)&=&-10\end{eqnarray*}$

Therefore, the $y$-intercept is the point $(0,2)$

Step 3: Make a table of values for $-2\le x\le 2$.

$x$ $f(x)=-x^3+2$
$-2$ $-34$
$-1$ $-13$
$0$ $-10$
$1$ $-7$
$2$ $14$

Step 4: Plot the $y$-intercept and the ordered pairs from the table of values.

Step 5: Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.

Step 6: Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

### Try It

4) Graph the function $f(x)=-2x^3+1$.

Solution

5) Graph the function $f(x)=x^3-4$.

Solution

### Key Concepts

1) Quadratic Equations Direction of Opening

For a function of the form $f(x)=ax^2$,

if $a>0$, the parabola opens upwards;

if $a<0$, the parabola opens downwards.

2) Quadratic Equations Vertical Stretch or Compression

For a function of the form $f(x)=ax^2$,

if $|a|>1$, the function is stretched by a factor of $a$.

if $|a|<1$, the function is compressed by a factor of $a$.

For a function of the form $f(x)=ax^2+k$,

if $k>0$, the function is translated up by $k$ units.

if $k<0$, the function is translated down by $|k|$ units.

4) How To Graph a polynomial function of the form $f(x)=ax^2+k$.

1. Find the direction of opening by observing the sign of $a$.
2. Find the $y$-intercept, which is also the vertex, by setting $x=0$ and evaluating for $y$.
3. Make a table of values for $-2\le x\le 2$.
4. Plot the vertex and the ordered pairs from the table of values.
5. Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.
6. Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant, and original equations labelled).

5) Cubic Equations Direction of Increase or Decrease

For cubic equations of the form $f(x)=ax^3+k$,

If $a>0$, the function is increasing for all values of $x$.

If $a<0$, the function is decreasing for all values of $x$.

6) Cubic Equations Vertical Stretch and Compression

For a function of the form $f(x)=ax^3$,

if $|a|>1$, the function is stretched by a factor of $a$.

if $|a|<1$, the function is compressed by a factor of $a$.

7) Cubic Equations Vertical Translation

For a function of the form $f(x)=ax^3+k$,

if $k>0$, the function is translated up by $k$ units.

if $k<0$, the function is translated down by $|k|$ units.

8) How To Graph a polynomial function of the form $f(x)=ax^3+k$.

1. Find the direction of the curve by observing the sign of $a$.
2. Find the $y$-intercept, which is also the inflection point, by setting $x=0$ and evaluating for $y$.
3. Make a table of values for $-2\le x\le 2$.
4. Plot the $y$-intercept and the ordered pairs from the table of values.
5. Join the points by a curve. Be sure to make the curve smooth with no sharp edges or points.
6. Remember the rules of good graphing (label axes, arrows on ends of axes and curves, at least $3$ scale markings in each relevant direction, and original equations labelled).

### Self Check

After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

Overall, after looking at the checklist, do you think you are well-prepared for the next section? Why or why not?