# second deriv test and graph sketching

## 2780 days ago by chrisphan

html("<h1>Example 1 (Second derivative test)</h1>Let $f(x) = (x^2 - 3x - 3)e^x$. Then $f'(x) = (x^2 - x - 6)e^x$,<br />and $f''(x) = (x^2 + x - 7)e^x$. The critical points are at $x= -2$ and $x = 3$.<br />Note that $f''(-2) = -5 e^{-2} < 0$ and $f''(3) = 5e^3 > 0$.<br /> So $f$ has a local max at $x =-2$ and a local min at $x = 3$.") plot(lambda x:(x^2 - 3*x - 3)*exp(x), -5, 4, ymax=10)

# Example 1 (Second derivative test)

Let f(x) = (x^2 - 3x - 3)e^x. Then f'(x) = (x^2 - x - 6)e^x,
and f''(x) = (x^2 + x - 7)e^x. The critical points are at x= -2 and x = 3.
Note that f''(-2) = -5 e^{-2} < 0 and f''(3) = 5e^3 > 0.
So f has a local max at x =-2 and a local min at x = 3.

# Example 1 (Second derivative test)

Let f(x) = (x^2 - 3x - 3)e^x. Then f'(x) = (x^2 - x - 6)e^x,
and f''(x) = (x^2 + x - 7)e^x. The critical points are at x= -2 and x = 3.
Note that f''(-2) = -5 e^{-2} < 0 and f''(3) = 5e^3 > 0.
So f has a local max at x =-2 and a local min at x = 3.

html("<h1>Example 2 (Second derivative test)</h1>Let $f(x) = 3x^5 + 5x^4$. Then $f'(x) = 15x^4 + 20x^3 = 5x^3(3x+ 4)$,<br />and $f''(x) = 60x^3 + 60 x^2$. The critical points are at $x= 0$ and $x = -4/3$.<br />Note that $f''(-4/3) = -320/9 < 0$ and $f''(0) = 0$.<br /> So $f$ has a local max at $x = -4/3$.<br />The second derivative test doesn't say anything about what's happening at $x = 0$.") plot(lambda x:3*x^5 + 5*x^4, x, -2, 1)

# Example 2 (Second derivative test)

Let f(x) = 3x^5 + 5x^4. Then f'(x) = 15x^4 + 20x^3 = 5x^3(3x+ 4),
and f''(x) = 60x^3 + 60 x^2. The critical points are at x= 0 and x = -4/3.
Note that f''(-4/3) = -320/9 < 0 and f''(0) = 0.
So f has a local max at x = -4/3.
The second derivative test doesn't say anything about what's happening at x = 0.

# Example 2 (Second derivative test)

Let f(x) = 3x^5 + 5x^4. Then f'(x) = 15x^4 + 20x^3 = 5x^3(3x+ 4),
and f''(x) = 60x^3 + 60 x^2. The critical points are at x= 0 and x = -4/3.
Note that f''(-4/3) = -320/9 < 0 and f''(0) = 0.
So f has a local max at x = -4/3.
The second derivative test doesn't say anything about what's happening at x = 0.

html("<h1>Example 3 (Curve sketching)</h3>$f(x) = 3x^3 + 3x^2 - 4x + 1$. ") plot(lambda x: x^3+3*x^2 - 4*x + 1, -5, 2)

# Example 3 (Curve sketching)

f(x) = 3x^3 + 3x^2 - 4x + 1.

# Example 3 (Curve sketching)

f(x) = 3x^3 + 3x^2 - 4x + 1.

html("<h1>Example 4 (Curve sketching)</h3>$$f(x) = \\frac{3x - 1}{4x + 1}.$$ ") plot(lambda x: (3*x - 1)/(4*x + 1), -5, 5, ymin = -5, ymax = 5)

# Example 4 (Curve sketching)

f(x) = \frac{3x - 1}{4x + 1}.

# Example 4 (Curve sketching)

f(x) = \frac{3x - 1}{4x + 1}.

html("<h1>Example 5 (Curve sketching)</h3>$$f(x) = \\frac{3x - 1}{x^2+ 1}.$$ ") plot(lambda x: (3*x - 1)/(x^2 + 1), -5, 5, ymin = -3, ymax = 2)

# Example 5 (Curve sketching)

f(x) = \frac{3x - 1}{x^2+ 1}.

# Example 5 (Curve sketching)

f(x) = \frac{3x - 1}{x^2+ 1}.