| |

4: Differential Calculus of Several Variables

Extending derivatives to functions of multiple variables.


Functions of Several Variables

A function f:Rnโ†’Rf: \mathbb{R}^n \to \mathbb{R} assigns a real number to each point in nn-dimensional space.

Examples:

  • f(x,y)=x2+y2f(x, y) = x^2 + y^2 (paraboloid)
  • f(x,y)=1โˆ’x2โˆ’y2f(x, y) = \sqrt{1 - x^2 - y^2} (hemisphere)
  • f(x,y,z)=x2+y2+z2f(x, y, z) = x^2 + y^2 + z^2 (distance squared from origin)

Level Curves and Surfaces

Level curve: Set of points where f(x,y)=cf(x, y) = c (constant)

Level surface: Set of points where f(x,y,z)=cf(x, y, z) = c

These are the โ€œcontour linesโ€ on a topographic map.


Limits and Continuity

limโก(x,y)โ†’(a,b)f(x,y)=L\lim_{(x,y) \to (a,b)} f(x, y) = L

means f(x,y)f(x, y) approaches LL as (x,y)(x, y) approaches (a,b)(a, b) along any path.

Showing a Limit Doesnโ€™t Exist

Find two different paths to (a,b)(a, b) that give different limits.

Example: For f(x,y)=xyx2+y2f(x, y) = \frac{xy}{x^2 + y^2}:

  • Along y=0y = 0: limโก=0\lim = 0
  • Along y=xy = x: limโก=12\lim = \frac{1}{2}

So the limit doesnโ€™t exist at (0,0)(0, 0).


Partial Derivatives

Hold all variables constant except one, then differentiate:

โˆ‚fโˆ‚x=fx=limโกhโ†’0f(x+h,y)โˆ’f(x,y)h\frac{\partial f}{\partial x} = f_x = \lim_{h \to 0} \frac{f(x+h, y) - f(x, y)}{h} โˆ‚fโˆ‚y=fy=limโกhโ†’0f(x,y+h)โˆ’f(x,y)h\frac{\partial f}{\partial y} = f_y = \lim_{h \to 0} \frac{f(x, y+h) - f(x, y)}{h}

Higher-Order Partials

fxx=โˆ‚2fโˆ‚x2,fyy=โˆ‚2fโˆ‚y2,fxy=โˆ‚2fโˆ‚yโˆ‚xf_{xx} = \frac{\partial^2 f}{\partial x^2}, \quad f_{yy} = \frac{\partial^2 f}{\partial y^2}, \quad f_{xy} = \frac{\partial^2 f}{\partial y \partial x}

Clairautโ€™s Theorem: If fxyf_{xy} and fyxf_{yx} are continuous, then fxy=fyxf_{xy} = f_{yx}.


The Gradient

The gradient of ff is the vector of partial derivatives:

โˆ‡f=โŸจโˆ‚fโˆ‚x,โˆ‚fโˆ‚y,โˆ‚fโˆ‚zโŸฉ\nabla f = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right\rangle

Key Properties

  1. โˆ‡f\nabla f points in the direction of steepest increase
  2. โˆฃโˆ‡fโˆฃ|\nabla f| is the rate of steepest increase
  3. โˆ‡f\nabla f is perpendicular to level curves/surfaces

Directional Derivatives

The rate of change of ff in direction u\mathbf{u} (unit vector):

Duf=โˆ‡fโ‹…u=โˆฃโˆ‡fโˆฃcosโกฮธD_\mathbf{u} f = \nabla f \cdot \mathbf{u} = |\nabla f| \cos\theta

Maximum: Duf=โˆฃโˆ‡fโˆฃD_\mathbf{u} f = |\nabla f| when u\mathbf{u} is parallel to โˆ‡f\nabla f

Minimum: Duf=โˆ’โˆฃโˆ‡fโˆฃD_\mathbf{u} f = -|\nabla f| when u\mathbf{u} is opposite to โˆ‡f\nabla f

Zero: Duf=0D_\mathbf{u} f = 0 when uโŠฅโˆ‡f\mathbf{u} \perp \nabla f (along level curve)


Chain Rule

Case 1: z=f(x,y)z = f(x, y) where x=g(t)x = g(t), y=h(t)y = h(t)

dzdt=โˆ‚fโˆ‚xdxdt+โˆ‚fโˆ‚ydydt\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}

Case 2: z=f(x,y)z = f(x, y) where x=g(s,t)x = g(s, t), y=h(s,t)y = h(s, t)

โˆ‚zโˆ‚s=โˆ‚fโˆ‚xโˆ‚xโˆ‚s+โˆ‚fโˆ‚yโˆ‚yโˆ‚s\frac{\partial z}{\partial s} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial s} โˆ‚zโˆ‚t=โˆ‚fโˆ‚xโˆ‚xโˆ‚t+โˆ‚fโˆ‚yโˆ‚yโˆ‚t\frac{\partial z}{\partial t} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial t}

Implicit Differentiation

If F(x,y)=0F(x, y) = 0 defines yy implicitly as a function of xx:

dydx=โˆ’FxFy\frac{dy}{dx} = -\frac{F_x}{F_y}

Tangent Planes and Linear Approximation

Tangent Plane

To surface z=f(x,y)z = f(x, y) at (a,b,f(a,b))(a, b, f(a, b)):

zโˆ’f(a,b)=fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)z - f(a, b) = f_x(a, b)(x - a) + f_y(a, b)(y - b)

Linear Approximation

f(x,y)โ‰ˆf(a,b)+fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)f(x, y) \approx f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b)

Total Differential

df=โˆ‚fโˆ‚xdx+โˆ‚fโˆ‚ydydf = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy

Optimization

Critical Points

Points where โˆ‡f=0\nabla f = \mathbf{0} (or gradient doesnโ€™t exist).

fx=0andfy=0f_x = 0 \quad \text{and} \quad f_y = 0

Second Derivative Test

At critical point (a,b)(a, b), compute:

D=fxx(a,b)fyy(a,b)โˆ’[fxy(a,b)]2D = f_{xx}(a, b) f_{yy}(a, b) - [f_{xy}(a, b)]^2
ConditionConclusion
D>0D > 0 and fxx>0f_{xx} > 0Local minimum
D>0D > 0 and fxx<0f_{xx} < 0Local maximum
D<0D < 0Saddle point
D=0D = 0Test inconclusive

Lagrange Multipliers

To optimize f(x,y)f(x, y) subject to constraint g(x,y)=cg(x, y) = c:

Solve the system:

โˆ‡f=ฮปโˆ‡g\nabla f = \lambda \nabla g g(x,y)=cg(x, y) = c

Geometric interpretation: At the optimum, โˆ‡f\nabla f is parallel to โˆ‡g\nabla g (level curve of ff is tangent to constraint curve).


Summary

ConceptFormula
Partial derivativefx=limโกhโ†’0f(x+h,y)โˆ’f(x,y)hf_x = \lim_{h \to 0} \frac{f(x+h, y) - f(x,y)}{h}
Gradientโˆ‡f=โŸจfx,fy,fzโŸฉ\nabla f = \langle f_x, f_y, f_z \rangle
Directional derivativeDuf=โˆ‡fโ‹…uD_\mathbf{u} f = \nabla f \cdot \mathbf{u}
Tangent planez=f(a,b)+fx(xโˆ’a)+fy(yโˆ’b)z = f(a,b) + f_x(x-a) + f_y(y-b)
Critical pointsโˆ‡f=0\nabla f = \mathbf{0}
Lagrange multipliersโˆ‡f=ฮปโˆ‡g\nabla f = \lambda \nabla g