3.2 Higher Order Partial If f is a of several variables, then we can find higher order partials in the following manner.

∂f ∂f Definition. If f(x, y) is a function of two variables, then ∂x and ∂y are also functions of two variables and their partials can be taken. Hence we can differentiate them with respect to x and y again and find,

∂2f ∂x2 , the of f taken twice with respect to x,

∂2f ∂x∂y , the derivative of f with respect to y and then with respect to x,

∂2f ∂y∂x , the derivative of f with respect to x and then with respect to y,

∂2f ∂y2 , the derivative of f taken twice with respect to y.

∂3f We can carry on and find ∂x∂y2 , which is taking the derivative of f first with respect to y twice, and then differentiating with respect to x, etc. In this manner we can find nth-order partial derivatives of a function.

∂2f ∂2f Theorem ∂x∂y and ∂y∂x are called mixed partial derivatives. They are equal ∂2f ∂2f when ∂x∂y and ∂y∂x are continuous.

Note. In this course all the fuunctions we will encounter will have equal mixed partial derivatives.

Example. 1. Find all partials up to the second order of the function

f(x, y) = x4y2 − x2y6. Solution: ∂f = 4x3y2 − 2xy6 ∂x ∂f = 2x4y − 6x2y5 ∂y ∂2f = 12x2y2 − 2y6 ∂x2 ∂2f = 8x3y − 12xy5 ∂y∂x ∂2f = 2x4 − 30x2y4 ∂y2 ∂2f = 8x3 − 12xy5 ∂x∂y

Notations: ∂f f = x ∂x ∂f f = y ∂y ∂2f f = xx ∂x2 ∂2f f = yy ∂y2 ∂2f f = xy ∂x∂y 3.3 You are familiar with the chain rule for functions of one : if f is a function of u, denoted by f = f(u), and u is a function of x, denoted u = u(x). Then df df du = . dx du dx

Chain Rules for First-Order Partial Derivatives For a two-dimensional version, suppose z is a function of u and v, denoted

z = z(u, v) and u and v are functions of x and y,

u = u(x, y) and v = v(x, y) then ∂z ∂z ∂u ∂z ∂v = + ∂x ∂u ∂x ∂v ∂y ∂z ∂z ∂u ∂z ∂v = + ∂y ∂u ∂y ∂v ∂y z ∂z oo PPP ∂z ∂u ooo PPP ∂v ooo PPP ooo PPP u wooo PP' v ∂u  ?? ∂u ∂v  ?? ∂v ∂x  ?? ∂y ∂x  ?? ∂y  ??  ?  ??  ?? x  y x  y

Example. 1. Find the first partial derivatives using chain rule.

z = z(u, v) u = xy v = 2x + 3y Solution: ∂z ∂z ∂u ∂z ∂v = + ∂x u ∂x v ∂x ∂z ∂z = y + 2 u v ∂z ∂z ∂u ∂z ∂v = + ∂y u ∂y v ∂y ∂z ∂z = x + 3 u v

Chain Rule for Second Order Partial Derivatives To find second order partials, we can use the same techniques as first order partials, but with more care and patience!

Example. Let

z = z(u, v) u = x2y v = 3x + 2y

∂2z 1. Find ∂y2 .

∂2z Solution: We will first find ∂y2 . ∂z ∂z ∂u ∂z ∂v ∂z ∂z = + = x2 + 2 . ∂y ∂u ∂y ∂v ∂y ∂u ∂v Now differentiate again with respect to y to obtain

∂2z ∂ ∂z ∂ ∂z = (x2 ) + (2 ) ∂y2 ∂y ∂u ∂y ∂v ∂ ∂z ∂ ∂z = x2 ( ) + 2 ( ) ∂y ∂u ∂y ∂v Note that z is a function of u and v, and u and v are functions of x and ∂z ∂z y. Then the partial derivatives ∂u and ∂v are also initially functions of u and v and eventually functions of x and y. In other words we have the same dependence diagram as z. ∂ ∂z ∂2z ∂2z Note. ∂y ( ∂u ) 6= ∂y∂u ). Never write ∂y∂u as it is mathematically mean- ingless.

∂z 2 ∂u ∂ z p NN ∂2z 2 pp NN ∂u ppp NNN∂v∂u ppp NNN ppp NNN u wpp N' v ∂u  ?? ∂u ∂v  ?? ∂v ∂x  ?? ∂y ∂x  ?? ∂y  ??  ?  ??  ?? x  y x  y

∂z ∂v 2 ∂2z p NN ∂ z pp NN 2 ∂u∂v ppp NNN∂v ppp NNN ppp NNN u wpp N' v ∂u  ?? ∂u ∂v  ?? ∂v ∂x  ?? ∂y ∂x  ?? ∂y  ??  ?  ??  ?? x  y x  y Therefore ∂2z ∂2z ∂u ∂2z ∂v ∂2z ∂u ∂2z ∂v = x2( + ) + 2( + ) ∂y2 ∂u2 ∂y ∂v∂u ∂y ∂u∂v ∂y ∂v2 ∂y ∂2z ∂2z ∂2z ∂2z = x2(x2 + 2 ) + 2(x2 + 2 ) ∂u2 ∂v∂u ∂u∂v ∂v2 The mixed partials are equal so the answer simplifies to

∂2z ∂2z ∂2z ∂2z = x4 + 4x2 + 4 . ∂y2 ∂u2 ∂u∂v ∂v2

∂2z 2. Find ∂x∂y Solution: We have ∂z ∂z ∂u ∂z ∂v ∂z ∂z = + = x2 + 2 . ∂y ∂u ∂y ∂v ∂y ∂u ∂v Now differentiate again with respect to x to obtain ∂2z ∂ ∂z ∂ ∂z = (x2 ) + (2 ) ∂x∂y ∂x ∂u ∂x ∂v ∂ ∂z ∂z ∂ ∂z = x2 ( ) + 2x + 2 ( ) ∂x ∂u ∂u ∂x ∂v ∂2z ∂u ∂2z ∂v ∂z ∂2z ∂u ∂2z ∂v = x2( + ) + 2x + 2( + ) ∂u2 ∂x ∂v∂u ∂x ∂u ∂u∂v ∂x ∂v2 ∂x ∂2z ∂2z ∂z ∂2z ∂2z = x2(2xy + 3 ) + 2x + 2(2xy + 3 ) ∂u2 ∂v∂u ∂u ∂u∂v ∂v2 ∂2z ∂2z ∂z ∂2z = 2x3y + (3x2 + 4xy) ) + 2x + 6 ∂u2 ∂v∂u ∂u ∂v2

3.4 Recall from 1-dimensional , to find the points of maxima and minima of a function, we first find the critical points i.e where the line is horizontal f 0(x) = 0. Then (i) If f 00(x) > 0 the is increasing and we have a local minimum.

(ii) If f 00(x) < 0 the gradient is decreasing and we have a local maximum.

(iii) If f 00(x) = 0 it is inconclusive.

Critical Points of a function of 2 variables We are now interested in finding points of local maxima and minima for a function of two variables.

Definition. A function f(x, y) has a relative minimum (resp. maximum) at the point (a, b) if f(x, y) ≥ f(a, b) (resp. f(x, y) ≤ f(a, b)) for all points (x, y) in some region around (a, b)

Definition. A point (a, b) is a critical point of a function f(x, y) if one of the following is true

(i) fx(a, b) = 0 and fy(a, b) = 0

(ii) fx(a, b) and/or fy(a, b) does not exist. Classification of Critical Points We will need two quantities to classify the critical points of f(x, y):

1. fxx, the second of f with respect to x.

2 2. H = fxxfyy − fxy the Hessian If the Hessian is zero, then the critical point is degenerate. If the Hessian is non-zero, then the critical point is non-degenerate and we can classify the points in the following manner:

case(i) If H > 0 and fxx < 0 then the critical point is a relative maximum.

case(ii) If H > 0 and fxx > 0 then the critical point is a relative minimum. case(iii) If H < 0 then the critical point is a saddle point.

Example. Find and classify the critical points of

12x3 + y3 + 12x2y − 75y.

Solution: We first find the critical points of the function.

2 fx = 36x + 24xy = 12x(3x + 2y) 2 2 2 2 fy = 3y + 12x − 75 = 3(4x + y − 25).

The critical points are the points where fx = 0 and fy = 0

fx = 0 12x(3x + 2y) = 0

Therefore either x = 0 or 3x + 2y = 0. We handle the two cases separately;

case(i) x = 0. 2 Then substituting this in fy we get fy = 3(y −25) = 0 implies y = ±5. case(ii) 3x + 2y = 0. Then y = −3x/2 and substituting this in fy we get,

9x2 f = 3(4x2 + − 25) y 4 3 = (16x2 + 9x2 − 100) 4 3 = (25x2 − 100) 4 75 = (x2 − 4) 4 fy = 0 75 (x2 − 4) = 0 4 x2 − 4 = 0 x = ±2

Thus we have found four critical points: (0, 5), (0, −5), (2, −3), (−2, 3). We must now classify these points.

fxx = 72x + 24y = 24(3x + y)

fxy = 24x

fyy = 6y 2 H = fxxfyy − fxy = (24)(3x + y)(6y) − (24x)2

Points fxx H Type (0, 5) 120 3600 Minimum (0, −5) -120 3600 Maximum (2, −3) 72 -3600 Saddle (−2, 3) -72 -3600 Saddle References

1. Engineering Mathematics, by K. A. Stroud.

2. A complete set of notes on Pre-Calculus, Single Variable Calculus, Multi- variable Calculus and Linear Algebra. Here is a link to the chapter on Higher Order Partial Differentiation. http://tutorial.math.lamar.edu/Classes/CalcIII/HighOrderPartialDerivs.aspx.

Here is a link to the chapter on Chain Rules. http://tutorial.math.lamar.edu/Classes/CalcIII/ChainRule.aspx.

Here is a link to the chapter on Maxima and Minima. http://tutorial.math.lamar.edu/Classes/CalcIII/RelativeExtrema.aspx

3. A collection of examples, animations and notes on . http://people.usd.edu/ jflores/MultiCalc02/WebBook/Chapter 15/

4. Links to various resources on Calculus. http://www.calculus.org/.