Skip to main content
Mathematics LibreTexts

3.4: The Second Derivative and the Shape of f

  • Page ID
    212025
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    The first derivative of a function provides information about the shape of the function, so the second derivative of a function provides information about the shape of the first derivative, which in turn will provide additional information about the shape of the original function \(f\).

    In this section we investigate how to use the second derivative (and the shape of the first derivative) to reach conclusions about the shape of the original function. The first derivative tells us whether the graph of \(f\) is increasing or decreasing. The second derivative will tell us about the “concavity” of \(f\): whether \(f\) is curving upward or downward.

    Concavity

    Graphically, a function is concave up if its graph is curved with the opening upward:

    A red, increasing curve that becomes steeper moving from left to right. Three black arrows point from the curve up and to the left. A caption reads 'concave up.'

    Similarly, a function is concave down if its graph opens downward:

    A red, increasing curve that becomes less steep moving from left to right. Three black arrows point from the curve down and to the right. A caption reads 'concave down.'

    The concavity of a function can be important in applied problems and can even affect billion-dollar decisions.

    An Epidemic: Suppose you, as an official at the CDC, must decide whether current methods are effectively fighting the spread of a disease — or whether more drastic measures are required. In the figure below:

    Two graphs. The one on the left features a concave-down curve that begins solid black and changes to dashed red at an input labeled 'now.' A blue line segment labeled 'tangent' is above and tangent to the curve at that point. The graph on the right features a concave-up curve that begins solid black and changes to dashed red at an input labeled 'now.' A blue line segment labeled 'tangent' is below and tangent to the curve at that point.

    \(f(x)\) represents the number of people infected with the disease at time \(x\) in two different situations. In both cases the number of people with the disease, \(f(\mbox{now})\), and the rate at which new people are getting sick, \(f'(\mbox{now})\), are the same. The difference is the concavity of \(f\), and that difference might have a big effect on your decision. In (a), \(f\) is concave down at “now,” and it appears that the current methods are starting to bring the epidemic under control; in (b), \(f\) is concave up, and it appears that the epidemic is growing out of control.

    Usually it is easy to determine the concavity of a function by examining its graph, but we also need a definition that does not require a graph of the function, a definition we can apply to a function described by a formula alone.

    Definition

    Let \(f\) be a differentiable function.

    • \(f\) is concave up at \(a\) if the graph of \(f\) is above the tangent line \(L\) to \(f\) for all \(x\) close to (but not equal to) \(a\):\[f(x) > L(x) = f(a) + f'(a)(x - a)\nonumber\]
    • \(f\) is concave down at \(a\) if the graph of \(f\) is below the tangent line \(L\) to \(f\) for all \(x\) close to (but not equal to) \(a\):\[f(x) < L(x) = f(a) + f'(a)(x - a)\nonumber\]

    The figure below shows the concavity of a function at several points:

    A blue curve labeled 'y=f(x)' begins one the left with a U shape, transitions to an upside-down U shape at a vertical dashed-black line, then transitions back to a U shape at a second dashed vertical line. The first and third segements of the curve are labeled 'concave up' and have arrows above the curve pointing away from the curve; the middle segment is labeled 'concave down' and has arrows pointing down and away from the curve.

    The next theorem provides an easily applied test for the concavity of a function given by a formula.

    The Second Derivative Condition for Concavity

    Let \(f\) be a twice differentiable function on an interval \(I\).

    1. \(f''(x) > 0\) on \(I \ \Rightarrow \ f'(x)\) increasing on \(I \ \Rightarrow \ f\) concave up on \(I\)
    2. \(f''(x) < 0\) on \(I \ \Rightarrow \ f'(x)\) decreasing on \(I \ \Rightarrow \ f\) concave down on \(I\)
    3. \(f''(a) = 0 \ \Rightarrow\) no information (\(f(x)\) may be concave up or concave down or neither at \(a\))
    Proof
    1. Assume that \(f''(x) > 0\) for all \(x\) in \(I\), and let \(a\) be any point in \(I\). We want to show that \(f\) is concave up at \(a\), so we need to prove that the graph of \(f\):
      An increasing, concave-up segment of red curve in the first quadrant labeled 'f(x)' ith a blue line segment labeled 'L(x)' below the curve and touching it at just one point.
      is above the tangent line to \(f\) at \(a\): \(f(x) > L(x) = f(a) + f'(a)(x-a)\) for \(x\) close to \(a\). Assume that \(x\) is in \(I\) and apply the Mean Value Theorem to \(f\) on the interval with endpoints \(a\) and \(x\): there is a number \(c\) between \(a\) and \(x\) so that\[f'(c) = \frac{f(x) - f(a)}{x - a} \ \Rightarrow f(x) = f(a) + f'(c)(x-a)\nonumber\]Because \(f'' > 0\) on \(I\), we know that \(f'' > 0\) between \(a\) and \(x\), so the Second Shape Theorem tells us that \(f'\) is increasing between \(a\) and \(x\). We will consider two cases: \(x > a\) and \(x < a\).
      • If \(x > a\) then \(x-a > 0\) and \(c\) is in the interval \([a,x]\) so \(a < c\). Because \(f'\) is increasing, \(a < c \Rightarrow f'(a) < f'(c)\). Multiplying each side of this last inequality by the positive quantity \(x-a\) yields \(f'(a)(x-a) < f'(c)(x-a)\). Adding \(f(a)\) to each side of this last inequality, we have:\[L(x) = f(a) + f '(a)(x-a) < f(a) + f '(c)(x-a) = f(x)\nonumber\]
      • If \(x < a\) then \(x-a < 0\) and \(c\) is in the interval \([x,a]\) so \(c < a\). Because \(f'\) is increasing, \(c < a \Rightarrow f'(c) < f'(a)\). Multiplying each side of this last inequality by the negative quantity \(x-a\) yields \(f'(c)(x-a) > f '(a)(x-a)\) so:\[f(x) = f(a) + f '(c)(x-a) > f(a) + f '(a)(x-a) = L(x)\nonumber\]
      In each case we see that \(f(x)\) is above the tangent line \(L(x)\).
    2. The proof of this part is similar.
    3. Let \(f(x) = x^4\), \(g(x) = -x^4\) and \(h(x) = x^3\):
      Three graphs of red curves with a blue dot at the origin. The leftmost graph is of 'f(x)=x^4'; an arrow points to the blue dot with the label 'concave up at (0,0).' The middle graph is of 'f(x)=-x^4'; an arrow points to the blue dot with the label 'concave down at (0,0).' The rightmost graph is of 'f(x)=x^3'; an arrow points to the blue dot with the label 'not concave up, not concave down at (0,0).'
      The second derivative of each of these functions is zero at \(a = 0\), and at \((0,0)\) they all have the same tangent line: \(L(x) = 0\) (the \(x\)-axis). However, at \((0,0)\) they all have different concavity: \(f\) is concave up, while \(g\) is concave down and \(h\) is neither concave up nor concave down.
    Practice \(\PageIndex{1}\)

    Use the graph of \(f\) below:

    The graph of a red curve labeled 'y=f(x)' on a grid from x = 0 to x = 4.5 with black dots on the curve at x = 1, 2, 3 and 4, along with black line segments tangent to the curve at each of those four dots. The curve begins near x = 0.2 at a positive value and increased in a concave-down shape to a peak near x = 1., then transitions to concave up near x = 2.2, passes through (2.5,0), reaches a low point near x = 3.3, transitions to concave down near x = 3/6, and reaches a negative peak at x = 4.

    to finish filling in the table with “\(+\)” for positive, “\(-\)” for negative or “\(0\).”

    \(x\) \(f(x)\) \(f'(x)\) \(f''(x)\) concavity
    \(1\) \(+\) \(+\) \(-\) down
    \(2\) \(+\)      
    \(3\) \(-\)      
    \(4\)        

    Answer
    copy of previous table with blanks filled in
    \(x\) \(f(x)\) \(f'(x)\) \(f''(x)\) concavity
    \(1\) \(+\) \(+\) \(-\) down
    \(2\) \(+\) \(-\) \(-\) down
    \(3\) \(-\) \(-\) \(+\) up
    \(4\) \(-\) \(0\) \(-\) down

    “Feeling” the Second Derivative

    Earlier we saw that if a function \(f(t)\) represents the position of a car at time \(t\), then \(f'(t)\) gives the velocity and \(f''(t)\) the acceleration of the car at the instant \(t\).

    If we are driving along a straight, smooth road, then what we feel is the acceleration of the car:

    • a large positive acceleration feels like a “push” toward the back of the car
    • a large negative acceleration (a deceleration) feels like a “push” toward the front of the car
    • an acceleration of \(0\) for a period of time means the velocity is constant and we do not feel pushed in either direction

    In a moving vehicle it is possible to measure these “pushes,” the acceleration, and from that information to determine the velocity of the vehicle, and from the velocity information to determine the position. Inertial guidance systems in airplanes use this tactic: they measure front–back, left–right and up–down acceleration several times a second and then calculate the position of the plane. They also use computers to keep track of time and the rotation of the earth under the plane. After all, in six hours the Earth has made a quarter of a revolution, and Dallas has rotated more than 5,000 miles!

    Example \(\PageIndex{1}\)

    The upward acceleration of a rocket was \(a(t) = 30\) m/sec\(^2\) during the first six seconds of flight, \(0 \leq t \leq 6\). The velocity of the rocket at \(t=0\) was \(0\) m/sec and the height of the rocket above the ground at \(t=0\) was 25 m. Find a formula for the height of the rocket at time \(t\) and determine the height at \(t = 6\) seconds.

    Solution

    \(v'(t) = a(t) = 30 \Rightarrow v(t) = 30t + K\) for some constant K. We also know \(v(0) = 0\) so \(30(0) + K = 0 \Rightarrow K = 0\) and this \(v(t) = 30t\).

    Similarly, \(h'(t) = v(t) = 30t \Rightarrow h(t) = 15t^2 + C\) for some constant \(C\). We know that \(h(0) = 25\) so \(15(0)^2 + C = 25 \Rightarrow C = 25\). Thus \(h(t) = 15t^2 + 25\) so \(h(6) = 15(6)^2 + 25 = 565\) m.

    \(f''\) and Extreme Values of \(f\)

    The concavity of a function can also help us determine whether a critical point is a maximum or minimum or neither. For example, if a point is at the bottom of a concave-up function then that point is a minimum.

    Two parabola-shaped red curves opening upward. Each has a blue dot at its vertex, located where the input is c, labeled 'min.' A caption reads: f'(c)=0, f''(c)0." class="internal default" style="width: 242px; height: 208px;" width="242px" height="208px" src="/@api/deki/files/140445/fig304_7.png">

    The Second Derivative Test for Extremes

    Let \(f\) be a twice differentiable function.

    1. If \(f'(c) = 0\) and \(f''(c) < 0\) then \(f\) is concave down and has a local maximum at \(x = c\).
    2. If \(f'(c) = 0\) and \(f''(c) > 0\) then \(f\) is concave up and has a local minimum at \(x = c\).
    3. If \(f'(c) = 0\) and \(f''(c) = 0\) then \(f\) may have a local maximum, a local minimum or neither at \(x = c\).
    Proof
    1. Assume that \(f'(c) = 0\). If \(f''(c) < 0\) then \(f\) is concave down at \(x = c\) so the graph of \(f\) will be below the tangent line \(L(x)\) for values of \(x\) near \(c\). The tangent line, however, is given by \(L(x) = f(c) + f '(c) (x - c) = f(c) + 0 (x - c) = f(c)\), so if \(x\) is close to \(c\) then \(f(x) < L(x) = f(c)\) and \(f\) has a local maximum at \(x = c\).
    2. The proof for a local minimum of \(f\) is similar.
    3. If \(f'(c) = 0\) and \(f''(c) = 0\), then we cannot immediately conclude anything about local maximums or minimums of \(f\) at \(x = c\). The functions \(f(x) = x^4\), \(g(x) = -x^4\) and \(h(x) = x^3\) all have their first and second derivatives equal to zero at \(x = 0\), but \(f\) has a local minimum at \(0\), \(g\) has a local maximum at \(0\), and \(h\) has neither a local maximum nor a local minimum at \(x = 0\).

    The Second Derivative Test for Extremes is very useful when \(f''\) is easy to calculate and evaluate. Sometimes, however, the First Derivative Test — or simply a graph of the function — provides an easier way to determine if the function has a local maximum or a local minimum: it depends on the function and on which tools you have available.

    Practice \(\PageIndex{2}\)

    \(f(x) = 2x^3- 15x^2 + 24x - 7\) has critical numbers \(x = 1\) and \(x = 4\). Use the Second Derivative Test for Extremes to determine whether \(f(1)\) and \(f(4)\) are maximums or minimums or neither.

    Answer

    \(f'(x) = 6x^2- 30x + 24\), which is defined for all \(x\).

    \(f'(x) = 0\) if \(x = 1\) or \(x = 4\) (critical values).

    \(f''(x) = 12x - 30\) so \(f''(1) = -18 < 0\) tells us that \(f\) is concave down at the critical value \(x = 1\), so \((1, f(1)) = (1,4)\) is a relative maximum; and \(f''(4) = 18 > 0 \) tells us that \(f\) is concave up at the critical value \(x = 4\), so \((4, f(4)) = (4, -23)\) is a relative minimum. A graph of \(f\) appears below:

    A red graph of f(x) = 2x^3- 15x^2 + 24x - 7 on a [-1,6]X[-40,30] grid with a peak at (1,4) labeled as 'local max' and low point at (4,-23) labeled as 'local min.'

    Inflection Points

    Maximums and minimums typically occur at places where the second derivative of a function is positive or negative, but the places where the second derivative is \(0\) are also of interest.

    Definition

    An inflection point is a point on the graph of a function where the concavity of the function changes, from concave up to concave down or from concave down to concave up.

    Practice \(\PageIndex{3}\)

    Which of the labeled points in the figure below are inflection points?

    A blue curve has 8 red dots on the curve, labeled a, b, c, d, e, f, g, and h from left to right. The curve is initially concave up with a at a low point, b at a point that transitions to concave down, c at a peak, d at a point lower than c but above e, where here is a sharp cusp, after which the curve is also concave down with a peak at f, then transitions to convave up at g and reaches a low point at h.

    Answer

    The points labeled b and g are inflection points.

    To find the inflection points of a function we can use the second derivative of the function. If \(f''(x) > 0\), then the graph of \(f\) is concave up at the point \((x, f(x))\) so \((x, f(x))\) is not an inflection point. Similarly, if \(f''(x) < 0\) then the graph of \(f\) is concave down at the point \((x,f(x))\) and the point is not an inflection point. The only points left that can possibly be inflection points are the places where \(f''(x) = 0\) or where \(f''(x)\) does not exist (in other words, where \(f'\) is not differentiable). To find the inflection points of a function we need only check the points where \(f''(x)\) is \(0\) or undefined. If \(f''(c) = 0\) or is undefined, then the point \((c,f(c))\) may or may not be an inflection point — we need to check the concavity of \(f\) on each side of \(x = c\). The functions in the next example illustrate what can happen at such a point.

    Example \(\PageIndex{2}\)

    Let \(f(x) = x^3\), \(g(x) = x^4\) and \(h(x) = \sqrt[3]{x}\).

    Three graphs of red curves, each with a blue dot at the origin: f(x) = x^3, g(x) = x^4 and h(x0 = x^(1/3).

    For which of these functions is the point \((0,0)\) an inflection point?

    Solution

    Graphically, it is clear that the concavity of \(f(x) = x^3\) and \(h(x) = \sqrt[3]{x}\) changes at \((0,0)\), so \((0,0)\) is an inflection point for \(f\) and \(h\). The function \(g(x) = x^4\) is concave up everywhere, so \((0,0)\) is not an inflection point of \(g\).

    \(f(x) = x^3 \Rightarrow f'(x) = 3x^2 \Rightarrow f''(x) = 6x\) so the only point at which \(f''(x) = 0\) or is undefined (\(f'\) is not differentiable) is at \(x = 0\). If \(x < 0\) then \(f''(x) < 0\) so \(f\) is concave down; if \(x > 0\) then \(f''(x) > 0\) so f is concave up. Thus at \(x = 0\) the concavity of \(f\) changes so the point \((0,f(0)) = (0,0)\) is an inflection point of \(f(x) = x^3\).

    \(g(x) = x^4 \Rightarrow g'(x) = 4x^3 \Rightarrow g''(x) = 12x^2\) so the only point at which \(g''(x) = 0\) or is undefined is at \(x = 0\). But \(g''(x) > 0\) (so \(g\) is concave up) for any \(x \neq 0\). Thus the concavity of \(g\) never changes, so the point \((0, g(0)) = (0,0)\) is not an inflection point of \(g(x) = x^4\).

    \(\displaystyle h(x) = \sqrt[3]{x} = x^{\frac13} \Rightarrow h '(x) = \frac13 x^{-\frac23} \Rightarrow h''(x) = -\frac29 x^{-\frac53}\) so \(h''\) is not defined if \(x = 0\) (and \(h''(x) \neq 0\) elsewhere); \(h''(\mbox{negative number}) > 0\) and \(h''(\mbox{positive number}) < 0\), so \(h\) changes concavity at \((0,0)\) and \((0,0)\) is an inflection point of \(h(x) = \sqrt[3]{x}\).

    Practice \(\PageIndex{4}\)

    Find all inflection points of \(f(x) = x^4- 12x^3 + 30x^2 + 5x - 7\).

    Answer

    \(f'(x) = 4x^3 - 36x^2 + 60x + 5 \Rightarrow f''(x) = 12x^2- 72x + 60 = 12(x^2- 6x + 5) =\) \(12(x - 1)(x - 5)\) so the only candidates to be inflection points are \(x = 1\) and \(x = 5\).

    • If \(x < 1\) then \(f''(x) = 12(\mbox{neg})(\mbox{neg}) > 0\)
    • If \(1 < x < 5\) then \(f''(x) = 12(\mbox{pos})(\mbox{neg}) < 0\)
    • If \(5 < x\) then \(f''(x) = 12(\mbox{pos})(\mbox{pos}) >0\)

    \(f\) changes concavity at \(x = 1\) and \(x = 5\), so \(x = 1\) and \(x = 5\) are both inflection points. A graph of \(f\) appears below:

    Blue graph of f(x) = x^4- 12x^3 + 30x^2 + 5x - 7 on [-2,9]X[-200,200] grid with dashed-black vertical lines at x = 1 and x = 5. The region on the left is labeled f'0, f concave up; the middle region f'<0, f concave down, and the region on the right f'>0, f concave up." class="internal default" style="width: 384px; height: 441px;" width="384px" height="441px" src="/@api/deki/files/140464/fig304_19.png">

    Example \(\PageIndex{3}\)

    Sketch a graph of a function with \(f(2) = 3\), \(f'(2) = 1\) and an inflection point at \((2,3)\).

    Solution

    Two solutions appear below:

    Two graphs, each of a red curve with a black dot at (2,3) and a blue line segment tangent to the curve at that point. The left graph is increasing and concave down to the left of the black dot and concave up and increassing to the right of the black dot. The right graph is concave up to the left of the black dot, first decreasing to a low point then increasing slightly; to the right of the black dot it is concave down, continuing to increase until it reaches a peak, then descreasing. In both cases the blue tangent line segment passes through the red curve.

    Using \(f'\) and \(f''\) to Graph \(f\)

    Today you can easily graph most functions of interest using a graphing calculator — and create even nicer graphs using an app on your phone or a Web-based graphing utility. Earlier generations of calculus students did not have these tools, so they relied on calculus to help them draw graphs of unfamiliar functions by hand. While you can create a graph in seconds that your predecessors may have labored over for half an hour or longer, you can still use calculus to help you select an appropriate graphing “window,” and to be confident that your window has not missed any points of interest on the graph of a function.

    Example \(\PageIndex{4}\)

    Create a graph of \(\displaystyle f(x) = xe^{-9x^2}\) that shows all local and global extrema and all inflection points.

    Solution

    If you graph \(f(x)\) on a calculator using the standard window (\(-10 \leq x \leq 10\) and \(-10\leq y \leq 10\)) you will likely see nothing other than the coordinate axes:

    A calculator screen that is empty except for a coordinate grid centered at the origin.

    You might consult a table of values for the function to help adjust the window, but this trial-and-error technique will still not guarantee that you have displayed all points of interest. Computing the first derivative of \(f\), we get:\[f'(x) = x\left[-18x e^{-9x^2}\right] + e^{-9x^2} \cdot 1 = \left[1-18x^2\right]e^{-9x^2}\nonumber\]which is defined for all values of \(x\); \(f'(x) = 0 \Rightarrow 1-18x^2 = 0 \Rightarrow x^2 = \frac{1}{18} \Rightarrow x = \pm \frac{1}{3\sqrt{2}}\), so the only critical numbers are \(x = -\frac{1}{3\sqrt{2}}\) and \(x = \frac{1}{3\sqrt{2}}\). Computing the second derivative of \(f\), we get:
    \begin{align*}f''(x) &= \left[1-18x^2\right]\cdot \left[-18x e^{-9x^2}\right] + e^{-9x^2}\cdot\left[-36x\right] \\
    &= \left[324x^3-54x\right]e^{-9x^2} = 54x\left[6x^2-1\right]e^{-9x^2}\end{align*}
    We can check that \(f''\left(-\frac{1}{3\sqrt{2}}\right) = 12\sqrt{\frac{2}{e}} > 0\), so \(f\) must have a local minimum at \(x = -\frac{1}{3\sqrt{2}}\); similarly, \(f''\left(\frac{1}{3\sqrt{2}}\right) = -12\sqrt{\frac{2}{e}} < 0\), so \(f\) must have a local maximum at \(x = \frac{1}{3\sqrt{2}}\).

    Furthermore, \(f''(x) = 0\) only when \(x = 0\) or when \(6x^2-1 = 0 \Rightarrow x = \pm \frac{1}{\sqrt{6}}\), so these three values are candidates for locations of inflection points of \(f\). Noting that:\[-1 < -\frac{1}{\sqrt{6}} < -\frac{1}{3\sqrt{2}} < 0 < \frac{1}{3\sqrt{2}} < \frac{1}{\sqrt{6}} < 1\nonumber\]and that \(f''(-1) = -270e^{-9} < 0\) and \(f''\left(-\frac{1}{3\sqrt{2}}\right) = 12\sqrt{\frac{2}{e}} > 0\), we observe that \(f\) is concave down to the left of \(x = -\frac{1}{\sqrt{6}}\) and concave up to the right of \(x = -\frac{1}{\sqrt{6}}\), so \(f\) does in fact have an inflection point at \(x = -\frac{1}{\sqrt{6}}\). Likewise, \(f''\left(\frac{1}{3\sqrt{2}}\right) = -12\sqrt{\frac{2}{e}} < 0\) and \(f''(1) = 270e^{-9} > 0\), so \(f''(x)\) switches sign at \(x = 0\) and at \(x = \frac{1}{\sqrt{6}}\), and therefore \(f(x)\) changes concavity at those points as well.

    We have now identified two local extrema of \(f\) and three inflection points of \(f\). Equally important, we have used calculus to show that these five points of interest are the only places where extrema or inflection points can occur. If we create a graph of \(f\) that includes these five points, our graph is guaranteed to include all &ldquo;interesting&rdquo; features of the graph of \(f\). A window with \(-1 \leq x \leq 1\) and \(-0.2 < y < 0.2\) (because the local extreme values are \(f\left(\pm \frac{1}{2\sqrt{3}} \right) \approx \pm 0.14\)) should provide a graph:

    A calculator screen with a coordinate grid centered at the origin and a graph of the function f(x) = xe^{-9x^2}, which dips down to a low point, increases through the origin and then reaches a peak.

    that includes all five points of interest.

    Practice \(\PageIndex{5}\)

    Compute the first and second derivatives of the function \(g(x) = x^4+4x^3-90x^2+13\), locate all extrema and inflection points of \(g(x)\), and create a graph of \(g(x)\) that shows these points of interest.

    Answer

    \(g(x) = x^4+4x^3-90x^2+13 \Rightarrow g'(x) = 4x^3+12x^2-180x \Rightarrow g''(x) = 12x^2+24x-180\); because \(g'(x)\) and \(g''(x)\) are polynomials, they exist everywhere. The critical numbers for \(g(x)\) occur where \(g'(x) = 0 \Rightarrow 4x^3+12x^2-180x = 4x(x^2+3x-45) = 4x(x+9)(x-5) = 0 \Rightarrow x = -9\), \(x= 0\) or \(x = 5\). Using the Second Derivative Test: \(g''(-9) = 576 > 0\), so \(g(x)\) has a local minimum at \(x = -9\); \(g''(0) = -180 < 0\), so \(g(x)\) has a local maximum at \(x = 0\); and \(g''(5) = 240 > 0\), so \(g(x)\) has a local minimum at \(x = 5\).

    Candidates for inflection points occur where \(g''(x) = 0\):
    \begin{align*}12x^2+24x-180 &= 12(x^2+2x-15) = 12(x-3)(x+5) = 0 \\
    &\Rightarrow x = -5 \mbox{ or } x = 3\end{align*}
    Observing that \(g''(x) > 0\) for \(x < -5\), \(g''(x) < 0\) for \(-5 < x < 3\) and \(g''(x) > 0\) for \(x > 3\) confirms that both candidates are in fact inflection points. A graphing window with \(-12 \leq x \leq 8\) (this is only one reasonable possibility) should include all points of interest. Checking that \(g(-9) = -3632\), \(g(0) = 13\) and \(g(5) = -1112\) suggests that a graphing window with \(-4000 \leq y \leq 1000\) should work:

    FIGURE

    Even with calculus, we will typically need calculators or computers to help solve the equations \(f'(x) = 0\) and \(f''(x) = 0\) that we use to find critical numbers and candidates for inflection points.

    Note

    Most problems in calculus textbooks are set up to make solving these equations relatively straightforward, but in general this will not be the case.

    Problems

    In Problems 1–2, each statement describes a quantity \(f(t)\) changing over time. For each statement, tell what \(f\) represents and whether the first and second derivatives of \(f\) are positive or negative.

      1. “Unemployment rose again, but the rate of increase is smaller than last month.”
      2. “Our profits declined again, but at a slower rate than last month.”
      3. “The population is still rising and at a faster rate than last year.”
      1. “The child's temperature is still rising, but more slowly than it was a few hours ago.”
      2. “The number of whales is decreasing, but at a slower rate than last year.”
      3. “The number of people with the flu is rising and at a faster rate than last month.”
    1. Sketch the graphs of functions that are defined and concave up everywhere and have exactly:
      1. no roots.
      2. 1 root.
      3. 2 roots.
      4. 3 roots.
    2. On which intervals is the function graphed below:
      A blue curve in the first quadrant with dashed-black vertical lines at x = 1, 2, 3, 4, 5, 6 and 7. The curve increases in an inverted U shape from x = 0 to x = 2, descends through x = 3 (where is transitions to a U shape), reaches a low point at x = 5, then increases.
      1. concave up?
      2. concave down?
    3. On which intervals is the function graphed below:
      A red curve in the first quadrant with dashed-black vertical lines at x = 1, 2, 3, 4, 5, 6, 7, 8 and 9. The curve begins with a U shape, reaching a low point at x = 1, before increasing to a cusp at x = 2, then decreasing in another U shape with a low point at x = 3, transitions to an inverted U shape at x = 4, reaches a peak at x = 5, decreases through x = 6 (where it transitions to a U shape, reaches a low point near x =7, then increases.
      1. concave up?
      2. concave down?

    Problems 6–10 give a function and values of \(x\) so that \(f'(x) = 0\). Use the Second Derivative Test to determine whether each point \((x, f(x))\) is a local maximum, a local minimum or neither.

    1. \(f(x) = 2x^3- 15x^2 + 6\); \(x = 0\), \(5\)
    2. \(g(x) = x^3- 3x^2- 9x + 7\); \(x = -1\), \(3\)
    3. \(h(x) = x^4- 8x^2- 2\); \(x = -2\), \(0\), \(2\)
    4. \(f(x) = \sin^5(x)\); \(x = \frac{\pi}{2}\), \(\pi\), \(\frac{3\pi}{2}\)
    5. \(f(x) = x\cdot\ln(x)\); \(x = \frac{1}{e}\)
    6. At which values of \(x\) labeled in the figure below:
      A blue curve has 6 red dots on the curve, labeled a, b, c, d, e and f from left to right. The curve is initially U-shaped with a at a low point, b just to the right, c at a peak of an inverted-U shaped, d at a cusp that transitions to a U shape, e at a transition to an inverted-U shape, and f at a peak.
      is the point \(( x, f(x) )\) an inflection point?
    7. At which values of \(x\) labeled in the figure below:
      A blue curve has 8 red dots on the curve, labeled a, b, c, d, e, f, g, and h from left to right. The curve is initially U-shaped with a at a low point, b at a point that transitions to an inverted U shape, c at a peak, d at a point where the curve transitions to a U shape, e at a low point, f at a cusp that corresponds to a peak, g at another low point of a U-shaped portion of the curve, and f at a point that transitions to an inverted U shape.
      is the point \(( x, g(x) )\) an inflection point?
    8. How many inflection points can a:
      1. quadratic polynomial have?
      2. cubic polynomial have?
      3. polynomial of degree \(n\) have?
    9. Fill in the table with “\(+\),” “\(-\),”or “\(0\)” for the function graphed below:
      A red curve above the horizontal axis with dashed-black vertical lines at x = 1, 2 and 3. The curve starts at a positive value near x = -0.2, increased in an inverted U shape, reaching a peak near x = 0.4, then decreases and transitions to a U shape near x = 0.7, reaching a low point at x = 2, then increasing before transitioning smoothly to a line segment with positive slope near x = 2.4.
      \(x\) \(f(x)\) \(f'(x)\) \(f''(x)\)
      \(0\)      
      \(1\)      
      \(2\)      
      \(3\)      
    10. Fill in the table with “\(+\),” “\(-\),”or “\(0\)” for the function graphed below:
      A quasi-sinusoidal blue curve that starts at a negative value near x = -0.6 with a U shape, reaches a low point near x = -0.4, then increases to cross the horizontal axis (and transition to an inverted U shape) near (1/3,0), reaches a leak at x = 1, then descends and tansitions to a U shape near x = 1.5, crosses the horizontal axis near x = 0.6, reaches a (negative) low point near x = 2.3, then rises through (3,0).
      \(x\) \(g(x)\) \(g'(x)\) \(g''(x)\)
      \(0\)      
      \(1\)      
      \(2\)      
      \(3\)      
    11. Sketch functions \(f\) for \(x\)-values near \(1\) so that \(f(1) = 2\) and:
      1. \(f'(1) >0\), \(f''(1) >0\)
      2. \(f'(1) >0\), \(f''(1) <0\)
      3. \(f'(1) <0\), \(f''(1) >0\)
      4. \(f'(1) >0\), \(f''(1) = 0\), \(f''(1^{-}) <0\), \(f''(1^{+}) >0\)
      5. \(f'(1) >0\), \(f''(1) = 0\), \(f''(1^{-}) >0\), \(f''(1^{+}) <0\)
    12. Some people like to think of a concave-up graph as one that will “hold water” and of a concave-down graph as one which will “spill water.” That description is accurate for a concave-down graph, but it can fail for a concave-up graph. Sketch the graph of a function that is concave up on an interval but will not “hold water.”
    13. The function \(\displaystyle f(x) = \frac{1}{2\pi} e^{-\frac{(x-c)^2}{2b^2}}\) defines the Gaussian distribution used extensively in statistics and probability; its graph:
      A symmetric, bell-shaped red curve labeled 'Gaussian distribution' and 'f(x) = 1/(2 pi) *  e^{-(x-c)^2/(2b^2)}' with an inverted-U–shaped peak at x = c that transitions to a U shape near x = c-b and x = c+b.
      is a “bell-shaped” curve.
      1. Show that \(f\) has a maximum at \(x = c\). (The value \(c\) is called the mean of this distribution.)
      2. Show that \(f\) has inflection points where \(x = c + b\) and \(x = c - b\). (The value \(b\) is called the standard deviation of this distribution.)

    In Problems 19–36, locate all critical numbers, local extrema and inflection points of the given function, and use these results to sketch a graph of the function showing all points of interest.

    1. \(f(x) = x^3-21x^2+144x-350\)
    2. \(\displaystyle g(x) = \frac16 x^3+x^2-\frac{45}{2}x+100\)
    3. \(f(x) = e^{7x}-5x\)
    4. \(g(x) = e^{7x}+5x\)
    5. \(f(x) = e^{-3x}+x\)
    6. \(g(x) = e^{-3x}-x\)
    7. \(f(x) = xe^{-3x}\)
    8. \(g(x) = xe^{5x}\)
    9. \(\displaystyle f(x) = x^{\frac43} - x^{\frac13}\)
    10. \(\displaystyle g(x) = 6x^{\frac43} +3x^{\frac13}\)
    11. \(\displaystyle f(x) = \ln\left(1+x^2\right)\)
    12. \(\displaystyle g(x) = \ln\left(x^2-6x+10\right)\)
    13. \(\displaystyle f(x) = \sqrt[3]{x^2+2x+2}\)
    14. \(\displaystyle g(x) = \sqrt{x^2+2x+2}\)
    15. \(\displaystyle f(x) = x^{\frac23}\left(1-x\right)^{\frac13}\)
    16. \(\displaystyle g(x) = x^{\frac13}\left(1-x\right)^{\frac23}\)
    17. \(f(\theta) = \sin(\theta)+\sin^2(\theta)\)
    18. \(g(\theta) = \cos(\theta)-\sin^2(\theta)\)

    This page titled 3.4: The Second Derivative and the Shape of f was last modified on Tue, 07 Jul 2026 16:35:57 GMT and is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Dale Hoffman, edited and updated by Jeff Eldridge.

    • Was this article helpful?