Functions and algebra: Investigate and use instantaneous rate of change of a variable when interpreting models both in mathematical and real life situations

# Unit 5: Sketch cubic functions

Natashia Bearam-Edmunds

### Unit outcomes

By the end of this unit you will be able to:

• Determine the shape of a cubic function.
• Determine the x and y intercepts.
• Find the turning points of the graph.
• Find the maximum and minimum values of the graph.
• Find the point of inflection and discuss concavity using second derivatives.

## What you should know

Before you start this unit, make sure you can:

• Find the derivative by using the rules of differentiation.
• Sketch and interpret information from graphs of functions. Revise level 3 subject outcome 2.1 for a refresher on functions.

## Introduction

We have worked with cubic polynomials in this subject outcome. Cubic functions are of the form $\scriptsize y=a{{x}^{3}}+b{{x}^{2}}+cx+d$. The highest power or degree of a cubic function is three. This also tells us that the graph will have at most three x-intercepts.

There are two general shapes for cubic functions depending on the value of $\scriptsize a$ the co-efficient of $\scriptsize {{x}^{3}}$.

When $\scriptsize a \gt 0$, the graph starts out concave down (sad $\scriptsize \cap$) and ends up concave up (happy $\scriptsize \cup$).

When $\scriptsize a \lt 0$ the graph starts out concave up (happy) and ends up concave down (sad).

## Sketching a cubic function

To sketch a cubic function you need the:

• shape
• x- intercepts
• y-intercept
• turning points.

To find the x-intercepts:

1. let $\scriptsize \displaystyle y=0$
2. factorise by using the factor theorem
3. solve.

To find the y-intercept:

1. let $\scriptsize \displaystyle x=0$ and solve for $\scriptsize \displaystyle y$.

### Example 5.1

Find the x and y-intercepts of $\scriptsize f(x)=-{{x}^{3}}+4{{x}^{2}}+x-4$.

Solution

To find the y-intercept let $\scriptsize x=0$ and solve for $\scriptsize y$.

\scriptsize \begin{align*}f(0)&=-{{(0)}^{3}}+4{{(0)}^{2}}+(0)-4\\&=-4\end{align*}

The coordinates of the y-intercept are$\scriptsize (0;-4)$.

To find the x-intercepts you will need to use the factor theorem since we must factorise a cubic expression.

$\scriptsize f(x)=-{{x}^{3}}+4{{x}^{2}}+x-4$

We use trial and error to find factors of $\scriptsize f(x)$. Remember that a factor will leave no remainder when it divides into an expression.

\scriptsize \begin{align*}f(1)&=-{{(1)}^{3}}+4{{(1)}^{2}}+(1)-4\\&=0\end{align*}

$\scriptsize x=1$ leaves no remainder so one factor of the expression is $\scriptsize (x-1)$.

Factorise further by inspection (or other methods as shown in level 4 subject outcome 2.1).

\scriptsize \begin{align*}f(x)&=-{{x}^{3}}+4{{x}^{2}}+x-4\\&=-({{x}^{3}}-4{{x}^{2}}-x+4)\\&=-(x-1)({{x}^{2}}-3x-4)\\&=-(x-1)(x-4)(x+1)\end{align*}

To find the x-intercepts let $\scriptsize f(x)=0$ and solve for $\scriptsize x$.

\scriptsize \displaystyle \begin{align*}0&=-(x-1)(x-4)(x+1)\\x&=1,\text{ }x=4\text{ or }x=-1\end{align*}

The coordinates of the x-intercepts are $\scriptsize \displaystyle (-1;0),\text{ }(1;0)\text{ and }(4;0)$ .

### Exercise 5.1

Determine the x and y-intercepts of the following functions:

1. $\scriptsize f(x)=-{{x}^{3}}-5{{x}^{2}}+9x+45$
2. $\scriptsize y={{x}^{3}}+3{{x}^{2}}-10x$
3. $\scriptsize y=2{{x}^{3}}-32x$

The full solutions are at the end of the unit.

### Stationary points

The turning points of a graph are called the stationary points. A cubic graph will have at most two turning points. At the stationary points a tangent drawn to graph will have gradient of zero, therefore the gradient of the graph is zero and the derivative also will be zero. You can think of a stationary point as a point where the function stops increasing or decreasing.

There are three types of stationary points; local maximum (maxima), local minimum (minima) and horizontal points of inflection.

Local maxima or minima are called relative minimum and maximum values, as there are other points on the graph with lower and higher function values.

The gradient of the function changes on either side of local maxima or minima values as shown in figure 3. The function changes from decreasing to increasing at the local minima and changes from increasing to decreasing at the local maxima.

The gradient on either side of a horizontal point of inflection stays constant as shown in figure 4. The graph is increasing on either side of the point of inflection.

To determine the coordinates of the stationary point(s) of $\scriptsize \displaystyle f\left( x \right)$:

1. Find the derivative.
2. Let $\scriptsize {f}'(x)=0$ and solve for the x-coordinate(s) of the stationary point(s).
3. Substitute value(s) of $\scriptsize \displaystyle x$ into $\scriptsize \displaystyle f\left( x \right)$ to calculate the y-coordinate(s) of the stationary point(s).

### Example 5.2

Calculate the stationary point(s) of the graph $\scriptsize f(x)=-{{x}^{3}}+4{{x}^{2}}+3x-4$.

Solution

Step 1: Determine the derivative of $\scriptsize \displaystyle f\left( x \right)$.

$\scriptsize {f}'(x)=-3{{x}^{2}}+8x+3$

Step 2: Let $\scriptsize \displaystyle {f}'\left( x \right)=0$ and solve for the x-values of the turning point(s).

\scriptsize \displaystyle \begin{align*}-3{{x}^{2}}+8x+3&=0\\3{{x}^{2}}-8x-3&=0\\(3x+1)(x-3)&=0\\x&=-\displaystyle \frac{1}{3}\text{ and }x=3\end{align*}

Step 3: Substitute the x-values into $\scriptsize \displaystyle f\left( x \right)$ to calculate the corresponding y-coordinates of the stationary points.

\scriptsize \displaystyle \begin{align*}f(-\displaystyle \frac{1}{3})&=-{{(-\displaystyle \frac{1}{3})}^{3}}+4{{(-\displaystyle \frac{1}{3})}^{2}}+3(-\displaystyle \frac{1}{3})-4\\&=-\displaystyle \frac{{122}}{{27}}\\\\f(3)&=-{{(3)}^{3}}+4{{(3)}^{2}}+3(3)-4\\&=14\end{align*}

Step 4: Write the final answer.

The stationary points are $\scriptsize \displaystyle (-\displaystyle \frac{1}{3}\text{;-}\displaystyle \frac{{122}}{{27}}\text{) and (3;14)}$.

### Exercise 5.2

Find the turning points of the following functions:

1. $\scriptsize f(x)=-{{x}^{3}}-3{{x}^{2}}+9x-10$
2. $\scriptsize y={{x}^{3}}+3{{x}^{2}}-10x$
3. $\scriptsize y=2{{x}^{3}}-54x+40$

The full solutions are at the end of the unit.

Now, we are ready to sketch a cubic function.

General method for sketching cubic graphs:

1. Use the sign of $\scriptsize a$ to determine the general shape of the graph.
2. Determine the y-intercept by letting $\scriptsize x=0$.
3. Determine the x-intercepts by letting $\scriptsize y=0$ and solving for $\scriptsize x$.
4. Find the x-coordinates of the turning points by letting $\scriptsize {f}'(x)=0$ and solving for $\scriptsize x$.
5. Determine the y-coordinates of the turning points by substituting their x-values into $\scriptsize f(x)$.
6. Plot the points and join as a smooth curve.

### Example 5.3

Sketch the graph $\scriptsize f(x)=-{{x}^{3}}-3{{x}^{2}}+9x+27$.

Solution

Step 1: Determine the shape of the graph.

The coefficient of the $\scriptsize {{x}^{3}}$ term is less than zero, therefore the graph will have the following shape:

Step 2: Determine the intercepts.

To find the y-intercept let $\scriptsize x=0$ and solve for $\scriptsize y$.

\scriptsize \begin{align*}f(0)&=-{{x}^{3}}-3{{x}^{2}}+9x+27\\&=27\end{align*}

y-intercept: $\scriptsize (0;27)$

Find the x-intercepts by letting $\scriptsize f(x)=0$ and solving for $\scriptsize x$:

\scriptsize \begin{align*}-{{x}^{3}}-3{{x}^{2}}+9x+27&=0\\{{x}^{3}}+3{{x}^{2}}-9x-27&=0\\(x+3)({{x}^{2}}-9)&=0\\(x+3)(x+3)(x-3)&=0\\x&=-3\text{ or }x=3\end{align*}

x-intercepts: $\scriptsize (-3;0)$and $\scriptsize (3;0)$

Step 3: Calculate the stationary/turning points.

\scriptsize \begin{align*}{f}'(x)&=-3{{x}^{2}}-6x+9\\-3{{x}^{2}}-6x+9&=0\\{{x}^{2}}+2x-3&=0\\(x+3)(x-1)&=0\\x&=-3,\text{ }x=1\\f(-3)&=-{{(-3)}^{3}}-3{{(-3)}^{2}}+9(-3)+27\\&=0\\f(1)&=-{{(1)}^{3}}-3{{(1)}^{2}}+9(1)+27\\&=32\end{align*}

Turning points: $\scriptsize (-3;0)\text{ }$ and $\scriptsize (1;32)$

Step 4: Draw a neat sketch (not necessarily drawn to scale).

Show all key points on the graph.

### Exercise 5.3

1. Given $\scriptsize f(x)={{x}^{3}}+{{x}^{2}}-5x+3$:
1. Show that $\scriptsize (x-1)$ is a factor of $\scriptsize f(x)$ and hence find the x-intercepts.
2. Determine the y-intercept and turning points.
3. Sketch the graph.
2. Sketch the graph of $\scriptsize f(x)=-{{x}^{3}}+4{{x}^{2}}+11x-30$. Show all the turning points and intercepts with the axes.

The full solutions are at the end of the unit.

### Second derivative and concavity

A change in the sign of the second derivative shows that there is a change in the direction of the gradient of the original function. To find the second derivative of a function you take the derivative of the first derivative.

The second derivative tells us about the concavity of a graph. Concavity relates to the rate of change of a function’s derivative. Concavity indicates whether the gradient of a curve is increasing, decreasing or constant.

### Take note!

If $\scriptsize {{f}'}'(x) \lt 0$, the graph is concave down and there is a local maximum. Tangent lines drawn to the graph lie above the graph. The gradient of the curve decreases as $\scriptsize x$ increases.

If $\scriptsize {{f}'}'(x) \gt 0$, the graph is concave up and there is a local minimum. Tangent lines lie below the graph. The gradient of the curve increases as $\scriptsize x$ increases.

If $\scriptsize {{f}'}'(x)=0$, the graph may have a point of inflection. If $\scriptsize {{f}'}'(x)$ changes sign from one side of the point of inflection to the other, the concavity changes. For a cubic function, the graph will have a point of inflection when $\scriptsize {{f}'}'(x)=0$.

Figure 5 shows how the concavity tells us about the shape of a graph.

Concave down: $\scriptsize {{f}'}'(x) \lt 0$.

Concave up: $\scriptsize {{f}'}'(x) \gt 0$.

Point of inflection: $\scriptsize {{f}'}'(x)=0$ and changes sign at this point.

### Exercise 5.4

Determine if the following graphs have a local maximum, minimum or point of inflection at the given points, by finding the second derivative:

1. $\scriptsize f(x)=-{{x}^{3}}-3{{x}^{2}}+9x-10$at $\scriptsize x=1$
2. $\scriptsize y={{x}^{3}}+3{{x}^{2}}-10x$at $\scriptsize x=-1$
3. $\scriptsize y=2{{x}^{3}}-54x+40$at $\scriptsize x=3$

The full solutions are at the end of the unit.

## Summary

In this unit you have learnt the following:

• How to identify the shape of a cubic function.
• How to find the x and y-intercepts of a cubic function.
• How to find the stationary points.
• How to find the point of inflection of a cubic function.
• How to test concavity.
• How to sketch a cubic function.

# Unit 5: Assessment

#### Suggested time to complete: 45 minutes

1. Given $\scriptsize g(x)={{x}^{3}}-2{{x}^{2}}-3x+6$:
1. Determine the intercepts with the axes.
2. Find the stationary points.
3. Calculate the point of inflection.
4. Sketch the graph.
2. Answer the following questions for $\scriptsize f(x)={{(x-2)}^{3}}$:
1. Determine the concavity of the graph.
2. Find the inflection point.
3. Sketch the graph.

The full solutions are at the end of the unit.

# Unit 5: Solutions

### Exercise 5.1

1. .
$\scriptsize f(x)=-{{x}^{3}}-5{{x}^{2}}+9x+45$
\scriptsize \begin{align*}f(3)&=0\\\therefore &(x-3)\text{ is a factor}\end{align*}
\scriptsize \begin{align*}f(x)&=-({{x}^{3}}+5{{x}^{2}}-9x-45)\\&=-(x-3)({{x}^{2}}+8x+15)\\&=-(x-3)(x+3)(x+5)\end{align*}
Find the x-intercepts:
\scriptsize \displaystyle \begin{align*}&-(x-3)(x+3)(x+5)=0\\&\therefore x=3,\text{ }-3\text{ or }-5\\&\text{x-intercepts :}\\&(-5;0),\text{ }(-3;0)\text{ and }(3;0)\text{ }\end{align*}
y-intercept: $\scriptsize (0;45)$.
2. .
\scriptsize \begin{align*}y&={{x}^{3}}+3{{x}^{2}}-10x\\&=x({{x}^{2}}+3x-10)\\&=x(x+5)(x-2)\\&\text{x-intercepts}:\\&(0;0),(2;0)\text{ and }(-5;0)\end{align*}
y-intercept: $\scriptsize (0;0)$.
3. .
\scriptsize \displaystyle \begin{align*}y&=2{{x}^{3}}-32x\\&=2x({{x}^{2}}-16)\\&=2x(x-4)(x+4)\\&\text{x-intercepts:}\\&(0;0),(-4;0)\text{ and }(4;0)\end{align*}
y-intercept: $\scriptsize (0;0)$.

Back to Exercise 5.1

### Exercise 5.2

1. .
\scriptsize \begin{align*}{f}'(x)&=-3{{x}^{2}}-6x+9\\-3{{x}^{2}}-6x+9&=0\\{{x}^{2}}+2x-3&=0\\(x+3)(x-1)&=0\\x&=-3,\text{ }x=1\\f(-3)&=-{{(-3)}^{3}}-3{{(-3)}^{2}}+9(-3)-10\\&=-37\\f(1)&=-{{(1)}^{3}}-3{{(1)}^{2}}+9(1)-10\\&=-5\\\text{Turning points: }&(-3;-37)\text{ and }(1;-5)\end{align*}
2. .
\scriptsize \displaystyle \begin{align*}{y}' &=3{{x}^{2}}+6x-10\\3{{x}^{2}}+6x-10&=0\\x&=\displaystyle \frac{{-b\pm \sqrt{{{{b}^{2}}-4ac}}}}{{2a}}\\&=\displaystyle \frac{{-6\pm \sqrt{{{{{(6)}}^{2}}-4(3)(-10)}}}}{{2(3)}}\\&=\displaystyle \frac{{-3\pm \sqrt{{39}}}}{3}\\x&=\displaystyle \frac{{-3+\sqrt{{39}}}}{3}\text{ or }x=\displaystyle \frac{{-3-\sqrt{{39}}}}{3}\\x&=0.180...\text{ or }x=-3.081...\end{align*}
\scriptsize \begin{align*}f(0.180...)&=-6.04\\f(-3.081...)&=30.04\\\text{Turning points: }&(0.18;-6.04)\text{ and }(-3.08;30.04)\end{align*}
3. .
\scriptsize \begin{align*}{y}' &=6{{x}^{2}}-54\\{{x}^{2}}-9&=0\\x&=3,\text{ }x=-3\\f(3)&=2{{(3)}^{3}}-54(3)+40\\&=-68\\f(-3)&=2{{(-3)}^{3}}-54(-3)+40\\&=148\\\text{Turning points: }&(3;-68)\text{ and }(-3;148)\end{align*}

Back to Exercise 5.2

### Exercise 5.3

1. $\scriptsize f(x)={{x}^{3}}+{{x}^{2}}-5x+3$
1. .
\scriptsize \begin{align*}f(1)&={{(1)}^{3}}+{{(1)}^{2}}-5(1)+3\\&=0\\\therefore (x-1)&\text{ is a factor}\end{align*}
\scriptsize \begin{align*}{{x}^{3}}+{{x}^{2}}-5x+3&=(x-1)({{x}^{2}}+2x-3)\\(x-1)({{x}^{2}}+2x-3)&=0\\{{(x-1)}^{2}}(x+3)&=0\\x&=1\text{ or }x=-3\\\text{x-intercepts:}&\text{ }(1;0)\text{ and }(-3;0)\end{align*}
2. $\scriptsize \text{y-intercept }(0;3)$
\scriptsize \begin{align*}{f}'(x)&=3{{x}^{2}}+2x-5\\(3x+5)(x-1)&=0\\x&=-\displaystyle \frac{5}{3}\text{ and }x=1\\f(-\displaystyle \frac{5}{3})&=9.48\\f(1)&=0\\\text{Turning points:}&\text{ }(-\displaystyle \frac{5}{3};9.48)\text{ and }(1;0)\end{align*}
3. .
2. $\scriptsize f(x)=-{{x}^{3}}+4{{x}^{2}}+11x-30$

Back to Exercise 5.3

### Exercise 5.4

1. $\scriptsize {f}'(x)=-3{{x}^{2}}-6x+9$
\scriptsize \begin{align*}{{f}'}'(x)&=-6x-6\\{{f}'}'(1)&=-6(1)-6\\&=-12\\{{f}'}'(1)& \lt 0\\\therefore &\text{ local maximum at }x=1\end{align*}
2. $\scriptsize \displaystyle {y}'=3{{x}^{2}}+6x-10$
\scriptsize \displaystyle \begin{align*}{{y}'}' &=6x+6\\{{y}'}'(-1)&=0\\\therefore &\text{ there is a point of inflection at }x=-1\\\text{Note:}&\text{ we can make the above statement since y is a cubic function}\text{.}\end{align*}
3. $\scriptsize {y}'=6{{x}^{2}}-54$
\scriptsize \begin{align*}{{y}'}' &=12x\\{{y}'}'(3)&=36\\{{y}'}'(3)& \gt 0\\\therefore &\text{ local minimum at }x=3\end{align*}

Back to Exercise 5.4

### Unit 5: Assessment

1. .
1. .
\scriptsize \begin{align*}g(0)&=6\\\text{y-intercept }(0;6)\\g(2)&=0\\&\therefore (x-2)\text{ is a factor}\\{{x}^{3}}-2{{x}^{2}}-4x+6&=(x-2)({{x}^{2}}-3)\\x&=2\text{ or }x=\pm \sqrt{3}\\\text{x-intercepts:}&\text{ }(2;0),\text{ }(1.73;0)\text{ and }(-1.73;0)\end{align*}
2. .
\scriptsize \begin{align*}{g}'(x)&=3{{x}^{2}}-4x-3\\3{{x}^{2}}-4x-3&=0 &&\text{ Use the quadratic formula}\\x&=-0.54\text{ or }1.87\\g(-0.54)&=6.88\\g(1.87)&=-0.06\\\text{Stationary points:}&\text{ }(-0.54;6.88)\text{ and }(1.87;-0.06)\end{align*}
3. .
\scriptsize \begin{align*}{g}'(x)&=3{{x}^{2}}-4x-4\\{{g}'}'(x)&=6x-4\\\text{Note: since }&g\text{ is a cubic function we can let }{g}''(x)=0\text{ to find the point of inflection}\text{.}\\{{g}'}'(x)&=0\\6x-4&=0\\x&=\displaystyle \frac{2}{3}\\\text{Point of inflection:}&\\&(\displaystyle \frac{2}{3};3.41)\end{align*}
4. .
2. .
1. .
\scriptsize \displaystyle \begin{align*}{f}'(x)&=3{{(x-2)}^{2}}(1)\\&=3({{x}^{2}}-4x+4)\\&=3{{x}^{2}}-12x+12\\{{f}'}'(x)&=6x-12\\\text{For }x& \lt 2,\text{ the graph is concave down}\text{.}\\\text{For }x& \gt 2,\text{ the graph is concave up}\text{.}\end{align*}
2. .
Note that the function is a cubic:
\scriptsize \displaystyle \begin{align*}{{f}'}'(x)&=6x-12\\&=0\\\therefore x&=2\\f(2)&=0\\\text{ point of inflection: }&(2;0)\end{align*}
3. .

Back to Unit 5: Assessment