curve2 <- function(fx, d1, d2, xlim, ylim) {
if (missing(xlim)) {
xlim = c(-5, 5)
}
if (missing(ylim)) {
ylim = c(-2, 8)
}
plot(c(), c(), type = "n", xlim = xlim, ylim = ylim, xlab = "x", ylab = "y")
abline(h = 0, v = 0, col = "gray", lty = 3, xlim = xlim, ylim = ylim, xlab = "",
ylab = "")
par(new = T)
curve(fx, lwd = 2, col = "black", xlim = xlim, ylim = ylim, xlab = "", ylab = "")
if (!missing(d1)) {
par(new = T)
curve(d1, lwd = 2, col = "red", xlim = xlim, ylim = ylim, xlab = "",
ylab = "")
}
if (!missing(d2)) {
par(new = T)
curve(d2, lwd = 2, col = "green", xlim = xlim, ylim = ylim, xlab = "",
ylab = "")
}
# mtext('Test text', 3)
}
# curve2(function(x){return
# (x^2)},function(x){return(2*x)},function(x){return(2*(x/x))})
\( f(2) \) must be \( 7(2) - 4 = 10 \). The slope of \( f(x) \) at \( x=2 \) is 7, so that is the value of \( f'(2) \). \( f(2) = 7(2) - 4 = 10 \).
\( q(x)=r'(x) \), \( s(x) = p'(x) \)
The slope between \( f(3) \) and \( f(3.1) \) is \( (6.4-6)/(3.1-3) = 4 \). So an estimate of \( f'(3) = 4 \).
Not sure if this is the actual solution. If \( f(-2+h)=(h+2)^2 \), then \( f'(-2+h)=2(h+2) = 2h + 4 \). If we assume that \( h = 0 \), then \( f'(-2+0) = 2(0) + 4 = 4 \).
The slope of \( f(1)=1 \). Since \( f(1)=2 \), the result is \( x \) times the slope plus 1. We use that as the estimate for \( f(1.2) \), so the estimate for \( f(1.2) \) is \( 1.2*1 + 1 = 2.2 \).
Velocity:
\( f'(t) = -49t/5 + 5 \)
Acceleration: \( f''(t) = -49/5 \)
xlim = c(-2, 2)
ylim = c(-5, 5)
f <- function(x) {
return(x^3)
}
curve(f, xlim = xlim, ylim = ylim, col = "black")
f <- function(x) {
return(3 * (x^3))
}
par(new = T)
curve(f, xlim = xlim, ylim = ylim, col = "red")
par(new = T)
f <- function(x) {
return(3 * x^2)
}
curve(f, xlim = xlim, ylim = ylim, col = "blue")
par(new = T)
f <- function(x) {
return(3 * (3 * x^2))
}
curve(f, xlim = xlim, ylim = ylim, col = "green")
No, I won't. This is an invitation to waste a lot of time.
f <- function(x) {
return(x^3/4 - (1/x))
}
curve(f, xlim = c(-4, 4), ylim = c(-4, 4))
abline(h = 0, v = 0, col = "gray", lty = 3, xlim = c(-4, 4), ylim = c(-4, 4),
xlab = "", ylab = "")
par(new = T)
f <- function(x) {
return(13 * x/4 + 5)
}
curve(f, xlim = c(-4, 4), ylim = c(-4, 4), col = "red")
\( f(-2) = -3/2 \)
\( f'(x) = 3x^2/4 + 1/x^2 \)
\( f'(-2) = 13/4 \)
\( (y-(-3/2) = 13/4(x - (-2)) \)
\( y = 13x/4 + 13/2 - 3/2 \)
\( y = 13x/4 + 5 \)
xlim = c(-1, 5)
ylim = c(-160, 120)
f <- function(x) {
return(3 * x^2 - pi^3)
}
curve(f, xlim = xlim, ylim = ylim)
abline(h = 0, v = 0, col = "gray", lty = 3, xlim = xlim, ylim = ylim, xlab = "",
ylab = "")
par(new = T)
f <- function(x) {
return(24 * x - 48 - pi^3)
}
curve(f, xlim = xlim, ylim = ylim, col = "red")
\( f(4) = 48 - \pi^3 = 16.99372 \)
\( f'(x) = 6x \)
So the slope at \( (4, 16.99372) \) is \( 6(4) = 24 \)
\( (y-(48 - \pi^3)) = 24(x - 4) \)
\( y = 24x - 96 +48 - \pi^3 \)
Or:
\( y = 24x - 48 - \pi^3 \)
\( \frac{d}{dx} cf(x) = \lim_{h \to 0} \frac{cf(x + h) - c(f(x))}{h} = c\lim_{x \to 0} \frac{f(x+h)-f(x)}{h} = cf'(x) \)
\( f'(x) = 2x - 1 \)
Critical point at \( x = 1/2 \)
\( f(0) = 0 \) \( f(1/2) = -1/2 \) \( f(1) = 0 \)
Since \( f(x) \) is greater on either side of the critical point than the critical point itself, local minimum.
\( f'(x) = -3x^2 + 3 \)
Critical points at \( -1, 1 \)
\( f(-2) = 4 \)
\( f(-1) = 0 \)
\( f(0) = 2 \)
\( f(1) = 4 \)
\( f(2) = 0 \)
\( f(-1) \) is a local minimum, \( f(1) \) is a local maximum
\( f'(x) = 3x^2 - 18x + 24 \)
Critical points at \( x=2, x=4 \)
\( f(0) = 0 \)
\( f(2) = 20 \)
\( f(3) = 18 \)
\( f(4) = 16 \)
\( f(5) = 20 \)
\( x=2 \) is a local maximum, \( x=4 \) is a local minimum
\( f'(x) = 4x^3 - 4x \)
Critical points at \( -1, 0, 1 \)
\( f(-2) = 11 \)
\( f(-1) = 2 \)
$f(-0.5) = 2.5625
\( f(0) = 3 \)
\( f(0.5) = 2.5625 \)
\( f(1) = 2 \)
\( f(2) = 11 \)
\( x=-1 \) is a local minimum, \( x=0 \) is a local maximum, \( x=1 \) is a local minimum
\( f'(x) = 12x^3 - 12x^2 \)
Critical points at \( 0, 1 \)
\( f(-1) = 7 \)
\( f(0) = 0 \)
\( f(0.5) = -0.3125 \)
\( f(1) = -1 \)
\( f(2) = 16 \)
\( x = 0 \) is neither, \( x=1 \) is a local minimum
In the following exercises, find all critical points and identify them as local maximum points, local minimum points, or neither.
Note that all black curves are \( f(x) \) and all red curves are \( f'(x) \).
curve2(function(x) {
return(x^2 - x)
}, function(x) {
return(2 * x - 1)
})
\( f(x) = x^2 - x \)
\( f'(x) = 2x - 1 \)
Critical points for \( f'(x) \): \( x = 1/2 \)
\( f'(0) = -1 \)
\( f'(1) = 1 \)
\( x = 1/2 \): Local minimum
curve2(function(x) {
return(2 + 3 * x - x^3)
}, function(x) {
return(3 - 3 * x^2)
})
\( f(x) = 2 + 3x - x^3 \)
\( f'(x) = 3 - 3x^2 \)
Critical points for \( f'(x) \): \( x = \pm 1 \)
\( f'(-2) = -9 \)
\( f'(0) = 3 \)
\( f'(2) = -9 \)
\( x = -1 \): Local minimum
\( x = 1 \): Local maximum
curve2(function(x) {
return(x^3 - 9 * x^2 + 24 * x)
}, function(x) {
return(3 * x^2 - 18 * x + 24)
}, xlim = c(-1, 9), ylim = c(-5, 20))
\( f(x) = x^3 - 9x^2 + 24x \)
\( f'(x) = 3x^2 - 18x + 24 \)
Critical points for \( f'(x) \): \( x=2, x=4 \)
\( f'(1) = 9 \)
\( f'(3) = -3 \)
\( f'(5) = 9 \)
\( x = 2 \): Local maximum
\( x = 4 \): Local minimum
curve2(function(x) {
return(x^4 - 2 * x^2 + 3)
}, function(x) {
return(4 * x^3 - 4 * x)
}, xlim = c(-5, 5), ylim = c(-5, 20))
\( f(x) = x^4 - 2x^2 + 3 \)
\( f'(x) = 4x^3 - 4x \)
Critical points for \( f'(x) \): \( x=0, x=1, x=-1 \)
\( f'(-2) = -24 \)
\( f'(-0.5) = 2.5 \)
\( f'(0.5) = -1.5 \)
\( f'(2) = 24 \)
\( x = -1 \): Local minimum
\( x = 0 \): Local maximum
\( x = 1 \): Local minimum
curve2(function(x) {
return(3 * x^4 - 4 * x^3)
}, function(x) {
return(12 * x^3 - 12 * x^2)
}, xlim = c(-2, 2), ylim = c(-5, 5))
\( f(x) = 3x^4 - 4x^3 \)
\( f'(x) = 12x^3 - 12x^2 \)
Critical points for \( f'(x) \): \( x = 0, x = 1 \)
\( f'(-1) = -24 \)
\( f'(0.5) = -3/2 \)
\( f'(2) = 48 \)
\( x = 0 \): neither
\( x = 1 \): local minimum
curve2(function(x) {
return((x^2 - 1)/x)
}, function(x) {
return((x^2 + 1)/x^2)
}, xlim = c(-5, 5), ylim = c(-5, 5))
\( f(x) = (x^2 -1)/x \)
\( f'(x) = (x^2 + 1)/x^2 \)
Critical points for \( f'(x) \): \( x = 0 \)
\( f'(-1) = 2 \)
\( f(1) = 2 \)
\( x = 0 \): neither
curve2(function(x) {
return(abs(x^2 - 121))
}, xlim = c(-80, 80), ylim = c(-5, 155))
N.B. the title of this section; the focus is on concavity, not extrema. Concavity can be one-sided, i.e., one side of an inflection point has different concavity than the other, or it can be simply one-sided, in the case of an asymptote (see problem 6).
If \( f''(x) = 0 \) at point \( a \), we can draw no conclusions about concavity at \( a \). It is an inflection point, or an asymptote, or possible \( f(x) \) is undefined at \( a \).
If \( f'(x) > 0 \) at point \( a \), then the slope of \( f(x) \) is positive at \( a \), so the function is moving from lower left to upper right.
If \( f'(x) < 0 \) at point \( a \), then the slope of \( f(x) \) is negative at \( a \), so the function is moving from upper left to lower right.
If \( f'(x) = 0 \) at point \( a \), then the slope of \( f(x) \) is flat at \( a \), so it is zero. This means that \( f''(x) \) crosses the y axis at \( a \).
In the following exercises, describe the concavity of the function.
Note that all black curves are \( f(x) \), all red curves are \( f'(x) \) and all green curves are \( f''(x) \).
curve2(function(x) {
return(x^2 - x)
}, function(x) {
return(2 * x - 1)
}, function(x) {
return(2 * (x/x))
})
\( f(x) = x^2 - x \)
\( f'(x) = 2x - 1 \)
\( f''(x) = 2 \)
Find critical points for f'(x):
\( 2x - 1 = 0 \)
\( 2x = 1 \)
\( x = 1/2 \)
Critical points for f'(x): \( 1/2 \)
Critical points for f''(x): None, f''(x) is always greater than zero
Answer: Concave up everywhere
curve2(function(x) {
return(2 + 3 * x - x^3)
}, function(x) {
return(3 - 3 * x^2)
}, function(x) {
return(-6 * x)
})
\( f(x) = 2 + 3x - x^3 \)
\( f'(x) = 3 - 3x^2 \)
\( f''(x) = -6x \)
Find critical points for f'(x):
\( 3 - 3x^2 = 0 \)
\( x^2 = 3 \)
\( x = \pm \sqrt{3} \)
Critical points for f'(x): \( \pm \sqrt{3} \)
Find critical points for f''(x):
\( -6x = 0 \)
Critical points for f''(x): \( 0 \)
\( f''(-\sqrt{3}) = 6\sqrt{3} \)
\( f''(\sqrt{3}) = -6\sqrt{3} \)
Answer:
\( x < 0 \): Concave up \( x > 0 \): Concave down
curve2(function(x) {
return(x^3 - 9 * x^2 + 24 * x)
}, function(x) {
return(3 * x^2 - 18 * x + 24)
}, function(x) {
return(6 * x - 18)
}, xlim = c(-1, 9), ylim = c(-5, 20))
\( f(x) = x^3 - 9x^2 + 24x \)
\( f'(x) = 3x^2 - 18x + 24 \)
\( f''(x) = 6x - 18 \)
Find critical points for f'(x):
\( 3x^2 - 18x + 24 = 0 \)
\( x^2 - 6x + 8 = 0 \)
\( (x - 4)(x - 2) = 0 \)
Critical points for f'(x): \( 2, 4 \)
Find critical points for f''(x):
\( 6x - 18 = 0 \)
\( 6x = 18 \)
\( x = 3 \)
Critical points for f''(x): \( 3 \)
\( f''(2) = -6 \)
\( f''(4) = 6 \)
Answer: \( x < 3 \): Concave down, \( x > 3 \): Concave up
curve2(function(x) {
return(x^4 - 2 * x^2 + 3)
}, function(x) {
return(4 * x^3 - 4 * x)
}, function(x) {
return(12 * x^2 - 4)
}, xlim = c(-5, 5), ylim = c(-5, 20))
\( f(x) = x^4 - 2x^2 + 3 \)
\( f'(x) = 4x^3 - 4x \)
\( f''(x) = 12x^2 - 4 \)
Find critical points for f'(x)
\( 4x^3 - 4x = 0 \)
\( x(4x^2 - 4) = 0 \)
\( x = 0 \), \( x^2 = 1 \), \( x = \pm 1 \)
Critical points for f'(x): \( -1, 0, 1 \)
Find critical points for f''(x)
\( 12x^2 - 4 = 0 \)
\( 3x^2 = 1 \)
\( x^2 = 1/3 \)
\( x = \pm \sqrt{1/3} \)
\( f''(-1) = 8 \)
\( f''(0) = -4 \)
\( f''(1) = 8 \)
Answer: \( x < -\sqrt{1/3} \): Concave up, \( -\sqrt{1/3} < x < \sqrt{1/3} \): Concave down, \( x > \sqrt{1/3} \): Concave up
curve2(function(x) {
return(3 * x^4 - 4 * x^3)
}, function(x) {
return(12 * x^3 - 12 * x^2)
}, function(x) {
return(36 * x^2 - 24 * x)
}, xlim = c(-2, 2), ylim = c(-5, 5))
\( f(x) = 3x^4 - 4x^3 \)
\( f'(x) = 12x^3 - 12x^2 \)
\( f''(x) = 36x^2 - 24x \)
Find critical points for f'(x)
\( 12x^2 - 12x^2 = 0 \)
\( x(x-1) = 0 \)
Critical points for f'(x): \( 0, 1 \)
Find critical points for f''(x)
\( 36x^2 - 24x = 0 \)
\( x(3x - 2) = 0 \)
Critical points for f''(x): \( 0, \frac{2}{3} \)
\( f''(0) = 0 \): this is inconclusive
\( f''(-1) = 12 \)
\( f''(1/3) = -4 \)
\( f''(1) = 12 \)
Answer: \( x < 0 \): concave up, \( 0 < x < 2/3 \): concave down, \( x > 2/3 \): concave up
curve2(function(x) {
return((x^2 - 1)/x)
}, function(x) {
return((x^2 + 1)/x^2)
}, function(x) {
return((-2)/x^3)
}, xlim = c(-5, 5), ylim = c(-5, 5))
\( f(x) = (x^2 -1)/x \)
\( f'(x) = (x^2 + 1)/x^2 \)
\( f''(x) = \frac{-2}{x^3} \)
Find critical points for \( f'(x) \)
\( (x^2 + 1)/x^2 = 0 \): x cannot be 0
\( x^2 = -1 \)
\( x = \pm \sqrt{-1} \)
Critical points for \( f'(x) \): \( 0 \)
Find critical points for \( f''(x) \)
\( \frac{-2}{x^3} = 0 \): x cannot be 0, no other critical points
Critical points for \( f''(x) \): \( 0 \)
\( f''(-1) = 2 \)
\( f''(1) = -2 \)
Answer: \( x < 0 \): concave down, \( x > 0 \): concave up
curve2(function(x) {
return(3 * x^2 - 1/x^2)
}, function(x) {
return(6 * x + 2/x^3)
}, function(x) {
return(6 - 6/x^4)
}, xlim = c(-12, 12), ylim = c(-12, 12))
\( f(x) = 3x^2 - \frac{1}{x^2} \)
\( f'(x) = 6x + \frac{2}{x^3} \)
\( f''(x) = 6 - \frac{6}{x^4} \)
Find critical points for \( f'(x) \)
\( 6x + \frac{2}{x^3} = 0 \)
\( \frac{6x^4 + 2}{x^3} = 0 \): x cannot be 0
\( 6x^4 = -2 \)
\( x^4 = -\frac{1}{3} \)
Critical points for \( f'(x) \): \( 0 \)
Find critical points for \( f''(x) \)
\( 6 - \frac{6}{x^4} = 0 \): x cannot be 0
\( \frac{1}{x^4} = 0 \)
\( x = \pm 1 \)
Critical points for \( f''(x) \): \( -1, 0, 1 \)
\( f''(-2) = 45/8 \)
\( f''(-0.5) = -90 \)
\( f''(0.5) = -90 \)
\( f''(2) = 45/8 \)
Answer: \( x < -1 \) concave up, \( x > 1 \) concave up, \( -1 < x < 0 \) concave down, \( 0 < x < 1 \) concave down
curve2(function(x) {
return(x^5 - x)
}, function(x) {
return(5 * x^4 - 1)
}, function(x) {
return(20 * x^3)
}, xlim = c(-2, 2), ylim = c(-2, 2))
\( f(x) = x^5 - x \)
\( f'(x) = 5x^4 - 1 \)
\( f''(x) = 20x^3 \)
Find critical points for \( f'(x) \)
\( 5x^4 - 1 = 0 \)
\( x^4 = \frac{1}{5} \)
\( x = \pm \sqrt[4]{\frac{1}{5}} \)
Critical points for \( f'(x) \): \( \sqrt[4]{\frac{1}{5}}, -\sqrt[4]{\frac{1}{5}} \)
Find critical points for \( f''(x) \)
\( 20x^3 = 0 \)
\( x = 0 \)
Critical points for \( f''(x) \): \( 0 \)
\( f''(\sqrt[4]{\frac{1}{5}}) = 11.89 \)
\( f''(-\sqrt[4]{\frac{1}{5}}) = -11.89 \)
Answer: \( x < 0 \): concave down, \( x > 0 \): concave up
curve2(function(x) {
return(x + (1/x))
}, function(x) {
return(1 - (1/x^2))
}, function(x) {
return(2/(x^3))
}, xlim = c(-5, 5), ylim = c(-5, 5))
\( f(x) = x + \frac{1}{x} \)
\( f'(x) = 1 - \frac{1}{x^2} \)
\( f''(x) = \frac{2}{x^3} \)
Find critical points for \( f'(x) \)
\( 1 - \frac{1}{x^2} = 0 \)
\( 1 = \frac{1}{x^2} \)
\( x^2 = 1 \)
Critical points for \( f'(x) \): \( -1, 1 \)
Find critical points for \( f''(x) \)
\( \frac{2}{x^3} = 0 \)
Critical points for \( f''(x) \): \( 0 \)
Note that in this problem, the only critical point for \( f''(x) \) is a point at which \( f''(x) \) is undefined. Therefore, we only need to check for concavity on either side of this single critical point.
\( f''(-1) = -2/3 \)
\( f''(1) = 2/3 \)
Answer: \( x < 0 \): concave down, \( x > 0 \): concave up
curve2(function(x) {
return(x^2 + (1/x))
}, function(x) {
return(2 * x - (1/x^2))
}, function(x) {
return(2 + 2/(x^3))
}, xlim = c(-5, 5), ylim = c(-5, 5))
\( f(x) = x^2 + \frac{1}{x} \)
\( f'(x) = 2x - \frac{1}{x^2} \)
\( f''(x) = 2 + \frac{2}{x^3} \)
Find critical points for \( f'(x) \)
\( 2x - \frac{1}{x^2} = 0 \)
\( \frac{2x^3 - 1}{x^2} = 0 \): x cannot be zero
\( 2x^3 - 1 = 0 \)
\( x^3 = 1/2 \)
\( x = \sqrt[3]{1/2} \)
Critical points for \( f'(x) \): \( 0, \sqrt[3]{1/2} \)
Find critical points for \( f''(x) \)
\( 2 + \frac{2}{x^3} = 0 \)
\( \frac{2}{x^3} = -2 \)
\( x^3 = -1 \)
\( x = -1 \)
Critical points for \( f''(x) \): \( -1 \)
\( f''(0) \) is undefined \( f''(\sqrt[3]{1/2}) = 4.52 \)
\( f''(-2) = 1.75 \)
\( f''(-0.5) = -14 \)
\( f''(1) = 4 \)
Answer: \( x > 0 \): concave up, \( x < -1 \): concave up, \( -1 < x < 0 \): concave down
Suppose that \( f''(x) \) is continuous on an open interval and that \( f'(a) = 0 \) for some point in that interval.
Find all local maximum and minimum points by the second derivative test.
Black lines are \( f(x) \), red lines are \( f'(x) \), green lines are \( f''(x) \).
curve2(function(x) {
return(x^2 - x)
}, function(x) {
return(2 * x - 1)
}, function(x) {
return(2 * (x/x))
}, xlim = c(-5, 5), ylim = c(-5, 5))
\( f(x) = x^2 - x \) \( f'(x) = 2x - 1 \) \( f''(x) = 2 \)
Critical points for \( f'(x) \): \( 1/2 \)
\( f''(1/2) = 2 \)
Local minimum at \( x=1/2 \)
curve2(function(x) {
return(-x^3 + 3 * x + 2)
}, function(x) {
return(-3 * x^2 + 3)
}, function(x) {
return(-6 * x)
}, xlim = c(-2.5, 2.5), ylim = c(-5, 5))
\( f(x) = -x^3 + 3x + 2 \)
\( f'(x) = -3x^2 + 3 \)
\( f''(x) = -6x \)
Critical points for \( f'(x) \): \( -1, 1 \)
\( f''(-1) = 6 \)
\( f''(1) = -6 \)
Local minimum at \( -1 \), local maximum at \( 1 \)
curve2(function(x) {
return(x^3 - 9 * x^2 + 24 * x)
}, function(x) {
return(3 * x^2 - 18 * x + 24)
}, function(x) {
return(6 * x - 18)
}, xlim = c(-1, 10), ylim = c(-40, 40))
\( f(x) = x^3 - 9x^2 + 24x \)
\( f'(x) = 3x^2 - 18x + 24 \)
\( f''(x) = 6x - 18 \)
Critical points for \( f'(x) \): \( 2, 4 \)
\( f''(2) = -6 \)
\( f''(4) = 6 \)
Local maximum at \( x=2 \), local minimum at \( x=4 \)
curve2(function(x) {
return(x^4 - 2 * x^2 + 3)
}, function(x) {
return(4 * x^3 - 4 * x)
}, function(x) {
return(12 * x^2 - 4)
}, xlim = c(-4, 4), ylim = c(-4, 4))
\( f(x) = x^4 - 2x^2 + 3 \)
\( f'(x) = 4x^3 - 4x \)
\( f''(x) = 12x^2 - 4 \)
Critical points for \( f'(x) \): \( 0, -1, 1 \)
\( f''(0) = -4 \)
\( f''(-1) = 8 \)
\( f''(1) = 8 \)
Local maximum at \( x=0 \), local minimum at \( x=1 \) and \( x=-1 \)
curve2(function(x) {
return(3 * x^4 - 4 * x^3)
}, function(x) {
return(12 * x^3 - 12 * x^2)
}, function(x) {
return(36 * x^2 - 24 * x)
}, xlim = c(-4, 4), ylim = c(-4, 4))
\( f(x) = 3x^4 - 4x^3 \)
\( f'(x) = 12x^3 - 12x^2 \)
\( f''(x) = 36x^2 - 24x \)
Critical points for \( f'(x) \): \( 0, 1 \)
\( f''(0) = 0 \)
\( f''(1) = 12 \)
Local minimum at \( x=1 \)
curve2(function(x) {
return((x^2 - 1)/x)
}, function(x) {
return((x^2 + 1)/x^2)
}, function(x) {
return(-2/x^3)
}, xlim = c(-4, 4), ylim = c(-4, 4))
\( f(x) = (x^2-1)/x \)
\( f'(x) = (x^2+1)/x^2 \)
\( f''(x) = \frac{-2}{x^3} \)
Critical points for \( f'(x) \): \( 0 \)
\( f''(0) \) is undefined
No extrema
curve2(function(x) {
return(3 * x^2 - 1/x^2)
}, function(x) {
return(6 * x + 2/x^3)
}, function(x) {
return(6 - 6/x^4)
}, xlim = c(-12, 12), ylim = c(-12, 12))
\( f(x) = 3x^2 - \frac{1}{x^2} \)
\( f'(x) = 6x + \frac{2}{x^3} \)
\( f''(x) = 6 - \frac{6}{x^4} \)
Critical points for \( f'(x) \): \( 0 \)
\( f''(0) \) is undefined
No extrema
curve2(function(x) {
return(x^5 - x)
}, function(x) {
return(5 * x^4 - 1)
}, function(x) {
return(20 * x^3)
}, xlim = c(-3, 3), ylim = c(-3, 3))
\( f(x) = x^5 - x \)
\( f'(x) = 5x^4 - 1 \)
\( f''(x) = 20x^3 \)
Critical points for \( f'(x) \): \( -\sqrt[4]{1/5}, \sqrt[4]{1/5} \)
\( f''(-\sqrt[4]{1/5}) = -5.981 \)
\( f''(\sqrt[4]{1/5}) = 5.981 \)
Local maximum at \( -\sqrt[4]{1/5} \), local minimum at \( \sqrt[4]{1/5} \)
curve2(function(x) {
return(x + 1/x)
}, function(x) {
return(1 - 1/x^2)
}, function(x) {
return(2/x^3)
}, xlim = c(-3, 3), ylim = c(-3, 3))
\( f(x) = x + 1/x \)
\( f'(x) = 1 - 1/x^2 \)
\( f''(x) = 2/x^3 \)
Critical points for \( f'(x) \): \( -1, 1 \)
\( f''(-1) = -2 \)
\( f''(1) = 2 \)
Local maximum at \( x=-2 \), local minimum at \( x=1 \)
curve2(function(x) {
return(x^2 + (1/x))
}, function(x) {
return(2 * x - (1/x^2))
}, function(x) {
return(2 + 2/(x^3))
}, xlim = c(-4, 4), ylim = c(-4, 7))
\( f(x) = x^2 + \frac{1}{x} \)
\( f'(x) = 2x - \frac{1}{x^2} \)
\( f''(x) = 2 + \frac{2}{x^3} \)
Critical points for \( f'(x) \): \( 0, \sqrt[3]{1/2} \)
\( f''(0) \) is undefined
\( f''(\sqrt[3]{1/2}) = 6 \)
Local minimumn at \( x=\sqrt[3]{1/2} \)
If \( f(x) \) and \( g(x) \) are differentiable, then \( \frac{d}{dx}f(x)g(x) = f(x)g'(x) + f'(x)g(x) \).
\( f'(x) = 3x^2(x^3 - 5x + 10) + x^3(3x^2 - 5) \)
\( f'(x) = (2x+5)(x^5-6x^3+3x^2-7x+1) + (x^2+5x-3)(5x^4-18x^2-7) \)
\( f'(x) = e^x \cdot e^x + e^x \cdot e^x = 2(e^x)^2 = 2e^{2x} \)
A simpler way to do this is to say that \( \frac{d}{dx} e^{\text{stuff}} = e^{\text{stuff}} \cdot \frac{d}{dx} \text{stuff} \), and since “stuff” here is \( 2x \), the answer is \( 2 \cdot e^{2x} \). But this looks ahead to the chain rule.
\( f'(x) = \frac{d}{dx} (e^3 \cdot e^x \cdot e^x) = 3e^{3x} \)
I won't bother writing out all of the tedious multiplications.
\( f'(x) = 6x \cdot e^{4x} + 3x^2 * 4e^{4x} = 6xe^{4x} + 12x^2e^{4x} \)
\( f'(x) = 3e^x\cdot-16x^{-17} + 3e^x\cdot x^-16 = \frac{-48e^x}{x^17} + \frac{3e^x}{x^16} \)
\( f'(x) = (2)(2x-3) + (2x-3)(2) = 4(2x-3) = 8x-12 \)
Tangent line: The slope is \( f'(2) = 8(2)-12 = 4 \). A point is at \( x=2 \), \( y=(2(2)-3)^2) = 1 \). The tangent line is \( (y-1) = 4(x-2) \) or \( y=4x-7 \)
\( f(x) \) is black, \( f'(x) \) is red, tangent line is blue.
curve2(function(x) {
return((2 * x - 3)^2)
}, function(x) {
return(8 * x - 12)
})
f <- function(x) {
return(4 * x - 7)
}
par(new = T)
curve(f, xlim = c(-5, 5), ylim = c(-2, 8), col = "blue", xlab = "", ylab = "")
Use the following table to compute solve the next 4 problems. Note \( \frac{d}{dx}f(x)|_{x=a} \) is the derivative of \( f(x) \) evaluted at \( x=a \).
library(knitr)
df <- data.frame(c(-2, -1, 1, 2), c(-3, 0, 4, -1), c(1, 3, 2, -2), c(4, 5, -1,
-3))
rownames(df) <- c("f(x)", "f'(x)", "g(x)", "g'(x)")
names(df) <- c("1", "2", "3", "4")
df
## 1 2 3 4
## f(x) -2 -3 1 4
## f'(x) -1 0 3 5
## g(x) 1 4 2 -1
## g'(x) 2 -1 -2 -3
\( (0)(4) + (-3)(-1) = 3 \)
I think the answers must e wrong for 9 and 10. \( \frac{d}{dx}xf(x)|_{x=3} \) would be the value of \( x \) times \( f'(x) \), which would be \( 3\cdot 3=9 \). But the book says 10, and for 10, the answer should be \( -12 \) but the book says \( -13 \).
\( (1)(3) = 9 \)
\( (4)(-3)=-12 \)
\( (-1)(1) + (-2)(2) = -5 \)
\( \frac{d}{dx}f(x)g(x)h(g) = (f'(x) \cdot (g(x)h(x))) + f(x) \cdot \frac{d}{dx}g(x)h(g) \) \( = (f'(x) \cdot (g(x)h(x))) + f(x)[(g'(x)h(x)) + (g(x)h'(x))] \) \( =f(x)g(x)h'(x) + f(x)g'(x)h(x) + f'(x)g(x)h(x) \)
If \( f(x) \) and \( g(x) \) are differentiable, then
\[ \frac{d}{dx}\frac{f(x)}{g(x)} = \frac{f'(x)g(x) - f(x)g(x)}{g(x)^2} \]
\( f'(x) = \frac{(3x^2)(x^3-5x+10) - (x^3)(3x^2-5)}{(x^3-5x+10)^2} \)
\( f'(x) = \frac{(2x+5)(x^5-6x^3+3x^2-7x+1) - (x^2+5x-3)(5x^4-18x^2+6x-7)}{(x^5-6x^3+3x^2-7x+1)^2} \)
First note that \( \lim_{h \to 0} \sin(h) = 1 \). Picture a graph. As \( h \) continues to grow smaller, the \( \sin \), or the y value, continues to become more and more like the arc length, or \( h \). So \( \sin(h) \) approaches \( 0 \) as \( h \) approaches \( 0 \). But \( h \) never actually reaches \( 0 \). \( \sin(h) \) approaches \( h \) as \( h \) approaches \( 0 \).
As a result of this, \( \lim_{h \to 0} \sin(h) = 1 \).
For similar reasons, \( \lim_{h \to 0} \cos(h) -1 = 0 \). As \( h \) approaches \( 0 \), \( \cos(h) \) approaches \( 1 \), so \( \cos(h) - 1 \) approaches \( 0 \). However, I have not yet figured out how to easily visualize this, because the \( x \) value, or \( \cos(h) \) in a unit circle, is not compared to the angle. I think it involves looking at the same angle at the top of the curve (90 degrees minus \( h \)), near \( y=0 \), and imagining that, as \( h \) approaches 90 degrees, the \( x \) value, or \( \cos \), gets smaller and smaller, and gradually approaches the arc length. So it approaches 1, and therefore that value minus 1 is 0.
The trick is to remember that \( \cos(h) = \sin(90-h) \). So now, as \( h \) approaches \( 0 \), the angle approaches \( 90 \). So \( \lim_{h \to 0} \cos(h) \) = \( \lim_{h \to 0} \sin(90 - h) = 1 \). The graph would show that the arc length becomes more and more similar to the \( x \) value as \( h \) approaches \( 0 \). Therefore, \( \lim_{h \to 0} \cos{h} - 1 = 1 - 1 = 0 \).
One small example of my slowly-developing ability to think mathematically!
Second, there is a trig identity for which I need to establish the proof, and it is \( \sin(\alpha + \theta) = \cos(\alpha)\sin(\theta) + sin(\alpha)\cos(\theta) \).
These combined lead to the proof for \( \frac{d}{dx} \sin(x) \):
\[ \frac{d}{dx} \sin(x) = \lim_{h \to 0} \frac{\sin(x + h)-\sin(x)}{h} \] \[ =\lim_{h \to 0} \frac{\sin(x)\cos(h) + \sin(h)\cos(x) - \sin(x)}{h} \] \[ =\lim_{h \to 0} \frac{\sin(x)\cos(h) - \sin(x)}{h} + \frac{\sin(h)\cos(x)}{h} \] \[ =\lim_{h \to 0} \sin(x)\frac{\cos(h)-1}{h} + \cos(x)\frac{\sin(h)}{h} \] \[ =\sin(x)(\lim_{h \to 0} \frac{\cos(h)-1}{h}) + \cos(x)(\lim_{h \to 0} \frac{\sin(h)}{h}) \] \[ =\sin(x) \cdot 0 + \cos(x) \cdot {1} \] \[ =\cos(x) \]