# concavity

## 2626 days ago by chrisphan

f = lambda x: sin(x) ddf = lambda x: -sin(x) fplot = plot(f, -pi, 0, rgbcolor=(0, 0.75, 0)) + plot(f, pi, 2*pi, rgbcolor=(0, 0.75, 0)) + plot(f, -2*pi, -pi, rgbcolor=(0.75, 0, 0)) + plot(f, 0, pi, rgbcolor=(0.75, 0, 0)) ddfplot = plot(ddf, -pi, 0, rgbcolor=(0, 0.75, 0)) + plot(ddf, pi, 2*pi, rgbcolor=(0, 0.75, 0)) + plot(ddf, -2*pi, -pi, rgbcolor=(0.75, 0, 0)) + plot(ddf, 0, pi, rgbcolor=(0.75, 0, 0)) html("<h1>Example 1</h1>Let $f(x) = \sin x$. Then $f''(x) = -\sin x$. Here is a graph of<br />$y = f''(x)$, showing where $f''(x) > 0$ (in green) and $f''(x) < 0$ (in red):") show(ddfplot) html("$f$ is concave up when $f''(x) > 0$ and concave down when $f''(x) < 0$.<br />Here is a graph of $y=f(x)$.") show(fplot) html("The inflection points are where $f''(x)$ changes sign, in this case<br />at every $x = \pi k$ for every integer $k$.")

# Example 1

Let f(x) = \sin x. Then f''(x) = -\sin x. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at every x = \pi k for every integer k.

# Example 1

Let f(x) = \sin x. Then f''(x) = -\sin x. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at every x = \pi k for every integer k.
f = lambda x: x^4 - 4*x^3 - 48*x^2 - 60*x + 150 ddf = lambda x: 12*x^2 - 24*x - 96 fplot = plot(f, -6, -2, rgbcolor=(0, 0.75, 0)) + plot(f, 4, 10, rgbcolor=(0, 0.75, 0)) + plot(f, -2, 4, rgbcolor=(0.75, 0, 0)) ddfplot = plot(ddf, -6, -2, rgbcolor=(0, 0.75, 0)) + plot(ddf, 4, 10, rgbcolor=(0, 0.75, 0)) + plot(ddf, -2, 4, rgbcolor=(0.75, 0, 0)) html("<h1>Example 2</h1>Let $f(x) = " + latex(f(x)) + "$. Then $f''(x) = " + latex(ddf(x)) + "$. Here is a graph of<br />$y = f''(x)$, showing where $f''(x) > 0$ (in green) and $f''(x) < 0$ (in red):") show(ddfplot) html("$f$ is concave up when $f''(x) > 0$ and concave down when $f''(x) < 0$.<br />Here is a graph of $y=f(x)$.") show(fplot) html("The inflection points are where $f''(x)$ changes sign, in this case<br />at $x = -2$ and $x = 4$.")

# Example 2

Let f(x) = x^{4} - 4 \, x^{3} - 48 \, x^{2} - 60 \, x + 150. Then f''(x) = 12 \, x^{2} - 24 \, x - 96. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = -2 and x = 4.

# Example 2

Let f(x) = x^{4} - 4 \, x^{3} - 48 \, x^{2} - 60 \, x + 150. Then f''(x) = 12 \, x^{2} - 24 \, x - 96. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = -2 and x = 4.
f = lambda x: 3*x^5 + 10*x^4 + 10*x^3 - 80*x + 25 ddf = lambda x: 60*x^3 + 120*x^2 + 60*x fplot = plot(f, 0, 2, rgbcolor=(0, 0.75, 0)) + plot(f, -3.5, 0, rgbcolor=(0.75, 0, 0)) ddfplot = plot(ddf, 0, 2, rgbcolor=(0, 0.75, 0)) + plot(ddf, -3.5, 0, rgbcolor=(0.75, 0, 0)) html("<h1>Example 3</h1>Let $f(x) = " + latex(f(x)) + "$. Then $f''(x) = " + latex(ddf(x)) + "$. Here is a graph of<br />$y = f''(x)$, showing where $f''(x) > 0$ (in green) and $f''(x) < 0$ (in red):") show(ddfplot, ymax=60, ymin=-20) html("$f$ is concave up when $f''(x) > 0$ and concave down when $f''(x) < 0$.<br />Here is a graph of $y=f(x)$.") show(fplot) html("The inflection points are where $f''(x)$ changes sign, in this case<br />at $x = 0$.")

# Example 3

Let f(x) = 3 \, x^{5} + 10 \, x^{4} + 10 \, x^{3} - 80 \, x + 25. Then f''(x) = 60 \, x^{3} + 120 \, x^{2} + 60 \, x. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = 0.

# Example 3

Let f(x) = 3 \, x^{5} + 10 \, x^{4} + 10 \, x^{3} - 80 \, x + 25. Then f''(x) = 60 \, x^{3} + 120 \, x^{2} + 60 \, x. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = 0.
f = lambda x: (4-x^2)*exp(x/2) ddf = lambda x: (-x^2/4 - 2*x - 1)*exp(x/2) a = -4 - 2*sqrt(3) b = -4 + 2*sqrt(3) fplot = plot(f, -15, a, rgbcolor=(0.75, 0, 0)) + plot(f, a, b, rgbcolor=(0, 0.75, 0)) + plot(f, b, 2.1, rgbcolor=(0.75, 0, 0)) ddfplot = plot(ddf, -15, a, rgbcolor=(0.75, 0, 0)) + plot(ddf, a, b, rgbcolor=(0, 0.75, 0)) + plot(ddf, b, 2.1, rgbcolor=(0.75, 0, 0)) html("<h1>Example 4</h1>Let $f(x) = (4-x^2)e^{x/2}$. Then $f''(x) = (-x^2/4 - 2x -1)e^{x/2}$. Here is a graph of<br />$y = f''(x)$, showing where $f''(x) > 0$ (in green) and $f''(x) < 0$ (in red):") show(ddfplot, ymin=-1.5) html("$f$ is concave up when $f''(x) > 0$ and concave down when $f''(x) < 0$.<br />Here is a graph of $y=f(x)$.") show(fplot) html("The inflection points are where $f''(x)$ changes sign, in this case<br />at $x = "+ latex(a)+ "$ and $x = " + latex(b) + "$.")

# Example 4

Let f(x) = (4-x^2)e^{x/2}. Then f''(x) = (-x^2/4 - 2x -1)e^{x/2}. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = -2 \, \sqrt{3} - 4 and x = 2 \, \sqrt{3} - 4.

# Example 4

Let f(x) = (4-x^2)e^{x/2}. Then f''(x) = (-x^2/4 - 2x -1)e^{x/2}. Here is a graph of
y = f''(x), showing where f''(x) > 0 (in green) and f''(x) < 0 (in red):
f is concave up when f''(x) > 0 and concave down when f''(x) < 0.
Here is a graph of y=f(x).
The inflection points are where f''(x) changes sign, in this case
at x = -2 \, \sqrt{3} - 4 and x = 2 \, \sqrt{3} - 4.