Free preview

146 lessons

Essential Calculus for ML

Free preview

Essential Calculus for ML · 146 lessons

Master the fundamentals

No surprise gaps

Actually remember it

Skip what you know

One subscription. All learning paths included.

Our content is best on a larger screen

Concavity and inflection points

Concave up and concave down

Explanation

A graph can rise while bending upwards, or rise while bending downwards. We can distinguish between the cases by where the graph lies relative to its tangent lines. We call this concavity.

Concave up and concave down

Definition

On an interval, ff is concave up if its graph lies above each of its tangent lines, and concave down if its graph lies below each of its tangent lines.

1234−1−2−3−41234−1−2−3−4
Drag the red point along the curve and watch the tangent line, and its slope, change.
The graph lies above every tangent line, so the tangent stays below the curve. As the point moves left to right, the slope increases. The function is concave up.
tangent slope = 0.96

We cannot test the graph against every one of its tangent lines directly, so we work from ff'' instead. Since ff'' is the derivative of ff', its sign tells us whether ff' is rising or falling, just as the sign of ff' tells us whether ff is rising or falling.

Where the graph is concave up, the tangent slope increases from left to right, moving from negative through zero to positive, so ff' is rising and f>0f'' > 0. Where it is concave down, the slope decreases from left to right, so ff' is falling and f<0f'' < 0.

We find the concave-up and concave-down intervals the same way we found where ff is increasing or decreasing: test the sign of the derivative on each interval between the points where it is zero. Only now the derivative is ff''.

Determining concavity

Procedure

  1. Differentiate ff to get ff', then differentiate ff' to get ff''.
  2. Solve the inequality f>0f'' > 0 for xx to find where ff is concave up.
  3. Solve f<0f'' < 0 for xx to find where ff is concave down.

When ff'' is linear, each of these is a linear inequality and each solution is a single unbounded interval. To name the concavity at one particular value of xx, we evaluate ff'' there and read its sign.

Example

Find where f(x)=x36x2+5xf(x) = x^3 - 6x^2 + 5x is concave up and where it is concave down.

Solution

  1. We differentiate ff to get ff', then differentiate ff' to get ff''.

    f(x)=3x212x+5f(x)=6x12\begin{align*} f'(x) &= 3x^2 - 12x + 5 \\ f''(x) &= 6x - 12 \end{align*}
  2. We solve f>0f'' > 0 for the values of xx where ff is concave up.

    6x12>06x>12x>2\begin{align*} 6x - 12 &> 0 \\ 6x &> 12 \\ x &> 2 \end{align*}

    So ff is concave up on (2,)(2, \infty).

  3. We solve f<0f'' < 0 for the values of xx where ff is concave down. The same rearrangement with the inequality reversed gives x<2x < 2, so ff is concave down on (,2)(-\infty, 2).

The graph below shows the change of concavity at x=2x = 2, from concave down to concave up.

12345−12−2−4−6−8−10−12−14
f
For x<2 the graph bends downward, so it is concave down. The concavity changes at x=2, and for x>2 it bends upward, so it is concave up.

Practice questions

4 questions

Where is f(x)=x39x2+2x+1f(x) = x^3 - 9x^2 + 2x + 1 concave up, and where is it concave down?

Select the correct answer:

+ 3 more questions

Inflection points

Explanation

We have found the intervals where a curve is concave up and where it is concave down. The point that separates them, where the concavity changes, is an inflection point.

Inflection point

Definition

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

At such a point the tangent line crosses the curve: the graph lies on one side of the tangent just before the point and on the other side just after.

1234−1−2−3−41234−1−2−3−4
f
Concave down to the left of the inflection point, concave up to the right. The tangent crosses the curve where the concavity changes.

Since ff is concave up where f>0f'' > 0 and concave down where f<0f'' < 0, an inflection point is a point where ff'' changes sign. To change sign, ff'' must pass through zero, so f(c)=0f''(c) = 0 at every inflection point cc.

Solving f(x)=0f''(x) = 0 gives the candidates, but f(c)=0f''(c) = 0 on its own is not enough: ff'' can reach zero and keep the same sign on both sides, so the concavity does not change and the candidate is not an inflection point. As with any sign analysis, we confirm each candidate by checking the sign of ff'' on both sides, and only a genuine change of sign marks an inflection point.

Locating inflection points

Procedure

  1. Differentiate ff to get ff', then differentiate ff' to get ff''.
  2. Solve f(x)=0f''(x) = 0. Each solution is a candidate.
  3. Evaluate ff'' at a value on each side of the candidate.
  4. If the two signs differ, the candidate is an inflection point. If they agree, it is not.

Example

Find the inflection points of f(x)=x33x2+5xf(x) = x^3 - 3x^2 + 5x.

Solution

  1. We differentiate ff to get ff', then differentiate ff' to get ff''.

    f(x)=3x26x+5f(x)=6x6\begin{align*} f'(x) &= 3x^2 - 6x + 5 \\ f''(x) &= 6x - 6 \end{align*}
  2. We solve f(x)=0f''(x) = 0 to find the candidates.

    6x6=0x=1\begin{align*} 6x - 6 &= 0 \\ x &= 1 \end{align*}

    So x=1x = 1 is the only candidate.

  3. We evaluate ff'' at a value on each side of x=1x = 1, taking x=0x = 0 and x=2x = 2. Here ff'' is linear, so it keeps one sign on each side of the candidate and any test value in the interval gives that sign.

    f(0)=6(0)6=6f(2)=6(2)6=6\begin{align*} f''(0) &= 6(0) - 6 = -6 \\ f''(2) &= 6(2) - 6 = 6 \end{align*}
  4. The signs differ, so the concavity changes at x=1x = 1: concave down to the left, concave up to the right. The candidate is an inflection point. Its height is f(1)=13+5=3f(1) = 1 - 3 + 5 = 3, so the inflection point is (1,3)(1, 3).

Practice questions

4 questions

Where does f(x)=x39x2+24xf(x) = x^3 - 9x^2 + 24x have an inflection point?

Select the correct answer:

+ 3 more questions