Week 4 Quiz: Optimization, Derivatives and Integrals

Week 4 Quiz: Optimization, Derivatives and Integrals
SGPE Summer School 2016
Optimization
Question 1: Optimize the following function by (1) finding the critical value(s) at which the function
is optimized and (2) testing the second-order condition to distinguish between a relative maximum or
minimum and (3) the values of the relative extrema for the function.
f (x) = x2 + 6x + 9
(A) x = −3, relative maximum, f (−3) = 0
(B) x = 3, relative minimum, f (−3) = 0
(C) x = −3, relative minimum, f (−3) = 0
(D) x = −3, relative minimum, f (−3) = −1
(E) None of the above
Answer: (C) To find the critical points, take the first derivative and set it equal to zero: f 0 (x) =
2x + 6 = 0 implies that there is a single critical point at x = −3. Evaluate second derivative at x = −3
to check for concavity or convexity of function at that point: f 00 (x) = 2. Thus f 00 (−3) = 2 > 0 and
the function is convex at x = −3 (relative minimum). Thus the function obtains its minimum value of
f (−3) = 0 at x = −3.
Question 2: Optimize the following function by (1) finding the critical value(s) at which the function
is optimized and (2) testing the second-order condition to distinguish between a relative maximum or
minimum and (3) the value(s) of the relative extrema for the function.
f (x) = x3 + 6x2 − 96x + 23
(A) x = 4, relative minimum; x = −8, relative maximum; f (4) = −201 and f (−8) = 663
(B) x = −4, relative minimum; x = 8, relative maximum; f (−4) = 200 and f (8) = −665
(C) x = 4, relative minimum; x = 8, relative maximum; f (4) = −201 and f (8) = 663
(D) x = 4, relative minimum; x = −8, relative maximum; f (4) = −154 and f (−8) = 653
(E) None of the above
Answer: (A) To find critical values take first derivative and set it equal to zero, then solve for x:
f 0 (x) = 3x2 + 12x − 96 = 0 implies that 3(x2 + 4x − 32) = 0 which implies that (x − 4)(x + 8) = 0.
Thus we have critical values of x = 4 and x = −8. Check the sign of the second derivative to
determine concavity or convexity: f 00 (x) = 6x + 12, thus f 00 (4) = 36 > 0 which implies f (x) is convex
at x = 4 (relative minimum); f 00 (−8) = −36 < 0 which implies that f (x) is concave at x = −8
(relative maximum). Relative extrema of the function are f (4) = 43 + 6(42 ) − 96(4) + 23 = −201 and
f (−8) = (−8)3 + 6(−8)2 − 96(−8) + 23 = 663.
Question 3: A department store is fencing off part of the store for children to meet and be photographed with Santa Claus. They have decided to fence off a rectangular region of fixed area 800 ft2 .
1
Fire regulations require that there be three gaps in the fencing: 6 ft openings on the two facing sides
and a 10 ft opening on the remaining wall (the fourth side of the rectangle will be against the building
wall). Find the dimensions that will minimize the length of fencing used.
Figure 1: Picture of the store
Answer: Let x be the side with 10 ft gap and y be the side 6 ft gap. It is given that xy = 800 and we
want to minimize
f = (x − 10) + 2(y − 6)
We can write
800
− 6)
x
and the domain of this function is [10, ∞ because we need at least 10 ft gap. To find minimal value
f = (x − 10) + 2(
f0 = 1 −
1600
=0
x2
Thus x = 40 and y = 20.
Derivative
Question 4: Find the derivative of
f (x) = sin(sin(sin(sin(sin x))))
(A) cos(sin(sin(sin(sin x))))
(B) (cos(sin(sin(sin(sin x))))) · (cos(sin(sin(sin x)))) · (cos(sin(sin x))) · (cos(sin x)) · (sin x)
(C) cos(cos(cos(cos(cos x))))
(D) (cos(sin(sin(sin(sin x))))) · (cos(sin(sin(sin x)))) · (cos(sin(sin x))) · (cos(sin x)) · (cos x)
(E) None of the above
Answer: (D) This question is an application of chain rule. To find the answer you should apply chain
rule five times.
Question 5: If f is differentiable at point a, let d(x) = f (x) − f 0 (a)(x − a) − f (a). Find d0 (a).
Answer: We first find derivative d0 of function d and evaluate this derivative at point a. Thus,
d0 (x) = f 0 (x) − f 0 (a) · 1 − 0
and d0 (a) = f 0 (a) − f 0 (a) = 0
Question 6: What is f (k) (x), k th derivative, if
2
(a) f (x) = 1/(x − a)n ?
(b) f (x) = 1/(x2 − 1)? (Hint: Try to use first part)
Answer: (a) To see the general pattern we start to take first derivative, second derivative, etc. For
that purpose, note that we can write f (x) = (x − a)−n . Therefore,
f 0 (x) = (−n)(x − a)−n−1 = (−n)(x − a)−(n+1)
f 00 (x) = (−n)(−(n + 1))(x − a)−n−2 = n(n + 1)(x − a)−(n+2)
f 000 (x) = (−n)(−(n + 1))(−(n + 2))(x − a)−n−3 = −n(n + 1)(n + 2)(x − a)−(n+3)
..
.
So f (k) (x) = (−1)k n(n + 1)(n + 2) . . . (n + k − 1)(x − a)−(n+k) . (If you are not convinced try to write
down f (4) (x), f (5) (x) and even f (6) (x)). If we want to write this more compactly,
f (k) (x) = (−1)k
(n + k − 1)!
(x − a)−(n+k)
(n − 1)!
(b) This questions is difficult. To use the hint we need to find a way to write this equation as (x − a)−n .
Consider the following
x2
1
1 1
1
1
= (
−
) = (h(x) − g(x))
−1
2 x−1 x+1
2
Now by previous result we can write
(1 + k − 1)!
(x − 1)−(1+k) = (−1)k k!(x − 1)−(k+1)
0!
(1 + k − 1)!
g (k) (x) = (−1)k
(x + 1)−(1+k) = (−1)k k!(x + 1)−(k+1)
0!
h(k) (x) = (−1)k
and finally,
1
f (k) (x) = (−1)k k!((x − 1)−(k+1) − (x + 1)−(k+1) )
2
√
Question 7: Let f (x) = 1 + x2 . Compute f 0 (x), f 00 (x), and determine whether f convex, concave,
or neither.
Answer: f 0 (x) =
√ x
,
1+x2
3
f 00 (x) = (1 + x2 )− 2 > 0 so f is convex.
Question 8: (This question is not directly related with the material, but it is very easy to solve if you
understand derivative notion.)
Determine the following partial derivatives.
(i) Given f (x, y) = x3 + 3xy 2 , find fy (x, y) and fxx (x, y)
(ii) Given f (x, y, z) = x2 ye3z where e is exponential function, evaluate fxy (1, 1, 0) and fyzx (1, 1, 0)
Answer: (i) fy = ∂f
. This means that we keep other variables constant and take derivative with
∂y
respect to variable y. So fy (x, y) = 6xy.
fx = ∂f
and fxx =
∂x
fx x(x, y) = 6x.
∂fx
∂x
=
∂2f
.
∂x2
So fx (x, y) = 3x2 + 3y 2 . Now we take derivative of fx to find fx x,hence
3
∂ ∂f
(ii) fxy = (fx )y = ∂y
( ∂x ). That is first take partial derivative with respect to variable x and then
take derivative with respect to variable y. So fx (x, y, z) = 2xye3z and now we need to take derivative
of this function with respect to y. So fxy (x, y, z) = 2xe3z . The value of this function at point (1, 1, 0)
is fxy (1, 1, 0) = 2e0 = 2
Similarly fy (x, y, z) = x2 e3z and fyz = x2 3e3z , and finally fyzx (x, y, z) = 2x3e3z = 6xe3z .
fyzx (1, 1, 0) = 6e0 = 6.
So,
2
Question 9: Find the lim (cos x)1/x
x→0
Answer: If you just put x = 0 you will get (cos 0)1/0 = (1)∞ . This indicates that you need to use
L’Hôpital’s rule. The trick is to write this function as a division because the L’Hôpital rule says
f (x)
f 0 (x)
= lim 0
x→a g(x)
x→a g (x)
lim
So to write this function in division assume the limit is L and take logarithm. That is,
2
2
L = lim (cos x)1/x =⇒ ln L = lim ln(cos x)1/x = lim
x→0
So lnL = lim
x→0
ln cos x
.
x2
x→0
x→0
1
ln(cos x)
x2
Now we can apply the L’Hôpital rule
ln(cos x)
= lim
x→0
x→0
x2
lnL = lim
But the last expression lim
x→0
− tan x
2x
1
cos x
· (− sin x)
− tan x
= lim
.
x→0
2x
2x
is 00 , so we apply the L’Hôpital rule one more time and we get
− tan x
− sec2 x
− sec2 0
1
lnL = lim
= lim
=
=−
x→0
x→0
2x
2
2
2
and finally L = e−1/2 .
Integral
Question 10: Evaluate the following integrals:
√
R1
(i) −1 x3 1 − x2 dx
R 1 3 +3
(ii) −1 √x1−x
2 dx
R 3
(iii) (x ln x)dx
√
Answer: (i) Note that 1 − x2 ≥ 0 and x3 is positive between (0, 1] and negative between [−1, 0).
Also, integral is a summation, more precisely it is the limit of Riemann sums. So if we sum these
numbers positive and negative x3 cancel each other and the value of this integral is 0.
(ii) We can write
Z
1
−1
x3 + 3
√
dx =
1 − x2
Z
1
−1
From the previous argument, we conclude that
Consider the following right-angle triangle
x3
√
dx + 3
1 − x2
R1
3
√x
dx
−1 1−x2
4
Z
1
−1
√
1
dx
1 − x2
= 0. So we need to find first
R1
−1
√ 1
dx.
1−x2
1
x
√
1 − x2
Now note that sin θ = x (or θ = arcsin(x)) and cos θ =
substitutions, we get
Z
1
−1
1
√
dx =
1 − x2
Z
1
−1
√
θ
1 − x2 . Also, dx = cos θdθ. After doing these
1
cos θdθ =
cos θ
Z
1
dθ.
−1
R1
Since −1 dθ = θ = arcsin(x) from 1 to −1. So arcsin(1) − arcsin(−1) = π/2 − (−π/2) = π. Hence, the
value of integral is 3π.
(iii) This kind of integrals can be solved by integration by parts. That is
Z
Z
udv = uv −
vdu.
There are always exceptions but the following rule of thumb to decide u and v is generally helpful.
LIATE: Choose the u to be the first function that comes first in this list:
L: Logarithmic function
I: Inverse Trigonometric function
A: Algebraic function
T: Trigonometric function
E: Exponential function
Since L comes before A, we set u = ln x and dv = x3 dx. Then du =
Following integration by parts formula,
Z
3
Z
x ln xdx = uv −
vdu
Z 4
x4
x 1
= (ln x) −
dx
4
4 x
Z
x4 1
= (ln x) −
x3 dx
4
4
x4 1 x4
= (ln x) −
+c
4
4 4
x4 x4
= (ln x)
+c
4 16
Question 11: Evaluate the following integrals
i
Rh
2
(i)
4x 31 x3 + 1 + 2x 3 dx
R∞
(ii) 0 [exp(−λx)] dx, with λ > 0
5
4 5
Answer: (i) F (x) = 15
x + 65 x 3 + 2x2 + c
h
i∞ h
i
exp(−λ∞)
1
(ii) F (x) = exp(−λx)
=
−
= λ−1 .
−λ
λ
λ
0
5
1
dx
x
and v =
R
x3 dx =
x4
.
4