Curve Sketching

Without actually drawing a function with a graphing calculator it is occasionally useful to draw a rough sketch of how a particular function behaves.  One could pick random points and plot them then draw a reasonable looking curve through them, but there is no certainty that you have captured all the interesting features this way.  We already know how to identify certain characteristics of a function, the horizontal and vertical asymptotes and x and y intercepts.  However, frequently these don't tell us enough about the actual shape.  In particular, there are two aspects we are interested in.  Where does the function change directions (increasing versus decreasing), and where does the bend in the function switch (up versus down)?  If we get a handle on these two things we know not only what the function looks like but we can determine the relative maximums and minimums, which are often important for optimization purposes.

Procedure

Identify the critical numbers/values

These are the x values (only in the actual domain of the function) where f'(x) is either 0 or undefined.  If there is going to be a change in direction (increasing versus decreasing) it will have to occur at one of these points.  If the function is a piecewise defined function where the slope suddenly changes from one section to the next or if there is a jump discontinuity between section, that constitutes an undefined derivative and thus a critical value.

Mathematically speaking, one must calculate f'(x) and then solve for x values where the numerator or the denominator equal 0 (provided that the original function is not undefined in that same place).

Find local/relative maximum and minimum

Investigating each critical point to see whether it is a local minimum or maximum or something else entirely (such as a horizontal or vertical point of inflection) can be done in two different ways.

First Derivative Test

Since the function is only increasing or only decreasing between critical numbers, the direction of the function in each interval can be found by identifying the sign of the derivative at only one sample point in that interval.  It is helpful then, to draw up a sign diagram of f'(x) indicating where the derivative is positive and negative.

Essentially by definition, if f'(x) switches from positive to negative at a critical point, it is a local maximum.

If f'(x) switches from negative to positive at a critical point, it is a local minimum.

If f'(x) remains the same sign on either side of the critical point, it is neither a local maximum nor a minimum.

Second Derivative Test

Since a gradual change from negative slope to positive slope constitutes an upward curvature, we can conclude that f"(x) > 0 at a critical point implies a local minimum there.

Similarly f"(x) < 0 at a critical point implies a local maximum there.  

Unfortunately, if f"(x) is undefined at the critical point (such as when f'(x) itself is undefined at a corner or vertical point of inflection) or equal to 0 (such as at a horizontal point of inflection) we can't conclude much of anything and have to resort to the First Derivative Test.

Identify the inflection points

Similar to critical values, these are where the curvature (second derivative instead of the first) changes direction.  This only happens at the x values in the domain of f(x) where f"(x) is either undefined or equal 0.  One needs to calculate the second derivative, f"(x), and solve for the values of x where either the numerator or denominator are 0.

Establish regions of downward and upward concavity

Since the curvature must be entirely in one direction or the other between adjacent inflection points, one can test the second derivative at any convenient point in that interval to identify whether the function is concave up or concave down there.  This information can either be used to supplement the picture of the function one has formed using the First Derivative Test (using smooth curves rather than straight lines), or as the basis for the Second Derivative Test (using the critical values as the points of interest).

Examples

One

f[x_] := 6 + x^3 - 1/15x^5

Critical values

f '[x]

3 x^2 - x^4/3

Simplify[f '[x]]

-1/3 x^2 (-9 + x^2)

crit = Solve[f '[x] 0, x]

{{x -3}, {x0}, {x0}, {x3}}

First Derivative Test

{f '[-4], f '[-1], f '[1], f '[4]}//N

{-37.3333, 2.66667, 2.66667, -37.3333}

Down, -3, Up, 0, Up, 3, Down

Switches from decreasing to increasing at x = -3, so minimum

No switch at x = 0, so horizontal point of inflection

Switches from increasing to decreasing at x = 3, so maximum

Second Derivative Test

f''[x]

6 x - (4 x^3)/3

f''[x]/.crit

{18, 0, 0, -18}

Positive curvature at x = -3, thus minimum

Zero curvature at x = 0, use First Derivative Test

Negative curvature at x = 3, thus maximum

Inflection points

infl = Solve[f''[x] 0]//N

{{x0.}, {x -2.12132}, {x2.12132}}

Regions of curvature

{f''[-3], f''[-1] , f''[1], f''[3]}//N

{18., -4.66667, 4.66667, -18.}

Up, -2.12132, Down, 0, Up, 2.12132, Down

Plot[f[x], {x, -4, 4}]

[Graphics:HTMLFiles/index_21.gif]

⁃Graphics⁃

Two

Clear[f]

Needs["Miscellaneous`RealOnly`"]

f[x_] := x^(2/3) (x - 5)

Critical values

f '[x]

(2 (-5 + x))/(3 x^(1/3)) + x^(2/3)

Simplify[f '[x]]

(5 (-2 + x))/(3 x^(1/3))

crit = Solve[f '[x] 0 || x^(1/3) 0, x]

{{x0}, {x2}}

First Derivative Test

{f '[-1], f '[1], f '[3]}//N

{5., -1.66667, 1.1556}

Up, 0, Down, 2, Up

Switches from increasing to decreasing at x = 0, so maximum

Switches from decreasing to increasing at x = 2, so minimum

Second Derivative Test

f''[x]

-(2 (-5 + x))/(9 x^(4/3)) + 4/(3 x^(1/3))

f''[x]/.crit//N

{Indeterminate, 1.32283}

Undefined curvature at x = 0, use First Derivative Test

Positive curvature at x = 1.32283, thus minimum

Inflection points

infl = Solve[f''[x] 0 || x0, x]

{{x -1}, {x0}}

Regions of curvature

{f''[-2], f''[-0.5] , f''[1]}//N

{-0.440945, 1.39991, 2.22222}

Down, -1, Up, 0, Up

Plot[f[x], {x, -4, 4}]

[Graphics:HTMLFiles/index_42.gif]

⁃Graphics⁃

Three

Clear[f]

f[x_] := 100/x + 30 + 1/10x

Critical values

f '[x]

1/10 - 100/x^2

crit = Solve[f '[x] 0, x]//N

{{x -31.6228}, {x31.6228}}

Can ignore negative result.  Also x = 0 is a vertical asymptote but not a critical value

crit = Drop[crit, {1}]

{{x31.6228}}

First Derivative Test

{f '[1], f '[32]}//N

{-99.9, 0.00234375}

0, Down, 31.6228, Up

Switches from decreasing to increasing at x = 31.6228, so minimum

Second Derivative Test

f''[x]

200/x^3

f''[x]/.crit//N

{0.00632456}

Positive curvature at x = 31.6228, thus minimum

Inflection points

infl = Solve[f''[x] 0, x]

{}

No inflection point

Regions of curvature

Upward curvature for all x>0 (which is all we are interested in

Plot[f[x], {x, 0, 100}]

[Graphics:HTMLFiles/index_61.gif]

⁃Graphics⁃

Four

Clear[f]

f[x_] := (10x)/(x^2 + 25)

Critical values

f '[x]

-(20 x^2)/(25 + x^2)^2 + 10/(25 + x^2)

Simplify[f '[x]]

-(10 (-25 + x^2))/(25 + x^2)^2

crit = Solve[f '[x] 0, x]

{{x -5}, {x5}}

Drop negative value

crit = Drop[crit, {1}]

{{x5}}

First Derivative Test

{f '[1], f '[6]}//N

{0.35503, -0.0295619}

0, Up, 5, Down

Switches from increasing to decreasing at x = 5, so maximum

Second Derivative Test

Simplify[f''[x]]

(20 x (-75 + x^2))/(25 + x^2)^3

f''[x]/.crit//N

{-0.04}

Negative curvature at x = 5, thus maximum

Inflection points                        

infl = Solve[f''[x] 0, x]//N

{{x0.}, {x -8.66025}, {x8.66025}}

Ignore negative inflection point

Regions of curvature

{f''[1] , f''[10]}//N

{-0.0842057, 0.00256}

0, Down, 8.66025, Up

Plot[f[x], {x, 0, 10}]

[Graphics:HTMLFiles/index_84.gif]

⁃Graphics⁃


Created by Mathematica  (June 15, 2005)