UK Secondary (7-11)
topic badge
Graphing Cubic Functions
Lesson

 

Graphing the cubic equation $y=ax^3+bx^2+cx+d$y=ax3+bx2+cx+d is somewhat harder than graphing quadratic equation $y=ax^2+bx+c$y=ax2+bx+c or the linear equation $y=mx+b$y=mx+b. This is to be expected, because the more coefficients a polynomial function has, the more complexity is possible.

There are however certain cubic functions that can be restructured into specific forms that consequently makes the task of sketching a lot easier. But before we do so, it's important to understand a few general features of any cubic function to keep in mind.

General behaviour observations

Firstly, a cubic equation always has its centre point on the vertical line $x=-\frac{b}{3a}$x=b3a. This is a calculus result, and the way it is derived need not concern us here. However, the centre point will always be a point of inflection, which is where the curve changes its concavity - from a hill shape to a valley shape or vice-versa. Thus when the quadratic term $bx^2$bx2 is not present in the cubic, the inflection point is on the $y$y-axis.

Secondly, a cubic equation must cross the $x$x-axis, because the range of the function includes all real numbers. The point that it crosses can be very difficult to find - indeed it took some exceptional thinking by some 16th century Italian mathematicians to find a method to determine the intercepts of the general cubic function. We also know that a cubic function can have at most three $x$x-intercepts.

Thirdly, like any polynomial function, we know that the curve intersects the $y$y-axis at $x=d$x=d, the constant term of the general cubic.

Fourthly, we know that a cubic function either possesses two local extrema points (a local maximum and a local minimum) a horizontal inflection at the centre point, or an inflection that's not horizontal at the centre point.

Fifthly, we know that if the coefficient of $x^3$x3 is negative, then the cubic, notwithstanding any local extrema, is falling with a negative gradient from top left to bottom right. If the coefficient of $x^3$x3 is positive, the curve is generally rising with positive gradient from bottom left to top right.

Specific forms to consider

The graph of a cubic can be easily made by plotting techniques, either by using widely available graphing technology, or simply calculating a few values either side of its central point. For example, the cubic function $y=2x^3+5$y=2x3+5 has no quadratic term, and so we know that its central point lies on the $y$y-axis. Thus we could construct a table of values like this:

$x$x $-2$2 $-1$1 $0$0 $1$1 $2$2
$y$y $-11$11 $3$3 $5$5 $7$7 $13$13

Plotting these 5 points will reveal something of the cubic shape - a rising curve with a horizontal inflection at $\left(0,5\right)$(0,5)

However a good sketch requires more understanding of form and behaviour, so we will look carefully at a few common forms.

Translated horizontal inflection form

As previously discussed the translated horizontal inflection form is given by $y=a\left(x-h\right)^3+k$y=a(xh)3+k. We know that:

  • The centre point is at $\left(h,k\right)$(h,k)
  • The curve is monotonically non-decreasing (this means that the gradient of the curve never becomes negative) when $a>0$a>0 and monotonically non-increasing when $a<0$a<0.
  • The rate of increase (or decrease) in $y$y will depend on the absolute size of the coefficient $a$a.

The $x$x- and $y$y-intercepts (only one of each) can be found by putting $y=0$y=0 and $x=0$x=0 respectively into the equation. These intercepts, along with the point of inflection, gives us at most three points. 

In general however, a polynomial of degree $n$n is uniquely identified by $n+1$n+1 distinct points. This is because in $y=ax^3+bx^2+cx+d$y=ax3+bx2+cx+d, there are four unknowns to pin down, and this is going to take four simultaneous equations created by four point substitutions. So you could determine another $y$y-value for some chosen value of $x$x to get the fourth point. 

As an example, to sketch $y=2\left(x-3\right)^3-2$y=2(x3)32, we note that the curve has a rising horizontal inflection at the central point $\left(3,-2\right)$(3,2).

The curve's $y$y-intercept is given by $y=2\left(0-3\right)^3-2=-56$y=2(03)32=56 and its $x$x-intercept is found by solving $2\left(x-3\right)^3-2=0$2(x3)32=0. Here, $\left(x-3\right)^3=1$(x3)3=1 and so $\left(x-3\right)=1$(x3)=1 and $x=4$x=4

A fourth point might be found by choosing $x=5$x=5 so that $y$y is easily found by substitution as $y=14$y=14.

Using the applet below, graph the function $y=2\left(x-3\right)^3-2$y=2(x3)32 and check the position of the inflection, and the $x$x intercept. 

Factored forms of the cubic

When $y=ax^3+bx^2+cx+d$y=ax3+bx2+cx+d can be completely factored over the reals, it will take on one of the following forms:

Factorised form zeros Central axis y - intercept
$y=a\left(x-r\right)\left(x-s\right)\left(x-t\right)$y=a(xr)(xs)(xt) $r,s,t$r,s,t $x=\frac{r+s+t}{3}$x=r+s+t3 $y=-arst$y=arst
$y=a\left(x-r\right)\left(x-s\right)^2$y=a(xr)(xs)2 $r,s,s$r,s,s $x=\frac{r+2s}{3}$x=r+2s3 $y=-ars^2$y=ars2

Remarkably, the central inflection point lies on the vertical line given by the average of the three zeros. The $y$y-intercept is given by the negative of the product of its three zeros multiplied by the enlargement factor $a$a

As an example, the cubic function $y=2\left(x-1\right)\left(x+1\right)\left(x-3\right)$y=2(x1)(x+1)(x3) has the $x$x-intercepts of $x=1,-1$x=1,1 and $3$3, and a $y$y-intercept of $2\times\left(1\right)\times\left(-1\right)\times\left(3\right)=-6$2×(1)×(1)×(3)=6.

The inflection lies on the vertical line $x=\frac{1+-1+3}{3}=1$x=1+1+33=1, and so by substitution, the inflection point is the point $\left(1,0\right)$(1,0), coincidentally at the middle zero. 

Use the factored form applet to verify the sketch of this example.

Finding factored forms

In certain cases, it is possible to factorise the function $y=ax^3+bx^2+cx+d$y=ax3+bx2+cx+d using the factor theorem. If we consider the associated polynomial $P\left(x\right)=ax^3+bx^2+cx+d$P(x)=ax3+bx2+cx+d and find that, for some number $r$r$P\left(r\right)=0$P(r)=0, then the function can be rewritten as $y=\left(x-r\right)\times Q\left(x\right)$y=(xr)×Q(x) where $Q\left(x\right)$Q(x) is a quadratic factor.

We could then check whether $Q\left(x\right)$Q(x) breaks into two linear factors. If it does, we have the three zeros of the cubic function. If it doesn't break up (in other words it is irreducible because the discriminant is negative), then we know that there is only only zero of the cubic.

As a quick example consider $y=2x^3-14x+12$y=2x314x+12. First note that the quadratic term is missing, so the inflection lies at $x=0$x=0 and thus is located at $\left(0,12\right)$(0,12).

Also note that $P\left(1\right)=2-14+12=0$P(1)=214+12=0 and so $\left(x-1\right)$(x1) is a factor. By division, we see that $y=\left(x-1\right)\left(2x^2+2x-12\right)$y=(x1)(2x2+2x12) and thus factorising completely we reveal that $y=2\left(x-1\right)\left(x+3\right)\left(x-2\right)$y=2(x1)(x+3)(x2)

So the average of the three zeros $1,-3,2$1,3,2 is zero as expected, and with the $y$y-intercept as $12$12, its is a straightforward task to complete the sketch. Use the factored cubic applet to verify your answer. 

 

Applet using factorised form

Worked examples

Question 1

Consider the cubic function $y=x^3$y=x3

  1. Complete the following table of values.

    $x$x $-2$2 $-1$1 $0$0 $1$1 $2$2
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Plot the points in the table of values. (Note: Do not plot the curve yet).

    Loading Graph...

  3. Hence plot the curve.

    Loading Graph...

Question 2

By considering the graph of $y=x^3$y=x3, determine the following:

Loading Graph...

  1. As $x$x becomes larger in the positive direction (ie $x$x approaches infinity), what happens to the corresponding $y$y-values?

    they approach zero

    A

    they become very large in the positive direction

    B

    they become very large in the negative direction

    C

    they approach zero

    A

    they become very large in the positive direction

    B

    they become very large in the negative direction

    C
  2. As $x$x becomes larger in the negative direction (ie $x$x approaches negative infinity), what happens to the corresponding $y$y-values?

    they become very large in the positive direction

    A

    they approach zero

    B

    they become very large in the negative direction

    C

    they become very large in the positive direction

    A

    they approach zero

    B

    they become very large in the negative direction

    C

Question 3

Consider the function $y=\left(x-2\right)^3$y=(x2)3.

  1. Complete the following table of values.

    $x$x $0$0 $1$1 $2$2 $3$3 $4$4
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Sketch a graph of the function.

    Loading Graph...

  3. What transformation of the graph $y=x^3$y=x3 results in the graph of $y=\left(x-2\right)^3$y=(x2)3?