Chapter 13: Curve Sketching

In this section we discuss how to sketch the graph of a function [Maple Math] without plotting many points. Indeed, most parts of a curve are routine and uninteresting and plotting them precisely serves very little purpose. What is really important is to learn the exact points features of the curve change and if we plot these points precisely then we will have a reliable as well as useful graph.

Without having to make up a table of values for the function, we can obtain a good
qualitative picture of the graph using certain crucial information --- local maxima and local minima, inflection points, asymptotes, etc. Our aim is not to draw an exact graph, but rather to get an accurate overall picture of the graph and to pinpoint the points where something special happens.

We start by describing the steps to take in curve sketching. For a particular f(x), not all of the steps below will necessarily lead to useful information. The various possibilities will be illustrated later in the examples.

Maxima/Minima

If (p,f(p)) is a point where f(p) is the highest value as long as the x-values vary in a small interval around p, then f(p) is said to be a local maximum value of f(x) . Similarly, f(p) is a local minimum value , if f(p) is the lowest value as x varies in a small interval near p. Collectively, a local maximum or minimum is called a local extremum . The plurals of maximum, minimum and extremum are maxima, minima and extrema respectively.

If the derivative
[Maple Math] exists at [Maple Math] , or, in other words, if the tangent line to the curve [Maple Math] exists at [Maple Math] , then it can be shown that t he tangent line at that point is horizontal , i.e., [Maple Math] .


The idea of the proof of this claim is easy. If
[Maple Math] then the function is increasing near x = p and there must be values of f(x) bigger than f(p) near (and to the right) of x = p. Similarly, if [Maple Math] , then the function is decreasing at x = p and there must be values of f(x) smaller than f(p) near (and to the left) of x = p. So, in either case, the function cannot have a local maximum at x = p. The case of a local minimum is similar.

Points with a horizontal tangent line can tbe found by setting the derivative equal to zero, and solving for x. (There may be one x for which
[Maple Math] , there may be many, or there may be none.) Once you find the x for which [Maple Math] (and the corresponding y-coordinate of each possible max/min point), you have to determine whether it really is a maximum or minimum. In simple examples it might be obvious. A systematic way to tell is by the second derivative test, which will be described below.

code for figure

[Maple Plot]




First, we make a few remarks.

1. The reason for using the term local maximum point instead of just ``maximum '' is that it may not actually be a maximum value of the function on the whole domain. As in the above drawing, the local maximum might only be the maximum f(x) for all nearby x --- the function might later turn again and go up to a higher value. The reason for the use of the term local minimum instead of just ``minimum'' is similar. Sometimes, local maxima and minima are referred to as ``upper turning points'' and ``lower turning points.''

What is usually understood by the ``maximum'' will be called the `` absolute maximum ''. Thus f(p) is said to be the absolute maximum value of f(x) on some interval, if it is bigger than or equal to f(x) as x varies over the interval. The term absolute minimum is similar. Some people use the term ``global'' in place of ``absolute''.

If you want to be very precise, you should never use the terms maximum or minimum without some adjective like ``local'' or ``absolute'' or ``global''. If a given word problem does not use these precise terms, then you should use some common sense reasoning to determine what the question must mean!

2. A maximum or minimum might occur at a point where there is no well defined tangent line, i.e., where [Maple Math] does not exist. For example, [Maple Math] has its (local as well as absolute) minimum point at (0,0).


Sometimes a curve has a
vertical tangent . At such a point, the value of f'(x) will come out undefined as the limiting process for the derivative will lead to +/- [Maple Math] as limiting values. For our purposes, we can treat this also as a case of [Maple Math] undefined, even though it is possible to make a reasonable definition and declare it well defined. A simple example of this is the curve y = [Maple Math] which has a vertical tangent at x = 0.

( Note: Generally, we forbid taking fractional powers of negative numbers. However, the function that we are talking about here is the ``real'' cube-root which is well defined even for negative values of x. It can be thought to be the usual cube-root function extended to the negative values by making it an odd function.)

3. Suppose you want to find the absolute maximum of a function f(x) on the interval from a to b. To do this, you have to try:

(a) all points x where [Maple Math] ,

(b) all points x where [Maple Math] does not exist (as explained above), and

(c) the endpoints a and b (for example, in the above drawing the maximum point is at the endpoint b).

The largest of the function values among these shall come out to be the absolute maximum.


4. Later, we will see examples of points where, even though the slope of the tangent line is 0, we have (
neither ) a maximum nor a minimum there.

The Second Derivative Test

Suppose that x = p is a solution of [Maple Math] . The second derivative test is a method that ( in most cases ) will tell us whether the point ( [Maple Math] ) is a local maximum or minimum. The test works as follows:

Compute the second derivative of the function at the same value x = p , i.e., [Maple Math] . If [Maple Math] is positive, that means that [Maple Math] is an increasing function at p, i.e., [Maple Math] is negative a little to the left of p and is positive a little to the right of p. This is what happens near a local minimum . On the other hand, if [Maple Math] is negative, then [Maple Math] is positive a little to the left of p and is negative a little to the right of p, which is what happens near a local maximum . If it so happens that [Maple Math] = 0 (i.e., if ( it both) [Maple Math] and [Maple Math] are zero at the same x , then the second derivative test doesn't give you any information. To summarize,


If
[Maple Math] then:

[Maple Math] < 0 implies that p is a local maximum point

[Maple Math] < 0 implies that p is a local maximum point

[Maple Math] = 0 can't tell if p is a local maximum, local minimum, or neither.

To see how and why this test succeeds or fails, you should always consider
graphs of the functions
[Maple Math] , [Maple Math] , [Maple Math] , [Maple Math] and their negatives. We have provided a picture below which contains each of these and its derivative. You should analyze the point x = 0 in each case. You should separately consider the function f(x) = 1.

code for diagram



[Maple Plot]

[Maple Plot]

The First Derivative Test

The Second Derivative Test works like a charm if we can find [Maple Math] and it is nonzero. If it is difficult to evaluate or zero, then the first derivative case comes in handy. In fact, it can also be used in place of the Second Derivative Test.


Suppose you are testing a point x = p and
[Maple Math] . You wish to check if this is a local maximum or local minimum. Evaluate the derivative [Maple Math] at a point [Maple Math] to the left of p and near p. Also evaluate the derivative [Maple Math] at a point [Maple Math] to the right of p and near p.

The test says:

1. If [Maple Math] ( [Maple Math] ) > 0 and [Maple Math] ( [Maple Math] )<0, then x = p is a local maximum.
2. If
[Maple Math] ( [Maple Math] ) <0 and [Maple Math] ( [Maple Math] )> 0, then x = p is a local minimum.
3. If
[Maple Math] ( [Maple Math] ) and [Maple Math] ( [Maple Math] ) have the same sign, then it is neither a local maximum nor a local minimum. It is an `` inflection point '' discussed below.

As you can see, this test is definitive. The only problem is to decide
how near should the points [Maple Math] , [Maple Math] ] should be. The requirement is that there should be no critical points of the function inside either [ [Maple Math] ) or ( [Maple Math] ).


If you have only finitely many critical points, then this will be easy to do. If you have infinitely many critical points which cluster around x = p, then this test cannot be applied at all!


See if you can think of a function with infintely many critical points which cluster around a single point. They don't occur naturally but good approximations of them do.

Concavity and Inflection

We know that the sign of the derivative tells whether a function is increasing or decreasing. For example, any time that [Maple Math] , that means that f(x) is increasing. We now explain the geometrical meaning of the sign of the second derivative . Suppose that [Maple Math] for a certain interval of x. This means that as we go from left to right across the interval, the slope of the tangent line increases. We say that the function is `` concave upward'' over this interval. The pictures below all show concave upward functions.

code for figure

[Maple Plot]

[Maple Plot]

If [Maple Math] >0 then the derivative is increasing which means that the slope of the tanget line is increasing. In this case the tangent line stays below the graph and the graph is concave downward . Conversely, if [Maple Math] over a certain interval, then the slope of the tangent line decreases, the tangent line stays below the graph and we say that the function is `` concave downward .'' The pictures at the top of the figure show concave upward functions.


There are several ways to describe the difference between
upward concavity and downward concavity :

(1) An upward concave function looks like part of a right-side-up bowl (holds water), while a concave downward function looks like part of an upside-down bowl.

(2) If you draw the tangent line to a concave upward function at a point, then the curve sits on the tangent line, whereas in the case of a concave downward function the tangent line rests on the curve.

(3) As you go from left to right, the tangent line to a concave upward curve rotates counterclockwise, while the tangent line to a concave downward curve rotates clockwise.

A point that separates a region of upward concavity and a region of downward concavity is called a point of inflection . The geometrical meaning of a point of inflection is that, as you roll the tangent line along the curve from left to right, at a point of inflection it reverses its direction of rotation (from clockwise to counterclockwise, or vice-versa). That is, the sign of the second derivative changes as you pass a point of inflection .

Thus, inflection points can usually be found by setting [Maple Math] and solving for x. Each of the drawings for Examples 13.1 and 13.2 below shows a point of inflection at the origin separating a concave downward part of the curve (on the left) from a concave upward part (on the right).

Warning . Notice that ( [Maple Math] ) may not be a point of inflection even though [Maple Math] . After finding the points where [Maple Math] , you then must check that [Maple Math] changes sign. (See Example 13.5 below.)

Second Warning . If (x,f(x)) is an inflection point and [Maple Math] exists then it will be zero. However it can happen that (x,f(x)) is a point of inflection, yet [Maple Math] does not exist . The simplest example of this is [Maple Math] at x=0. The derivative of f(x) is actually [Maple Math] which has no derivative at x=0. However the second derivative changes from -2 to 2 as on goes from negative to positive values of x.

Asymptotes and Other Things to Look For

An asymptote of a curve is a line which will be a tangent to the curve if the curve can be analyzed "near infinity". There are precise ways of discussing points at infinity of a curve and making this discussion rigorous. We will, however, take a naive definition and learn how to recognize asymptotes.


An asymptote for us will be a line such that the graph of the curve approaches the line along some branch (i.e. part or component) of the curve going out to the infinite region of the plane.


The easiest to analyze is a
vertical asymptote . A vertical line x = p is an asymptote to y = f(x), if f(x) becomes infinite as x nears p. It is possible that the function gets closer to plus or minus [Maple Math] depending on our approach to
the point x = p. Usually, the formula for the function has a denominator that becomes zero at x = p. For example, the reciprocal function has a vertical asymptote at x = 0, and the function
[Maple Math] has a vertical asymptote at x = [Maple Math] /2 (and also at x = - [Maple Math] /2, x = 3 [Maple Math] /2, etc.).

Note that usually f(p) would not be defined - or at least not naturally defined by the formula. It may be artificially defined in the construction of the function.

Vertical asymptotes are found by asking when the denominator of the formula of a function goes to zero.



A
horizontal asymptote is a horizontal line to which f(x) gets closer and closer as x approaches [Maple Math] (or as x approaches - [Maple Math] ). For example, the reciprocal function has the x-axis for a horizontal asymptote. Sometimes one also encounters slanted lines for asymptotes.


For example, the function
[Maple Math] has the line [Maple Math] as a slanted asymptote , because when x is large [Maple Math] and [Maple Math] are very close together.

In general a line
[Maple Math] shall be an asymptote to [Maple Math] if the expression [Maple Math] approaches 0 as x approaches [Maple Math] (or as x approaches - [Maple Math] .
Note that it is possible for a function to have two slant or horizontal asymptotes - one corresponding to values as it goes to
[Maple Math] , the other as it tends to - [Maple Math] . A function can have an asymptote only in the + [Maple Math] direction or no asymptotes at all. The sketches below illustrate this. Describing these functions analytically employs the exponential and sin functions. However sketching such a diagram with pencil and paper requires only an understanding of the geometric idea. You should sketch for yourself a function with two different horizontal asymptotes, one with a slant and a horizontal asymptote, etc.

[Maple Plot]

[Maple Plot]

code for diagrams

If the domain of our function does not extend out to infinity, we should also ask what happens as x approaches the boundary of the domain. For example, the function y = f(x) = 1/ [Maple Math] has domain -r < x < r, and y becomes infinite as x approaches either r or -r. Thus we get vertical asymptotes. This reconfirms the fact that in general , if x = p is a vertical asymptote then x = p is not in the domain.

If there are any points where the derivative fails to exist (a cusp or corner), then we should take special note of what the function does at such a point.



Finally, it is worthwhile to notice any
symmetry . A function f(x) that has the same value for -x as for x, i.e., f(-x) = f(x), is called an `` even function .'' It is crucial that this property holds throughout the domain of the function. It is not enough to check the equation for a few sample points! ) Its graph is symmetric with respect to the y-axis. The most important examples of even functions are: [Maple Math] when n is an even number, indeed, this is the reason for the use of the word even . Other examples of even functions are: cos x, and [Maple Math] . Expressions formed from even functions are also even, for example [Maple Math] .



On the other hand, a function that satisfies the property
[Maple Math] is called an `` odd function .'' Its graph is symmetric with respect to the origin. The warning about checking the whole domain should be applied here also.

As before, the main examples of odd functions are: [Maple Math] when n is an odd number, and as before this is the reason for the terminology.

Some more examples of odd functions are: sin x, and tan x. Unlike even functions, expressions in odd functions may fail to stay odd. For example the square of an odd function is always even! However, an odd function stays odd if multiplied by a constant and sums of odd functions are odd.

Of course, most functions are neither even nor odd, and do not have any particular symmetry. A striking fact is that every function f(x) can be written as an odd function
[Maple Math] and an even function [Maple Math] . You should try to prove this. You might start by showing that h(x) = f(x) + f(-x) is even. Can you think of a similarly defined odd function?)

Examples

Example 1: Sketch [Maple Math] .


First, we set 0 =
[Maple Math] , which has solutions x = +/- [Maple Math] /3 =+/- 0.577. The corresponding y-coordinates are -0.385 and +0.385, i.e., the two ``critical points'' are (0.577,-0.385) and (-0.577,0.385). The second derivative test gives [Maple Math] , which is positive for the first point and negative for the second. Thus, the first of the two points (in the fourth quadrant) is a local minimum, and the second is a local maximum. Since [Maple Math] >0 when x>0 and [Maple Math] <0 when x<0, it follows that the curve is concave upward in the right half of the graph and concave down-ward in the left half. The two halves are
separated by the inflection point at the origin. This curve has no asymptotes. It does have symmetry, however, because it is an odd function. Its graph is shown below.

[Maple Plot]

code for diagram above

Example 2 : Sketch [Maple Math] .

The only difference with Example 13.1 is the + in front of the x. But this means that the derivative y' = [Maple Math] is ( never ) zero, and hence there are no local maxima or minima. In fact, the function is always increasing, because y' is always positive. The second derivative [Maple Math] is the same as in the last problem, and hence the concavity situation is the same. In particular, this curve also has an inflection point at the origin.

code for diagram below

[Maple Plot]

Example 3 : Sketch [Maple Math] for [Maple Math] [Maple Math] .

When we set 0 =
[Maple Math] = [Maple Math] , we obtain the equality [Maple Math] . However, from a quick sketch of the two curves [Maple Math] and -x, we immediately see that the only x for which they are equal is x = 0. When x = 0 the y-coordinate is [Maple Math] , so our critical point is (0,-1). Since [Maple Math] = [Maple Math] , which is positive when x = 0, the second derivative test tells us that (0,1) is a local minimum. To find inflection points we set 0 = [Maple Math] = [Maple Math] . This gives [Maple Math] . Looking at our table in the section on trig functions, or solving with a calculator or computer, we see that in the range from x = 0 to x = [Maple Math] /2 the equality [Maple Math] holds when [Maple Math] = 2/3 [Maple Math] , i.e., x = [Maple Math] /3. Since [Maple Math] , the equality also holds when x = - [Maple Math] /3. Thus, the points ( [Maple Math] /3,1.5966) and (- [Maple Math] /3,1.5966) are inflection points. Between these two inflection points the second derivative is positive (concave up), whereas for x> [Maple Math] /3 and for x<- [Maple Math] /3 the second derivative is negative (concave downward). Finally, note that [Maple Math] is an even function, and so the graph is symmetrical with respect to the y-axis.


Example 4: Sketch [Maple Math] .



Setting 0 =
[Maple Math] - 1/ [Maple Math] , we solve this by bringing 1/ [Maple Math] to the left and clearing denominators: 1 = [Maple Math] . So x = [Maple Math] . The corresponding y-coordinate is 1.8899. Using the second derivative [Maple Math] = [Maple Math] , we see that this is a local minimum. To find inflections, we set 2+2/ [Maple Math] = 0. Clearing denominators and solving for x gives [Maple Math] , and so x = -1. Thus, the point (-1,0) is an inflection. In this example we have an asymptote when x = 0. To the right of the asymptote (i.e., for positive x), the second derivative is always positive; whereas for negative x the second
derivative is positive when x<-1 and negative when x is between -1 and 0. Thus, the interval -1<x<0 is a region of downward concavity; the graph is concave upward outside of this interval. Putting all this together leads to the graph below.

[Maple Plot]

code for diagram above

There is another way to think of this example. Our function is the sum of
two functions
[Maple Math] and 1/x. The former function is by far the larger of the two when x is large positive or large negative, whereas the reciprocal function is by far the more important when x is near 0. Thus, the graph resembles 1/x when x is near 0 and resembles [Maple Math] when x is far from 0. Roughly speaking, the inflection point (-1,0) and the local minimum (0.7937,1.8899) mark the transition from behaving like the graph of [Maple Math] to behaving like the graph of 1/x.

Example 5: Sketch (a) [Maple Math] and (b) [Maple Math] .

(a) Setting 0 = [Maple Math] , we see that the origin is a possible maximum or minimum. However, the second derivative test tells us nothing, since [Maple Math] also is zero when x = 0. In fact, even though [Maple Math] when x = 0,
the origin is neither a maximum nor a minimum. Rather, it is a point of inflection, separating the concave downward region in the third quadrant from the concave upward region in the first quadrant.

(b) Again we see that both the first derivative and the second derivative
vanish at the origin (and neither derivative is zero anywhere else). This time, however, the origin is a local minimum. Even though the second derivative test doesn't tell us this, we can see directly that, since
[Maple Math] is positive for nonzero x, its smallest possible value is when x = 0. Note that the origin is not a point of inflection, even though [Maple Math] there. This is because [Maple Math] = [Maple Math] > 0 both for x>0 and for x<0, so everywhere we have upward concavity. (It is rare for a point where [Maple Math] = 0 not to be an inflection point; this can occur only when the third derivative [Maple Math] is also zero at the same point or does not exist. Even then such a point might be a point of inflection - the signs of the higher derivatives just don't tell us.) The familiar graphs of [Maple Math] and [Maple Math] are given in the diagram below

[Maple Plot]

code for diagram above

Example 6 : Sketch [Maple Math] .

First, we set 0 = [Maple Math] . To solve this, we factor out what we can, namely [Maple Math] . This leaves a quadratic that can be factored either by inspection or by the quadratic formula. The result is 0 = [Maple Math] = [Maple Math] . Thus, the critical points are (0,0), (1,1), and (3,-27). Using [Maple Math] = [Maple Math] , we see from the second derivative test that (1,1) is a local maximum and (3,-27) is a local minimum, but we get no information about (0,0). Setting [Maple Math] and using the quadratic formula to find the roots of [Maple Math] , we find the following three points of inflection: (0,0), (0.634,0.569), (2.366,-16.32).

In a complicated case like this, it is also worthwhile to see what the function is doing when x is large positive or large negative. If x is large, the [Maple Math] term in our function dominates (is greater in absolute value than all the other terms). Thus, the function heads upward steeply into the first quadrant as [Maple Math] , and it heads steeply down into the third quadrant as x -> - [Maple Math] . Putting this information together, we obtain the graph shown below. The curve is concave downward in the third quadrant, and also between the two points of inflection
(0.634,0.569) and (2.366,-16.32). For 0 <x < 0.634 and for x > 2.366 the curve is concave upward.

[Maple Plot]

code for diagram above

table of contents