| |

4: Differential Calculus of Several Variables

Extending derivatives to functions of multiple variables.


Functions of Several Variables

A function f:RnRf: \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)=1x2y2f(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:

fx=fx=limh0f(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} fy=fy=limh0f(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=2fx2,fyy=2fy2,fxy=2fyxf_{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=fx,fy,fz\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=fu=fcosθD_\mathbf{u} f = \nabla f \cdot \mathbf{u} = |\nabla f| \cos\theta

Maximum: Duf=fD_\mathbf{u} f = |\nabla f| when u\mathbf{u} is parallel to f\nabla f

Minimum: Duf=fD_\mathbf{u} f = -|\nabla f| when u\mathbf{u} is opposite to f\nabla f

Zero: Duf=0D_\mathbf{u} f = 0 when uf\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=fxdxdt+fydydt\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)

zs=fxxs+fyys\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} zt=fxxt+fyyt\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)):

zf(a,b)=fx(a,b)(xa)+fy(a,b)(yb)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)(xa)+fy(a,b)(yb)f(x, y) \approx f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b)

Total Differential

df=fxdx+fydydf = \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=limh0f(x+h,y)f(x,y)hf_x = \lim_{h \to 0} \frac{f(x+h, y) - f(x,y)}{h}
Gradientf=fx,fy,fz\nabla f = \langle f_x, f_y, f_z \rangle
Directional derivativeDuf=fuD_\mathbf{u} f = \nabla f \cdot \mathbf{u}
Tangent planez=f(a,b)+fx(xa)+fy(yb)z = f(a,b) + f_x(x-a) + f_y(y-b)
Critical pointsf=0\nabla f = \mathbf{0}
Lagrange multipliersf=λg\nabla f = \lambda \nabla g