topic badge

3.04 Graphing techniques using calculus

Lesson

We have seen that the first and second derivatives of a function have been shown to give us a wealth of information about the shape of the curve. Combining this with our previous understanding of functions, such as domain and range, properties of polynomials, features of exponential and trigonometric functions, we are able to create a checklist of skills that allow us to sketch many functions that are familiar and unfamiliar. 

 

Sketching functions

Strategy Description
Determine any special characteristics

Investigate values of $x$x for which $f\left(x\right)$f(x) is not defined, such as within fractions or square root functions.

Check if there are any asymptotes or discontinuities.

Domain and range

Consider the $x$x and $y$y values that the function can take. If a domain is specified, clearly indicate the coordinates of the end points on the function sketch. 

Find axis intercepts

Let $x=0$x=0 to find the $y$y-intercept, and let $y=0$y=0 and solve to find any $x$x-intercepts, where possible.

Determine stationary points Consider $\frac{dy}{dx}=0$dydx=0.
Determine the nature of stationary points

Consider $\frac{dy}{dx}$dydx left and right of each stationary point.

Or:

Consider the sign of $\frac{d^2y}{dx^2}$d2ydx2 at each stationary point.

Find any possible points of inflection Consider $\frac{d^2y}{dx^2}=0$d2ydx2=0 and test for a change in concavity.
Limiting behaviours

Consider the graphs behaviour as $x$x approaches $\pm\infty$±

Also consider the graphs behaviour about any asymptotes, if the graph has any. 

(See below for further detail)

Create a sketch with clearly labelled and appropriately scaled axes, as well as labelling all key features. When available make effective use of technology to help sketch a function.

 

Limiting behaviours of functions 

When sketching curves it is useful to consider what happens to the function as $x\rightarrow\pm\infty$x±. This gives us an indication of what the graph is doing as $x$x gets very large ($x\rightarrow\infty$x) and very small ($x\rightarrow-\infty$x). Also, if we have identified any asymptotes in the graph, it is important to consider the behaviour of the graph as it approaches critical values.

  • The limiting behaviour of polynomials as $x\rightarrow\pm\infty$x± is determined by the leading term, that is, the one with the highest index. For example, for the polynomial $P\left(x\right)=2x^3+3x^2-10x$P(x)=2x3+3x210x, as $x\rightarrow\pm\infty$x± the term $2x^3$2x3 dictates that the function will be very large and positive as $x\rightarrow\infty$x and the function will be very large and negative as $x\rightarrow-\infty$x . The table below summarises the behaviour of polynomials with leading term $ax^n$axn.
$n$n $a>0$a>0 $a<0$a<0

 

Even

 

Odd

  • It is useful to understand the limiting behaviour of $\frac{1}{x}$1x as $x\rightarrow\pm\infty$x± for functions with a variable in the denominator, such as hyperbolic functions. If we divide $1$1 by a large positive number, we get a positive number very close to $0$0. And we can see in the graph below that as $x\rightarrow+\infty$x+, the function approaches zero from above. Similarly, if we divide $1$1 by a large negative number, we get a negative number very close to $0$0. Looking at the graph we can see that as$x\rightarrow-\infty$x, the function approaches zero from below. 

  • In the graph shown above we also have a vertical asymptote. For functions that contain a fraction with a variable in the denominator, identify any values that cause the denominator to be zero. These are likely candidates for vertical asymptotes and can be further identified by observing the behaviour of the graph as $x$x approaches any critical values. In the case above, a value of $x=0$x=0 would cause the function $y=\frac{1}{x}$y=1x to be undefined and we can look at the behaviour either side to understand if this is an asymptote or single point discontinuity. If we divide $1$1 by a very small positive number we get a very large positive number, that is, as $x$x approaches $0$0 from above $y$y approaches $\infty$. Similarly, as $x$x approaches $0$0 from below $y$y approaches $-\infty$.
  • Exponential functions, such as $y=e^x$y=ex also display interesting behaviour as $x$x approaches $\pm\infty$±. As the $x$x increases, the $y$y-values increase at an increasing rate. Thus, as $x\rightarrow\infty$x, $y\rightarrow\infty$y. We also have a horizontal asymptote of $y=0$y=0, since as $x\rightarrow-\infty$x$y$y approaches $0$0 from above.

 

Worked examples

Example 1

For the function $f\left(x\right)=\left(x-5\right)\left(x-2\right)\left(x+3\right)$f(x)=(x5)(x2)(x+3):

(a) Find the axes intercepts.

Think: Find the intercepts by letting the opposite variable equal to zero and solve. The cubic is already factorised so we can use the null factor law to solve for the $x$x-intercepts.

Do:

Find the $y$y-intercept: When $x=0$x=0:

 

$f\left(0\right)$f(0) $=$= $\left(0-5\right)\left(0-2\right)\left(0+3\right)$(05)(02)(0+3)
  $=$= $30$30

Thus, the $y$y-intercept is $\left(0,30\right)$(0,30).

 

Find the $x$x-intercepts: Solving $f\left(x\right)=0$f(x)=0:

$\left(x-5\right)\left(x-2\right)\left(x+3\right)=0$(x5)(x2)(x+3)=0

As the function is in factored form we can see the solutions are $x=5$x=5, $2$2 and $-3$3. So the $x$x-intercepts are $\left(5,0\right)$(5,0), $\left(2,0\right)$(2,0) and $\left(-3,0\right)$(3,0).

 

(b) Find the location and nature of any turning points.

Think: We need to find the derivative, solve for $f'\left(x\right)=0$f(x)=0 and then determine the nature of the turning points. This can be achieved using calculus and testing the gradient either side of the critical points or by testing concavity using the second derivative. Alternatively, we can use our knowledge of the shape of the type of polynomial we have. 

Do: Expanding $f\left(x\right)$f(x) we obtain:

$f\left(x\right)$f(x) $=$= $\left(x-5\right)\left(x-2\right)\left(x+3\right)$(x5)(x2)(x+3)
  $=$= $\left(x-5\right)\left(x^2+x-6\right)$(x5)(x2+x6)
  $=$= $x^3-4x^2-11x+30$x34x211x+30
Hence, $f'\left(x\right)$f(x) $=$= $3x^2-8x-11$3x28x11

Solving $f'\left(x\right)=0$f(x)=0:

$3x^2-8x-11$3x28x11 $=$= $0$0
$\left(3x-11\right)\left(x+1\right)$(3x11)(x+1) $=$= $0$0
$\therefore x$x $=$= $\frac{11}{3}$113 or $-1$1

Substituting these values into $f\left(x\right)$f(x) we obtain $f\left(\frac{11}{3}\right)=-\frac{400}{27}\approx-14.8$f(113)=4002714.8 and $f\left(-1\right)=36$f(1)=36. So we have two stationary points at $\left(\frac{11}{3},-\frac{400}{27}\right)$(113,40027) and $\left(-1,36\right)$(1,36)

Using calculus to test the behaviour of the derivative either side and between these two points. Choose convenient $x$x-values before $x=-1$x=1, (such as $x=-2$x=2), between $x=-1$x=1 and $\frac{11}{3}$113 (such as$x=0$x=0) and after $x=\frac{11}{3}$x=113 (such as $x=4$x=4). Substitute the values into the gradient function - we are concerned with the sign and whether the function is increasing or decreasing, so you can choose to simply record the sign in the table and not include the value.

$x$x $-2$2 $-1$1 $0$0 $\frac{11}{3}$113 $4$4
$f'\left(x\right)$f(x) $17$17 $0$0 $-11$11 $0$0 $5$5

sign

$+$+ $0$0 $-$ $0$0 $+$+

shape

 

The table shows that at $x=-1$x=1 the graph changes from increasing to decreasing and hence, $\left(-1,36\right)$(1,36) is a maximum. And at $x=\frac{11}{3}$x=113 the graph changes from decreasing to increasing and hence, $\left(\frac{11}{3},-\frac{400}{27}\right)$(113,40027) is a minimum.

As mentioned, we could alternatively use information about the type of graph we have to ascertain which stationary point is maximum and which is minimum. This method can be more efficient for familiar polynomial functions. Here we have a cubic and with the brackets expanded we see that we have a positive leading coefficient. This tells us the general shape of the graph with the tails of the function going from bottom left to top right. Thus, the point to the left,$\left(-1,36\right)$(1,36), will be the maximum and the second point,$\left(\frac{11}{3},-\frac{400}{27}\right)$(113,40027), will be the minimum.

 

(c) Use the information to sketch the function.

Think: Given the points found, think of an appropriate scale to show the key features. Then plot each of the points we have and sketch in a smooth curve connecting them to obtain the graph.

Do:

The point of inflection could also be found using the second derivative and labelled on the graph if necessary.

Example 2

For the function $y=4xe^{2x}$y=4xe2x:

(a) Find any axes intercepts.

Think: Find the intercepts by letting the opposite variable equal to zero and solve. 

Do:

Find the $y$y-intercept: When $x=0$x=0:

 

$y$y $=$= $4\times0\times e^0$4×0×e0
  $=$= $0\times1$0×1
  $=$= $0$0

Thus, the $y$y-intercept is $\left(0,0\right)$(0,0). This is also the $x$x-intercept and the only one since:

If $y=0$y=0:

$0$0 $=$= $4xe^{2x}$4xe2x

 

$0$0 $=$= $4x$4x

Since $e^a>0$ea>0 for any real $a$a

$\therefore x$x $=$= $0$0

Is the only solution

 

(b) Find the first derivative of the function.

Think: We have an exponential function multiplied by a linear function. Hence, we will need to apply the product rule.

Do: Let

  $u=4x$u=4x then $u'=4$u=4
and $v=e^{2x}$v=e2x then $v'=2e^{2x}$v=2e2x

Hence,

$\frac{dy}{dx}$dydx $=$= $uv'+vu'$uv+vu  
  $=$= $4x\times2e^{2x}+e^{2x}\times4$4x×2e2x+e2x×4

Make appropriate substitutions

  $=$= $8xe^{2x}+4e^{2x}$8xe2x+4e2x  
  $=$= $4e^{2x}\left(2x+1\right)$4e2x(2x+1)

Taking out a common factor will help when finding any stationary points

 

(c) Find any stationary points.

Think: Find $x$x such that $\frac{dy}{dx}=0$dydx=0.

Do: 

$4e^{2x}\left(2x+1\right)$4e2x(2x+1) $=$= $0$0

 

$\therefore\left(2x+1\right)$(2x+1) $=$= $0$0

Since $e^a>0$ea>0 for any real $a$a

$2x$2x $=$= $-1$1

 

$x$x $=$= $\frac{-1}{2}$12

 

 

When $x=\frac{-1}{2}$x=12:

$y$y $=$= $4\left(\frac{-1}{2}\right)e^{2\times\frac{-1}{2}}$4(12)e2×12
  $=$= $\frac{-2}{e}$2e

Hence, there is a stationary point at $\left(\frac{-1}{2},\frac{-2}{e}\right)$(12,2e). We will determine its nature in part f).

(d) Find the second derivative of the function.

Think: We want to find the derivative of $4e^{2x}\left(2x+1\right)$4e2x(2x+1) and again we have an exponential function multiplied by a linear function. Hence, we will need to apply the product rule.

Do: Let

  $u=4e^{2x}$u=4e2x then $u'=8e^{2x}$u=8e2x
and $v=2x+1$v=2x+1 then $v'=2$v=2

Hence,

$\frac{d^2y}{dx^2}$d2ydx2 $=$= $uv'+vu'$uv+vu  
  $=$= $4e^{2x}\times2+\left(2x+1\right)\times8e^{2x}$4e2x×2+(2x+1)×8e2x

Make appropriate substitutions

  $=$= $8e^{2x}+8e^{2x}\left(2x+1\right)$8e2x+8e2x(2x+1)  
  $=$= $8e^{2x}\left(2x+2\right)$8e2x(2x+2)

Taking out a common factor will help when finding possible inflection points

 

(e) Find any possible points of inflection.

Think: Find $x$x such that $\frac{d^2y}{dx^2}=0$d2ydx2=0.

Do: 

$8e^{2x}\left(2x+2\right)$8e2x(2x+2) $=$= $0$0

 

$\therefore\left(2x+2\right)$(2x+2) $=$= $0$0

Since $e^a>0$ea>0 for any real $a$a

$2x$2x $=$= $-2$2

 

$x$x $=$= $-1$1

 

When $x=-1$x=1:

$y$y $=$= $4\left(-1\right)e^{-2}$4(1)e2
  $=$= $\frac{-4}{e^2}$4e2

Hence, there is a possible point of inflection at $\left(-1,\frac{-4}{e^2}\right)$(1,4e2). We will confirm this in the next part.

(f) Using the second derivative determine the nature of any stationary points or points of inflection.

Think: We have one possible point of inflection, if we check the sign of the second derivative by substituting values for $x$x just either side of this point we can check for a change in concavity. If we use $x=\frac{-1}{2}$x=12 as one of our check points we will also be able to determine the nature of the stationary point found earlier.

Do:

$x$x $-2$2 $-1$1 $\frac{-1}{2}$12
Sign of $f''\left(x\right)$f(x) negative $0$0 positive
$Concavity$Concavity

$\frown$

$.$.

$\smile$

Meaning

concave down

point of inflection

concave up

In the table above, we can see the concavity changed about the point $\left(-1,\frac{-4}{e^2}\right)$(1,4e2) and hence, it is a point of inflection.

We can also see the graph was concave up at the turning point $\left(\frac{-1}{2},\frac{-2}{e}\right)$(12,2e) and hence, it is a minimum turning point.

 

(g) Sketch a graph of the function.

Think: As well as plotting the key features found thus far, we should consider the behaviour of the function at the extremities, that is, as $x\rightarrow\pm\infty$x±.

  • As $x$x grows to a large positive number, the function $y=4xe^{2x}$y=4xe2x will be a large positive number multiplied by $e$e to the power of a large positive number. This will rapidly grow to a very large positive number. Hence, as $x\rightarrow\infty$x$y\rightarrow\infty$y.
  • As $x$x becomes a large negative number, the function $y=4xe^{2x}$y=4xe2x will be a large negative number multiplied by $e$e to the power of a large negative number. The term $e^{2x}$e2x will dominate the behaviour and the function will approach zero but the term $4x$4x will cause the function to remain negative as $x$x approaches negative infinity. Hence,  as$x\rightarrow-\infty$x$y\rightarrow0$y0 from below. In the graph we should see the function approach the horizontal asymptote of $y=0$y=0 from below the axis as $x$x becomes a larger negative number.

Do:


Practice questions

Question 1

Consider the function $f\left(x\right)=2x^3-12x^2+18x+3$f(x)=2x312x2+18x+3.

  1. Solve for the $x$x-coordinates of the turning points of the function.

  2. Determine $f''\left(1\right)$f(1).

  3. Determine $f''\left(3\right)$f(3).

  4. State the coordinates of the local maximum.

  5. State the coordinates of the local minimum.

  6. State the absolute maximum value of the function within the range $0\le x\le7$0x7.

  7. State the absolute minimum value of the function within the range $0\le x\le7$0x7.

Question 2

Consider the function $f\left(x\right)=\left(x^2-4\right)^2+4$f(x)=(x24)2+4.

  1. State the coordinates of the $y$y-intercept.

    Give your answer in the form $\left(a,b\right)$(a,b).

  2. Determine an equation for $f'\left(x\right)$f(x).

  3. Hence solve for the $x$x-coordinate(s) of the stationary point(s).

    If there is more than one, write all of them on the same line separated by commas.

  4. By completing the tables of values, find the gradient of the curve at $x=-2.5$x=2.5, $x=-1.5$x=1.5, $x=-0.5$x=0.5, $x=0.5$x=0.5, $x=1.5$x=1.5 and $x=2.5$x=2.5.

    $x$x $-2.5$2.5 $-2$2 $-1.5$1.5
    $f'\left(x\right)$f(x) $\editable{}$ $0$0 $\editable{}$
    $x$x $-0.5$0.5 $0$0 $0.5$0.5
    $f'\left(x\right)$f(x) $\editable{}$ $0$0 $\editable{}$
    $x$x $1.5$1.5 $2$2 $2.5$2.5
    $f'\left(x\right)$f(x) $\editable{}$ $0$0 $\editable{}$
  5. Select the correct statements.

    $\left(2,4\right)$(2,4) is a maximum turning point.

    A

    $\left(0,20\right)$(0,20) is a maximum turning point.

    B

    $\left(-2,4\right)$(2,4) is a minimum turning point.

    C

    $\left(0,20\right)$(0,20) is a minimum turning point.

    D

    $\left(2,4\right)$(2,4) is a minimum turning point.

    E

    $\left(-2,4\right)$(2,4) is a maximum turning point.

    F
  6. Draw the graph below.

    Loading Graph...

Question 3

Consider the function $f\left(x\right)=e^{2x}\sin3x$f(x)=e2xsin3x.

  1. Find $f'\left(x\right)$f(x).

  2. For what value of $\tan3x$tan3x is $f'\left(x\right)=0$f(x)=0?

  3. The graph of $f\left(x\right)$f(x) is shown below.

    Loading Graph...

    Find the $x$x-values of the $x$x-intercepts $B$B and $C$C.

  4. Solve for the $x$x-coordinate of $A$A to two decimal places.

Outcomes

3.1.13

understand the concepts of concavity and points of inflection and their relationship with the second derivative

3.1.14

understand and use the second derivative test for determining local maxima and minima

3.1.15

sketch the graph of a function using first and second derivatives to locate stationary points and points of inflection

What is Mathspace

About Mathspace