. 1. Chain rules 2. Directional 3. Vector Field 4. Most Rapid Increase 5. Implicit Theorem, Implicit Differentiation 6. 7. Second .

......

Matb 210 in 2012 . Theorem. Suppose that w = f (x, y, z) is a , where x = x(u, v), y = y(u, v), z = z(u, v), where the coordinate functions are parameterized by differentiable functions. Then the composite function w(u, v) = f ( x(u, v), (u, v), (u, v)) is a differentiable function in u and v, such that the partial functions are given by

∂w ∂w ∂x ∂w ∂y ∂w ∂z = · + · + · ; ∂u ∂x ∂u ∂y ∂u ∂z ∂u ∂w ∂w ∂x ∂w ∂y ∂w ∂z = · + · + · . ∂v ∂x ∂v ∂y ∂v ∂z ∂v . . Remark. The formula stated above is very important in the theory of . .

......

Matb 210 in 2012 . Theorem ( for Coordinate Changes). Suppose that s = f (x, y, z) is a differentiable function, where x = x(u, v, w), y = y(u, v, w), z = z(u, v, w), where the coordinate functions are parameterized by differentiable functions in variables u, v and w. Then the composite function S(u, v, w) = f ( x(u, v, w), (u, v, w), (u, v, w)) is a differentiable function in u, v and w, such that the partial functions are given by

∂S ∂S ∂x ∂S ∂y ∂S ∂z = · + · + · ; ∂u ∂x ∂u ∂y ∂u ∂z ∂u ∂S ∂S ∂x ∂S ∂y ∂S ∂z = · + · + · ; ∂v ∂x ∂v ∂y ∂v ∂z ∂v ∂ ∂ ∂ ∂ ∂ ∂ ∂ S S · x S · y S · z ∂ = ∂ ∂ + ∂ ∂ + ∂ ∂ . . w x w y w z w . Remark. The formula stated above is very important in the theory of . theory and integration theory.

......

Matb 210 in 2012 . Example. In spherical coordinates, we have the (ρ, θ, ϕ) to represent (x, y, z) as follows: x = ρ sin ϕ cos θ, y = ρ sin ϕ sin θ, z = ρ cos ϕ, with ρ ≥ 0,√ 0 ≤ θ ≤ 2π, and 0 ≤ ϕ ≤ π. Define 2 2 2 ∂S S(x, y, z) = x + y + z . Evaluate the ∂ρ in two ways.. ∂S Solution. (i) Since S(ρ sin ϕ cos θ, ρ sin ϕ sin θ, ρ cos ϕ) = ρ, so ∂ρ = 1 for any choices of parameters involved. (ii) The second method is to apply chain rule. ∂S √ x ∂x ∂ ∂ = = sin ϕ cos θ, ∂ρ = ∂ρ (ρ sin ϕ cos θ) = sin ϕ cos θ, x x2+y2+z2 ∂S √ y ∂y ∂ ∂ = = sin ϕ sin θ, ∂ρ = ∂ρ (ρ sin ϕ sin θ) = sin ϕ sin θ, y x2+y2+z2 and ∂S √ z ∂z ∂ ∂ = = cos ϕ, ∂ρ = ∂ρ (ρ cos ϕ) = cos ϕ. z x2+y2+z2 ∂S ∂S · ∂x ∂S · ∂y ∂S · ∂z And ∂ρ = ∂x ∂ρ + ∂y ∂ρ + ∂z ∂ρ = (sin ϕ cos θ)2 + (sin ϕ sin θ)2 + (cos ϕ)2 = (sin2 ϕ)(cos2 θ + sin2 θ ) + cos2 ϕ = 1.

......

Matb 210 in 2012 . Theorem. (Chain Rule of 2-variables) Suppose that f (x, y)nd is a real valued function defined on the planar domain D, and that r(t) = x(t)i + y(t)j is a in the domain D. Then we obtain a real-valued function g(t) = f (x(t), y(t)) which is a function of t. Then the derivative of g is given by ′ d ∂f dx ∂f dy g (t) = ( f (x(t), y(t)) ) = (r(t)) · + (r(t)) · = dt ∂x dt ∂y dt ′ ′ f.x(r(t))x (t) + fy(r(t))y (t).

......

Matb 210 in 2012 . Theorem. Chain Rule of 3-variables Suppose that f (x, y, z) is real valued function defined on the domain D which is part of R3, and that x = x(t), y = y(t) and z = z(t) is a curve in the domain D. One can think of the a particle moving in domain D, and its position is given by (x(t), y(t), z(t)) changing with respect to t, so it traces out a path in domain D given by r(t) = x(t)i + y(t)j + z(t)k. Then we obtain a real-valued function g(t) = f (x(t), y(t), z(t)). Then the chain rule tells us that ′ d g (t) = ( f (x(t), y(t), z(t))) dt ∂f · dx ∂f · dy ∂f · dz = ∂x (r(t)) dt + ∂y (r(t)) dt + ∂z (r(t)) dt (chain rule) ′ ′ ′ . = fx(r(t))x (t) + fy(r(t))y (t) + fz(r(t))z (t).

......

Matb 210 in 2012 . Partial . Suppose that z = f (x, y) is a function defined in a domain D, and P(a, b) is a point in D. Recall that the partial derivatives f (a + h, b) − f (a, b) fx(a, b) = lim , and h→0 h f (a, b + k) − f (a, b) fy(a, b) = lim . k→0 k .The limits are taken along the coordinate axes.

......

Matb 210 in 2012 . . Through the point P(a, b) we choose any direction u = (h, k) = hi + kj, then we consider the straight line through the point P along the direction u given by r(t) = (a + ht, b + kt), and the rate of change of g(t) = f (r(t)) at t = 0 is ′ ( ( ))− ( ( )) ( + + )− ( ) g (0) = lim f r t f r 0 = lim f a th,b tk f a,b . . t→0 t t→0 t

z

T P(x¸, y¸, z¸)

y

3 x

......

Matb 210 in 2012 . Directional Derivative . Through the point P(a, b) we choose any direction u = (h, k) = hi + kj, then we consider the straight line through the point P along the direction u given by r(t) = (a + ht, b + kt), and the rate of change of g(t) = f (r(t)) at t = 0 is ′ ( ( ))− ( ( )) ( + + )− ( ) g (0) = lim f r t f r 0 = lim f a th,b tk f a,b . . t→0 t t→0 t . Suppose that f is differentiable, then it follows from the (multivariate) chain rule that ′ ∂f dx ∂f dy ∂f ∂f g (0) = + = (P)h + (P)k (∂x dt ∂y dt ∂)x ∂y = fx(a, b)i + fy(a, b)j · (hi + kj) = ∇f (a, b) · u, where ∇f is the vector-valued function fxi + fyj, called the gradient of ′ f at the point (x, y). Note g (0) only depends of the choice of the ′ curve. through P(a, b) with direction r (0) only.

......

Matb 210 in 2012 In order to simplify the notation more, one requires the directional vector u to be an unit vector. . ′ Definition (Directional derivative) The resulting derivative g (0) is called the directional derivative Duf of f along the direction u, and hence we write Duf = ∇f · u to represent the rate of the change of f in. the unit direction u. ··· Remark. In general, if f = f (x1, , xn) is a function of n variables, one define ∂f ∂f (i) the gradient of f to be ∇f = ( ∂ , ··· , ∂ ), and x1 xn (ii) the directional derivative Duf by Duf = ∇f · u.

......

Matb 210 in 2012 . Example. Evaluate the directional derivative y f (x, y) = xe + cos(xy) at the point P0(2, 0) in − the. direction 3i 4j.

Remark. The blue curve is the level curve of f at different values. − Solution. Let u = √3i 4i = 3 i − 4 j. And ∇f (2, 0) = 32+42 5 5 y − y − | (fx(2, 0), fy(2, 0)) = (e y sin(xy), xe x sin(xy)) (x,y)=(2,0) = (1, 2). ∇ · 3 − 8 − It follows that Duf (2, 0) = f (2, 0) u = 5 5 = 1.

......

Matb 210 in 2012 . Proposition. The greatest rate of change of a scalar function f , i.e., the maximum directional derivative, takes place in the direction of, ∇ .and has the magnitude of, the vector f . Proof. For any direction v, the directional derivative of f along the direction v at a point P in the domain of f , is given by ( ) = ⟨∇ ( ) v ⟩ = ∥∇ ∥ θ where θ is the angle between Dv P : f P , ∥v∥ f cos , the vectors ∇f (P) and v. Hence Dv(P) attains maximum (minimum) value if and only if cos θ = 1 (−1), if and only if ∇f (P) ( −∇f (P) ) is parallel to v. In this case, we have Dv(P) = ∥∇f ∥ ( −∥∇f ∥ ).

......

Matb 210 in 2012 . Example. (a) Find the directional derivative of f (x, y, z) = 2x3y − 3y2z at P(1, 2, −1) in a direction v = 2i − 3j + 6k. (b) In what direction from P is the directional derivative a maximum? (c). What is the magnitude of the maximum directional derivative? Solution. ∇ 2 3 − − 2 | − (a) f (P) = 6x yi + (2x 6yz)j 3y k (1,2,−1) = 12i + 14j 12k at P. Then the directional derivative of f along the direction v is v √2i−3j+6k 90 given by Dvf = ∇f · = ⟨12i + 14j − 12k, ⟩ = − . ∥v∥ 22+32+62 7 (b) Dvf (P) is maximum(minimum) ⇐⇒ v (−v) is parallel to ∇f (P) = 12i + 14j − 12k. (c) The maximum magnitude of Dvf (P) is given by ∇ ( ) ∥∇ ( )∥2 ∇f · f P = f P = ∥∇f (P)∥ = ∥12i + 14j − 12k∥ = √ ∥∇f (P)∥ ∥∇f (P)∥ 144 + 196 + 144 = 22.

......

Matb 210 in 2012 . Proposition. Let C : r(t) = x(t)i + y(t)j + z(t)k be a curve lying on the level surface S : f (x, y, z) = c for some c, i.e. c = f (r(t)) = f ( x(t), y(t), z(t)) for all t. Then the gradient vector ∇f ′ of f is always perpendicular to the tangent vector r (t) at r(t) for all t ∇ ⊥ ′ i.e.. f (r(t)) r (t) Proof. Define the composite function g(t) = f ( x(t), y(t), z(t)), it follows from the given condition that g(t) = f ( x(t), y(t), z(t) ) = c is a , so one can differentiate the identity c = g(t) = f ( x(t), y(t), z(t)), so ′ ∂f · dx ∂f · dy ∂f · dx ⟨∇ ′ ⟩ 0 = g (t) = ∂x dt + ∂y dt + ∂z dt = f (r(t)), r (t) for all t. So ′ ∇f ⊥ r (t) at r(t) for all t.

......

Matb 210 in 2012 . Proposition. Let f (x, y, z) be a differentiable function defined in R3, and S : f (x, y, z) = c be a level surface for some constant c, i.e. S = { (x, y, z) | f (x, y, z) = c }. Suppose that P(a, b, c) be a point on S such that the gradient vector ∇f (a, b, c) of f at point P(a, b, c) is not zero, then the of the tangent plane of S at P is given by < ∇f (a, b, c), (x − a, y − b, z − c) >= 0, i.e. − − − . fx(a, b, c)(x a) + fy(a, b, c)(y b) + fz(a, b, c)(z c) = 0.

. Remark. For any given level surface S defined by a scalar function f , the tangent plane of S at any P of S is spanned by the tangent vector of the curve contained in S. The result above tells us that the direction to the tangent plane of S at any point P of S is parallel to ∇ . f (P)...... Matb 210 in 2012 . Let f (x, y) be a differentiable function defined on xy-plane. For any k, recall the level level of f for k is given by the set { (x, y) | f (x, y) = k }. When the value k changes, the level curve changes. gradually. . Let f (x, y) = x2 − 7xy + 2y2 defined on xy-plane. The blue represent the level curves Ck : f (x, y) = k of various values c. And the red arrows represent the gradient vector field ∇f (a, b) = ( fx(a, b), fy(a, b)) which is normal to the tangent vector to level .curve Ca at P(a, b) of various values k. . Proposition. Let Ck : f (x, y) = k be a fixed level curve with a point P(a, b) in C − k. If ∇f (a, b) ̸= (0, 0), then the equation of the tangent ∇ · − − line of Ck at P is given by f (a, b) (x a, y b) = 0, i.e. − − .fx(a, b)(x a) + fy(a, b)(y b) = 0.

......

Matb 210 in 2012 . α α α Example. Let F(x, y, z) = x + y + z , where α is non-zero number. Determine the equation of the tangent plane of the level surface S : F(x, y, z) = k of some point P(a, b, c) in S, where k is a positive .constant. Solution. The normal direction N of the tangent plane of S at P is α− α− α− parallel to ∇F(x, y, z) = α(x 1, y 1, z 1) evaluated at P(a, b, c). So α− α− α− N = (a 1, b 1, c 1), it follows that the equation of the tangent plane of S at P(a, b, c) is given by 0 = ⟨N, (x − a, y − b, z − c)⟩ α− α− α− = a 1(x − a) + b 1(y − b) + c 1(z − c), So the equation of the tangent plane of S at P is given by α− α− α− α α α a 1x + b 1y + c 1z = a + b + c = F(a, b, c) = k.

......

Matb 210 in 2012 . Example. Show that the surface S : x2 − 2yz + y3 = 4 is perpendicular 2 2 2 to any member of the family of surfaces Sa : x + 1 = (2 − 4a)y + az − .at the point of intersection P(1, 1, 2).

Solution. Let the defining of level surfaces S, Sa be F(x, y, z) = x2 − 2yz + y3 − 4 = 0 and G(x, y, z) = x2 + 1 − (2 − 4a)y2 − az2 = 0. Then ∇F(x, y, z) = 2xi + (3y2 − 2z)j − 2yk, and ∇G(x, y, z) = 2xi − 2(2 − 4a)yj − 2azk. Thus, the normals to the two surfaces at P(1, −1, 2) are given by − − − N1 = 2i j + 2k, N2 = 2i + 2(2 4a)j 4ak. Since · − − − N1 N2 = (2)(2) 2(2 4a) (2)(4a) = 0, it follows that N1 and N2 are perpendicular for all a, and so the required result follows.

......

Matb 210 in 2012 . Implicit Functions . Given a relation between two variables expressed by an equation of the form f (x, y) = k, we often want to “ solve for y.” That is, for each given x in some interval, we expect to find one and only one value y = φ(x) that satisfies the relation. The function φ is thus implicit in the relation; geometrically, the locus of the equation f (x, y) = k is a level curve in the (x, y)-plane that serves as the graph of the function φ .y = (x). . Example. Let C : x2 + y2 = 1 be a level curve defined by a function f (x, y) = x2 + y2. Is it possible that this level curve C in xy-plane is given. by the graph of some "nice" function?

If y = g(x), then√ we have 1 = x2 + (g(x))2, and hence g(x)2 = 1 − x2, so g(x) = ± 1 − x2. Though we find out a possible representation of y = g(x), which is usually called "explicit function," in fact g not differentiable at x = ±1. On the contrary, we call y is defined implicitly by f (x, y) = c.

......

Matb 210 in 2012 The most familiar example of an implicitly defined function is provided by the equation f (x, y) = x2 + y2. The locus or level curve f (x, y) = k is a of radius k if k > 0, we can√ view it as the graph of two different functions, y = φ±(x) = ± k − x2.

√ √ − we can take either P+(0, + k) or P(0, k) as a fixed point of the level curve, so that φ± defines a function respectively√ such that (i) the graph passes through the point P±(0, ± k), and (ii) the graph of f lies completely on the level curve, i.e. all the points (x, φ±(x)) lies on the level curve, f (x, φ±(x)) = k for all x ∈dom(f ).

......

Matb 210 in 2012 . The explicit functions φ± defined by means of implicit function f (x, y) = k, satisfy √ (i) the graph passes through the point P±(0, ± k), and (ii) the graph of f lies completely on the level curve, i.e. all the points φ φ ∈ .(x, ±(x)) lies on the level curve, f (x, ±(x)) = k for all x dom(f ).

. √ Thing completely fails if we chose the point P( k, 0), the reason is that a function√ can takes√ on only one√ value, though we can write down y = + k − x2 for k ≤ x ≤ k, but the graph can not be extended to any bigger domain√ to meet the second condition (ii). Moreover,√ the function y = + k − x2 does not have any derivative at x. = k, which checked directly.

......

Matb 210 in 2012 . Implicit Function Theorem I. Let C : f (x, y) = k be a level curve defined by a differentiable scalar function f of 2 variables. Suppose ∂f ̸ P(a, b) is a point in the domain of f such that ∂y (P) = 0, then there exists δ > 0 and a differentiable function g defined in an interval I = (a − δ, a + δ) such that (i) f (x, g(x)) = c for all x ∈ I with g(a) = b; i.e. y = g(x) is an explicit function defined by the level curve C; and ′ f (x, g(x)) (ii) g (x) = − x for all x ∈ I. . fy(x, g(x)) Remark. (i) In general, we can’t write down the explicit function g. ∂f ̸ (ii) one can interchange the role of x and y, if ∂x (P) = 0.

......

Matb 210 in 2012 Remark. Recall that the level surface associated to a scalar function f and a fixed number k, is the set { (x, y, z) | f (x, y, z) = k }. In general, this set is not expected to have any nice condition. However, we have the following important . Implicit Function Theorem II. Let S : F(x, y, z) = k be a level surface defined by a differentiable scalar function F, and suppose that P(a, b, c) is a point on the level surface, i.e. F(a, b, c) = k. Suppose that ∂F ̸ δ ∂z (P) = 0, then there exists > 0 and a differentiable function z = g(x, y) defined on the open disc B((a, b), δ) such that (i) F(x, y, g(x, y)) = k for all (x, y) ∈ B((a, b), δ), with g(a, b) = c; and ∂g F (x, y, g(x, y)) ∂g Fy(x, y, g(x, y)) (ii) (x, y) = − x (x, y) = − for all ∂x Fz(x, y, g(x, y)) ∂y Fz(x, y, g(x, y)) ∈ δ .(x, y) B((a, b), ).

......

Matb 210 in 2012 . Implicit Function Theorem II. Let S : F(x, y, z) = k be a level surface defined by a differentiable scalar function F, and suppose that P(a, b, c) is a point on the level surface, i.e. F(a, b, c) = k. Suppose that ∂F ̸ δ ∂z (P) = 0, then there exists > 0 and a differentiable function z = g(x, y) defined on the open disc B((a, b), δ) such that (i) F(x, y, g(x, y)) = k for all (x, y) ∈ B((a, b), δ), with g(a, b) = c; and ∂g F (x, y, g(x, y)) ∂g Fy(x, y, g(x, y)) (ii) (x, y) = − x (x, y) = − for all ∂x Fz(x, y, g(x, y)) ∂y Fz(x, y, g(x, y)) ∈ δ .(x, y) B((a, b), ). Remark. Differentiate F(x, y, g(x, y)) = k with respect to x and y respectively by means of chain rule, we have ∂F ∂F ∂g ∂ (x, y, g(x, y)) + (x, y, g(x, y)) · (x, y) = (k) = 0, and the ∂x ∂z ∂x ∂x result follows.

......

Matb 210 in 2012 . xz Let z = z(x, y) be implicitly defined by ze = 2z + y + 1. Find zx at the − .point (x, y, z) = (0, 0, 1). Solution. Write z(x, y) instead of z, and then differentiate the identity z(x, y)exz(x,y) = 2z(x, y) + y + 1 with respect to x, we have xz xz xz zxe + ze (xzx + z) = (ze )x = (2z + y + 1)x = 2zx, hence xz xz 2 xz zx · (e + xze − 2) = −z e . At (x, y, z) = (0, 0, −1), we have 2 zx · (1 + 0 − 2) = −(−1) , i.e. zx(0, 0) = 1.

......

Matb 210 in 2012 . Example. Suppose that the implicit function given by the level surface S : F(x, y, z) = 0 defines the following explicit functions: x = x(y, z), y = y(x, z) and z = x(x, y), where F is a differentiable ∂ ∂ ∂ x · y · z function. Then ∂ ∂ ∂ = . . y z x

∂x Fy Solution. It follows from the implicit function theorem that = − , ∂y Fx ∂y F ∂z F for all (x, y, z) in S. Similarly, we have = − z , and = − x , for ∂z Fy ∂x Fz all (x, y, z) in S.(It follows) ( that ) ( ) ∂x ∂y ∂z Fy F F · · = − · − z · − x = −1, for all (x, y, z) in S. ∂y ∂z ∂x Fx Fy Fz

......

Matb 210 in 2012 . Theorem. Let r(t) = (x(t), y(t), z(t)) be a curve on the level surface ′ S : f (x, y, z) = c, prove that the tangent vector r (t) of the curve r(t) is normal to the gradient ∇f at the point of S. Consequently, ∇f is the normal vector of the tangent plane of level surface S at any point P. (x, y, z) of S. Proof. The result follows easily from differentiate the identity c = f ( x(t), y(t), z(t)) for all the t in the domain of r with the help of d d chain rule, so 0 = (c) = ( f (x(t), y(t), z(t)) ) = dt dt ∂f dx ∂f dy ∂f dz dx dy dz ′ + + = ∇f · ( , , ) = ∇f · r (t), so ∇f is ∂x dt ∂y dt ∂z dt dt dt dt ′ normal to the tangent vector r (t) of the curve.

......

Matb 210 in 2012 . Example. Determine the extremum of the function z = z(x, y) defined 2 2 2 − .implicitly by the equation 3x + 2y + z + 8yz z + 8 = 0. Solution. Define F(x, y, z) = 3x2 + 2y2 + z2 + 8yz − z + 8, so the function z = z(x, y) is in fact the graph of the level surface S associated to the equation F(x, y, z) = 0, or sometimes we just denote it by S : F(x, y, z) = 0. It follows that F(x, y, z(x, y)) = 0, for all (x, y) in the (unspecified) domain of z(x, y), in fact we just think of the equality as an identity in x and y. So differentiate with respect to x and y respectively by means of chain rule, we have ∂ ∂ ∂F ∂x ∂F ∂z ∂z 0 = (0) = ( F(x, y, z(x, y)) ) = + = F + F , so ∂x ∂x ∂x ∂x ∂z ∂x x z ∂x ∂z F (x, y, z(x, y)) F one has (x, y) = − x = − x and ∂x Fz(x, y, z(x, y)) Fz ∂z Fy(x, y, z(x, y)) Fy (x, y) = − = − . One should notice that the ∂y Fz(x, y, z(x, y)) Fz assumption Fz ̸= 0 for all (x, y) in the domain of z = z(x, y) is necessary, which one can obtain explicitly if Fz is known.

......

Matb 210 in 2012 . Example. Determine the extremum of the function z = z(x, y) defined 2 2 2 − .implicitly by the equation 3x + 2y + z + 8yz z + 8 = 0. Solution. Let F(x, y, z) = 3x2 + 2y2 + z2 + 8yz − z + 8. so ∂z F 6x ∂z Fy 4y + 8z = − x = − , and = − = − . To ∂x Fz 2z + 8y − 1 ∂y Fz 2z + 8y − 1 locate the extremum value of z = z(x, y), one need its two partial derivatives zx and zy vanish, i.e. (6x, 4y + 8z) = (0, 0) where (x, y, z) is a point of the level surface S : F(x, y, z) = 0. Hence, x = 0, and y = −2z. Then 0 = F(0, −2z, z) = 2(−2z)2 + z2 + 8(−2z)z − z + 8 = − 2 − − − − 8 − 7z z + 8 = (7z + 8)(z 1) so z = 1 or 7 . Hence P(0, 2, 1) or 16 − 8 Q(0, 7 , 7 ) are the only critical point of the function z = z(x, y), however, z = z(x, y) is not explicitly determined yet. One can determine use the quadratic formula to express z in terms of x and y, − 8 and then one can see that zmax = 1 and zmin = 7 . Remark. In the last part, we skip some details, but the gap can be filled in after we learn the test.

......

Matb 210 in 2012 . Theorem. (Lagrange multiplier). Let f (x, y) and g(x, y) be functions with continuous first-order partial derivatives. If the maximum (minimum) value of f subject to the condition (constraint) given by a level curve C : g(x, y) = 0 occurs at a point P where ∇f (P) ̸= 0, then ∇ λ∇ λ . f (P) = g(P) for some real number . Remarks. 1. The last condition just means that these two vectors ∇f (P) and ∇g(P) are parallel, in other words, at the point where f attains maximum, the level curve of f will tangent to the constraint curve 2. The last equation ∇f (P) = λ∇g(P) gives a necessary condition for finding the point P, though λ is also an unknown:

fx(x, y) = λgx(x, y), fy(x, y) = λgy(x, y), g(x, y) = 0. 3. The similar condition ∇f (P) = λ∇g(P) works for functions of any variables, and the constant λ is called a multiplier.

......

Matb 210 in 2012 . Example. Determine min. value of x2 + y2 subject to the constraint xy. = 1. Solution. Let f (x, y) = x2 + y2 be the objective function, and g(x, y) = xy be the constraint with the level curve given C : g(x, y) = 1. Though C is not a bounded set, one can put more 2 2 ≤ restriction x + y M with the result curve CM which is closed and R2 bounded. As CM is closed and bounded in , then the f attains its minimum on CM at some point in CM. In fact, the minimum value always occurs exactly at the same two points.

One apply the Lagrange multiplier to locate the minimum that ∇f (x, y) = λ∇g(x, y) at those extremum points.

......

Matb 210 in 2012 . Example. Determine min. value of x2 + y2 subject to the constraint xy. = 1. Solution. (One should know that it is only a necessary condition, but not sufficient one.) Hence we have: (2x, 2y) = (λy, λx), and xy = 1. From the last equation, one knows that x ̸= 0 and y ̸= 0, so 2x = λy, and then λ = 2x/y. Substituting, we have 2y = (2x/y)x and hence y2 = x2, i.e. y = ±x. But xy = 1, so x = y = ±1 and the possible points for the extreme values of f are (1, 1) and (−1, −1). The minimum value is f (1, 1) = f (−1, −1) = 2. Remark. Here there is no maximum value for f , since the constraint xy = 1 allows x or y to become arbitrarily large, and hence f (x, y) = x2 + y2 can be made arbitrarily large.

......

Matb 210 in 2012 . Steps of implementing Lagrange multipliers . To find the maximum and minimum values of f (x, y, z) subject to the constraint defined .by the level surface S : g(x, y, z) = k.

Suppose that these extreme values exist and on the surface S, which is related to the condition of S. 1. Find all values of x, y, z and λ such that   fx(x, y, z) = λgx(x, y, z)(1) ∇ λ∇ λ f = g fy(x, y, z) = gy(x, y, z)(2)  fz(x, y, z) = λgz(x, y, z)(3) and g(x, y, z) = k. (4) 2. Evaluate f at all the points (x, y, z) that result from step (a). The largest of these values is the maximum value of f ; the smallest is the minimum value of f .

......

Matb 210 in 2012 . Example. Use Lagrange multipliers to find the point (x, y, z) at which 2 2 2 .x + y + z is minimal subject to x + 2y + 3z = 1. Solution. Let f (x, y, z) = x2 + y2 + z2, and g(x, y, z) = x + 2y + 3z be the objective function and the constraint function respectively. We want to locate the point P(x, y) on the plane x + 2y + 3z = 1, such that ∇f = λ∇g for some λ, i.e. (2x, 2y, 2z) = λ(1, 2, 3), and so λ 3λ 1 = x + 2y + 3z = + 2λ + 3 × = 7λ, 2 2 λ 1 i.e. = 7 . And hence λ λ 3λ (x, y, z) = ( 2 , , 2 ) = (1/14, 1/7, 3/14). Remark. Why does the point (x, y, z) = (1/14, 1/7, 3/14) give the minimum of f ? One can consider the moving point (x, y, z) = (3t + 1, 0, −t) lying on the plane x + 2y + 3z = 1, then f (2t + 1, 0, −t) = (2t + 1)2 + 02 + (−t)2 = (2t + 1)2 + t2 ≥ t2 which does not have any maximum value. However, one can prove that the absolute minimum value of f does exist by means of Cauchy’s inequality, and we skip the proof of this fact...... Matb 210 in 2012 . Example. A rectangular box is placed on the xy-plane so that one vertex at the origin, and the opposite vertex lies in the plane Ax + By + Cz = 1, where A, B and C are positive. Find the maximum volume. of such a box. Solution. It follows from the given condition that the box has dimension x × y × z, with x, y, z > 0 and satisfy Ax + By + Cz = 1. Then the volume V(x, y, z) = xyz, subject to the constraint D = { (x, y, z) | Ax + By + Cz = 1, and x, y, z ≥ 0 }, which is a closed and bounded subset of R3, hence the volume function V attains both maximum and minimum. The minimum volume is obviously 0; and we use Lagrange multiplier to find the maximum volume as follows.(yz, xz, xy) = ∇V(x, y, z) = λ∇(Ax + By + Cz − 1) = (λA, λB, λC). If λ = 0, then one of x, y, and z will be zero, in this case, ( ) = which is not maximum. Assume λ ̸= so V x, y, z 0, √ √ 0 2 xy·xz λC·λB BC BC x = = λ = λ , i.e. x = λ. Similarly, we have √yz √ A √A √ A = AC λ and = AB λ At last, we have = + + = y( B , z C ) . 1 Ax By Cz √ √ √ √ √ √ A BC + B AC + C AB λ = 3 ABC λ, so λ = 1 . Then A B C . . 9. ABC . . . 1 1 1 1 Matb 210 in 2012 Vmax = V( 3A , 3B , 3C ) = 27ABC . . Example. Let r(t) = (a + ht, b + kt) be the line in xy-plane passing through the point P(a, b). Let f be a function defined in a domain D containing P with continuous second order partial derivatives, and that P is a critical point of f i.e. ∇f (P) = 0. Let g(t) = f (r(t)), (i) evaluate the second derivatives of g at t = 0; and (ii) the sign of ′′ 2 g (0) provided that fxx(a, b) > 0 and fxx(a, b)fyy(a, b) − (fxy(a, b)) > 0 ̸ for. (h, k) = (0, 0).

Solution. (i) Let A = fxx(a, b), C = fyy(a, b), B = (fxy(a, b). It follows ′ from chain rule that g (t) = fx(a + ht, b + kt)h + fy(a + ht, b + kt)k, and ′′ 2 hence g (t) = fxx(a + ht, b + kt)h + fxy(a + ht, b + kt)hk + fyx(a + 2 ht, b + kt)kh + fyy(a + ht, b + kt)k . In particular, at t = 0, ′′ 2 2 2 2 g (0) = fxx(a, b)h + 2fxy(a, b)hk + fyy(a, b)k = Ah + 2Bhk + Ck . 2 (ii) As A = fxx(a, b) > 0, and AC − B > 0, then for s ∈ R, then 2 1 · 2 2 2 − 2 ℓ(s) = As + 2Bs + C = A (A s + 2ABs + B ) + C B /A = − 2 − 2 1 (As + B)2 + AC B ≥ AC B > 0. So , and hence A′′ A A g (0) = Ah2 + 2Bhk + Ck2 = k2 · (A(h/k)2 + 2Bh/k + C) = k2ℓ( h ) > 0 ′′ k for all (h, k) ∈ R2 with k ̸= 0. If k = 0, then g (0) = Ah2 > 0 for all ̸= h 0......

Matb 210 in 2012 . Proposition. (Maximum-Minimum Test for Quadratic Functions) Let g(x, y) = Ax2 + 2Bxy + Cy2, where A, B, C are constants. 1. If AC − B2 > 0, and A > 0, [respectively A < 0], then g(x, y) has a minimum [respectively maximum] at (0, 0). 2. If AC − B2 < 0, then g(x, y) takes both positive and negative values near (0, 0), so (0, 0) is not a local extremum for g. . Proof. To prove these assertions, we consider the two cases separately. (1)( If AC − B2 > 0, then) A (cannot be zero (why?), so g(x), y) = 2 2 A x2 + 2B xy + C y2 = A x2 + 2B xy + B y2 C y2 − B y2 ( A ) A A A2 A A2 2 B 1 − 2 2 = A x + A y + A (AC B )y . Both terms above have the same B sign as A, and they are both zero only when x + A y = 0 and y = 0, i.e. (x, y) = (0, 0). Thus (0, 0) is a minimum point for g if A > 0 (since g(x, y) > 0 if (x, y) ̸= (0, 0)) and a maximum point if A < 0 (since g(x, y) < 0 if (x, y) ̸= (0, 0) ). This completes the proof of (1)

......

Matb 210 in 2012 . Proposition. (Maximum-Minimum Test for Quadratic Functions) Let g(x, y) = Ax2 + 2Bxy + Cy2, where A, B, C are constants. 1. If AC − B2 > 0, and A > 0, [respectively A < 0], then g(x, y) has a minimum [respectively maximum] at (0, 0). 2. If AC − B2 < 0, then g(x, y) takes both positive and negative values near (0, 0), so (0, 0) is not a local extremum for g. . Proof. (2). If AC − B2 < 0 and A ̸= 0, then formula (1) still applies, but now the terms on the right-hand side have opposite signs. By suitable choices of x and y (try it!), we can make either term zero and the other nonzero. If A = 0, then g(x, y) = y(2Bx + Cy), so we can again achieve both signs. Remark. In case (2), (0, 0) is called a saddle point for g(x, y).

......

Matb 210 in 2012 . Theorem. (Second Derivatives Test) Suppose the second partial derivatives of f (x, y) are continuous on a disk with center (a, b), and suppose that ∇f (a, b) = (0, 0) i.e. (a, b) is a critical point of f . Let 2 D = D(a, b) = fxx(a, b)fyy(a, b) − [fxy(a, b)] . 1 If D > 0 and fxx(a, b) > 0, then f (a, b) is a local minimum; . 2 If D > 0 and fxx(a, b) < 0, then f (a, b) is a local maximum; 3. If D < 0, then f (a, b) is neither a local maximum nor a local . minimum.

......

Matb 210 in 2012 . Example. Determine the nature of the critical points of 3 3 − f. (x, y) = x + y 6xy. Solution. As ∇f (x, y) = (3x2 − 6y, 3y2 − 6x), so x2 = 2y and y2 = 2x. It follows that x4 = 4y2 = 4 × 2x = 8x, i.e. 0 = x4 − 8x = x(x3 − 23) = x(x − 2)(x2 + 2x + 4). As (x2 + 2x + 4) = (x + 1)2 + 3 > 0, we have x = 0 or x = 2. So 2y = 02 or 22, so the critical points of f are (0, 0) and (2, 2). Next we need to apply the 2nd derivative test.And fxx = 6x, fyy = 6y, fxy = −6, and the ∆ − 2 − − 2 − (x, y) = fxxfyy fxy = (6x)(6y) ( 6) = 36(xy 1). And ∆(0, 0) = −36 < 0, ∆(2, 2) = 36(4 − 1) = 108. Hence (0, 0) is a saddle point of f , where (2, 2) is a local minimum point of f .

......

Matb 210 in 2012 . Taylor’s Formula for f (x, y) at the Point (a, b) . Theorem. Suppose f (x, y) and its partial derivatives through order n + 1 are continuous throughout an open rectangular region R centered at a point (a, b). Then, throughout R, f (a + h, b + k) = f (a, b) + (hf + kf )| + ··· | {zx y (a,b}) Linear or 1st order approximation f (a + h, b + k) | 1 2 2 | ··· = f (a, b) + (hfx + kfy) (a,b) + (h fxx + 2hkfxy + k fyy) (a,b) + | 2!{z } 2nd order approximation f (a + h, b + k) | 1 2 2 | = f (a, b) + (hfx + kfy) (a,b) + 2! (h fxx + 2hkfxy + k fyy) (a,b) + 1 (h3f + 3h2kf + 2hk2f + k3f )| + ··· 3! ( xxx ) xxy xyy ( yyy (a,b)) n n+1 + 1 ∂ + ∂ | + 1 ∂ + ∂ | n! h ∂x k ∂y f (a,b) (n+1)! h ∂x k ∂y f (a+ch,b+ck) ∈ .for some c (0, 1).

......

Matb 210 in 2012 . Taylor’s Theorem. Suppose f (x, y) and its partial derivatives through order n + 1 are continuous throughout an open rectangular region R centered at a point (a, b). Then, throughout R, | 1 2 2 | = f (a, b) + (hfx + kfy) (a,b) + 2! (h fxx + 2hkfxy + k fyy) (a,b) + 1 (h3f + 3h2kf + 2hk2f + k3f )| + ··· 3! ( xxx ) xxy xyy ( yyy (a,b)) n n+1 + 1 ∂ + ∂ | + 1 ∂ + ∂ | n! h ∂x k ∂y f (a,b) (n+1)! h ∂x k ∂y f (a+ch,b+ck) ∈ .for some c (0, 1). . Remarks. 1. The proof just applies the chain rule and the trick of n-th Taylor to the function g(t) = f (a + ht, b + kt) one variable. 2. If one have an estimate the last term (in blue), for example an upper bound, then we can estimate the given function by means of in 2 variables. 3. The theorem can be easily generalized to function of n variables for n ≥ 1. Though this topics is not treated in this book, but its application is important in other courses, so we put the result in this notes for the sake of students...... Matb 210 in 2012