23.7. PROOF OF THE SECOND DERIVATIVE TEST∗ 503
34. Consider the closed region in the xy plane which lies between the curve y =√
1− x2
and y = 0. Find the maximum and minimum values of the function x2+x+y2−y onthis region. Hint: First observe that there is a solution because the region is compact.Next look for candidates for the extreme point on the interior. When this is done, lookfor candidates on the boundary. Note that the boundary of the region does not comeas the level surface of a C1 function. The method does not apply to the corners of thisregion, the points (1,0) and (−1,0). Therefore, you need to consider these pointsalso.
35. To see why the method works with more than one constraint, suppose you have theproblem to maximize f (x,y,z) with the constraints
g1 (x,y,z) = 0,g2 (x,y,z) = 0
Then the two constraints likely define a curve of intersection. Say z = z(x) ,y = y(x).At the point where a maximum or minimum occurs, explain why
fx + fyyx + fzzx = 0g1x +g1yyx +g1zzx = 0g2x +g2yyx +g2zzx = 0
This is a system of equations having nonzero solution (1,yx,zx). Thus the matrix ofcoefficients has no inverse. Thus the rows are dependent. If ∇g1,∇g2 are indepen-dent, ∇ f = λ 1∇g1 +λ 2∇g2 for some scalars λ i. Other situations are similar but todo this in full generality, see the appendix on implicit function theorem.
36. Suppose you wish to maximize(minimize) f (x) subject to g(x) = 0 where x ∈Rn,n ≥ 1. Say x= (x1, · · · ,xn−1,xn) and at a point x0 where the minimum of max-imum occurs, you have xn = xn (x1, · · · ,xn−1) ,gxn ̸= 0. The situation is the same ifg(x) = 0 defines one of the other variables as a function of the remaining variables.Then, assuming all functions are C1,(See appendix on implicit function theorem forthis.) explain why you have for each xi, i ≤ n−1 at the point x0
fxi + fxn∂xn∂xi
= 0gxi +gxn
∂xn∂xi
= 0
Thus
fxi =− fxn
(−gxi
gxn
)=
(fxn
gxn
)gxi
Explain why the gradient of f equals a multiple of the gradient of g at the point wherethe local extreme value occurs.
23.7 Proof of the Second Derivative Test∗
A version of the following theorem is due to Lagrange, about 1790. The proof is givenearlier. See 5.15.1 on Page 143. It is stated here for convenience.
Theorem 23.7.1 Suppose f has n+ 1 derivatives on an interval (a,b) and let c ∈(a,b) . Then if x ∈ (a,b) , there exists ξ between c and x such that
f (x) = f (c)+n
∑k=1
f (k) (c)k!
(x− c)k +f (n+1) (ξ )
(n+1)!(x− c)n+1 .