Real-world engineering problems rarely involve just one variable. The stress in a beam depends on load, length, and cross-section. The volume of a gas depends on pressure and temperature. To analyze these, we need multivariable calculus.
Functions of Several Variables
Multivariable Function
A function z=f(x,y) assigns a unique output z for every pair (x,y) in its domain. The graph of such a function is a surface in 3D space.
Partial Derivatives
When we differentiate a function of multiple variables, we must specify which variable is changing while holding the others constant. This is a partial derivative.
Notation
∂x∂z or fx: Partial derivative with respect to x (treat y as constant).
∂y∂z or fy: Partial derivative with respect to y (treat x as constant).
Note the use of the "curly d" symbol (∂).
Interact with the simulation below to explore partial derivatives.
Partial Derivatives
Visualizing Surface: z=0.5(x2−y2) Red Arrow: Slope along x-axis (∂z/∂x) Green Arrow: Slope along y-axis (∂z/∂y)
0.50
0.50
z value:0.00
Slope X (∂z/∂x):0.50
Slope Y (∂z/∂y):-0.50
Drag to Rotate | Scroll to Zoom
Higher-Order Partial Derivatives
Just like single-variable functions, we can take second derivatives.
Second-Order Partial Derivatives
fxx=∂x2∂2z
fyy=∂y2∂2z
fxy=∂x∂y∂2z (Mixed partial: differentiate w.r.t x then y)
fyx=∂y∂x∂2z (Mixed partial: differentiate w.r.t y then x)
Clairaut's Theorem
Clairaut's Theorem: If the mixed partial derivatives are continuous, then the order doesn't matter: fxy=fyx.
Extrema of Functions of Two Variables (Second Partials Test)
To find the relative maxima and minima of a surface z=f(x,y), we first find critical points where fx=0 and fy=0. Then, we use the Second Partials Test (involving the Hessian determinant) to classify them.
The Second Partials Test
STEP-BY-STEP
Find all critical points (a,b) such that fx(a,b)=0 and fy(a,b)=0.
Compute the second partial derivatives: fxx, fyy, and fxy.
Evaluate the discriminant (Hessian determinant) at (a,b): D=fxx(a,b)fyy(a,b)−[fxy(a,b)]2
Classify the point based on D:
If D>0 and fxx(a,b)>0, then f(a,b) is a local minimum.
If D>0 and fxx(a,b)<0, then f(a,b) is a local maximum.
If D<0, then (a,b) is a saddle point (neither max nor min, looks like a horse saddle).
If D=0, the test is inconclusive.
Lagrange Multipliers
Optimization problems in engineering often come with constraints. For instance, maximizing the volume of a box given a fixed amount of surface area material. The method of Lagrange Multipliers solves constrained optimization problems.
Method of Lagrange Multipliers
To maximize or minimize f(x,y,z) subject to the constraint g(x,y,z)=c, we find the points where the gradient of f is parallel to the gradient of g. This introduces a scalar parameter λ (lambda).
Method of Lagrange Multipliers
Gradient relationship for constrained optimization.
∇f=λ∇g
Variables
Symbol
Description
Unit
∇f
Gradient of the objective function
-
λ
Lagrange multiplier
-
∇g
Gradient of the constraint function
-
This expands into a system of equations: fx=λgx, fy=λgy, fz=λgz, along with the original constraint g(x,y,z)=c. Solving this system yields the constrained critical points.
Chain Rule for Several Variables
If z=f(x,y) where x and y are themselves functions of another variable t, then the total derivative of z with respect to t is:
Chain Rule for Several Variables
Total derivative with respect to a parameter t.
dtdz=∂x∂zdtdx+∂y∂zdtdy
Variables
Symbol
Description
Unit
dtdz
Total derivative of z with respect to t
-
∂x∂z,∂y∂z
Partial derivatives of z
-
dtdx,dtdy
Derivatives of intermediate variables
-
Implicit Partial Differentiation
Often, an equation F(x,y,z)=0 defines z implicitly as a function of x and y. Instead of solving for z, we can find the partial derivatives using the Implicit Function Theorem.
Implicit Function Theorem Formula
To find the partial derivative of z with respect to x or y:
Implicit Partial Derivative (w.r.t x)
Finding partial derivative implicitly.
∂x∂z=−Fz(x,y,z)Fx(x,y,z)
Variables
Symbol
Description
Unit
∂x∂z
Partial derivative of z with respect to x
-
Fx,Fz
Partial derivatives of implicit function F
-
Implicit Partial Derivative (w.r.t y)
Finding partial derivative implicitly.
∂y∂z=−Fz(x,y,z)Fy(x,y,z)
Variables
Symbol
Description
Unit
∂y∂z
Partial derivative of z with respect to y
-
Fy,Fz
Partial derivatives of implicit function F
-
Where Fx, Fy, and Fz are the partial derivatives of the function F with respect to each variable, assuming Fz=0.
The Gradient Vector
The gradient of a function f(x,y) is a vector consisting of its partial derivatives. It plays a crucial role in determining the direction of steepest ascent on a surface.
The Gradient
For a function f(x,y), the gradient, denoted by ∇f(x,y) (read "del f"), is the vector:
The Gradient Vector
Vector of partial derivatives.
∇f(x,y)=⟨fx(x,y),fy(x,y)⟩
Variables
Symbol
Description
Unit
∇f(x,y)
Gradient vector of f
-
fx,fy
Partial derivatives of f
-
Key Properties:
The gradient vector points in the direction of the maximum rate of increase of the function.
The magnitude of the gradient vector, ∣∇f∣, gives the maximum rate of increase in that direction.
The gradient vector is always perpendicular (orthogonal) to the level curves of the function.
Directional Derivatives
The gradient tells us the rate of change in the directions of the axes and the direction of maximum change. But what if we want to know the rate of change in an arbitrary direction? The directional derivative provides this.
Directional Derivative
The directional derivative of f(x,y) in the direction of a unit vector u=⟨u1,u2⟩ is defined as the dot product of the gradient and the unit vector:
Directional Derivative
Rate of change in an arbitrary direction.
Duf(x,y)=∇f(x,y)⋅u=fx(x,y)u1+fy(x,y)u2
Variables
Symbol
Description
Unit
Duf(x,y)
Directional derivative in direction u
-
∇f(x,y)
Gradient vector
-
u
Unit direction vector
-
Interact with the simulation below to explore directional derivatives and gradient vectors on a contour map, illustrating steepest ascent and orthogonal level curves.
Gradient Vector Visualization
Surface: f(x, y) = x² + y²
Move mouse
Current State
Position (x, y)(0.00, 0.00)
∇f = <2x, 2y><0.00, 0.00>
Magnitude |∇f|0.00
Move your mouse over the grid. Notice how the red gradient vector always points directly outward from the origin, perpendicular to the circular level curves. This shows the direction of steepest ascent on the paraboloid surface.
Total Differentials
The total differential dz approximates the total change in z due to small simultaneous changes in x (dx) and y (dy).
Total Differential
Approximate total change in z.
dz=∂x∂zdx+∂y∂zdy
Variables
Symbol
Description
Unit
dz
Total differential of z
-
∂x∂z,∂y∂z
Partial derivatives
-
dx,dy
Differentials of independent variables
-
This is fundamental in error analysis for experiments with multiple measured variables.
Key Takeaways
Partial Derivatives measure the rate of change with respect to one variable while holding others constant. Geometrically, they represent the slopes of tangent lines in the x and y directions.
The Second Partials Test classifies critical points on surfaces as local max, min, or saddle points using the Hessian discriminant.
Lagrange Multipliers optimize multivariable functions subject to constraint equations.
The Chain Rule for multivariable functions sums the contributions from each intermediate variable.
The Gradient Vector points in the direction of steepest ascent and its magnitude gives the maximum rate of change. It is orthogonal to level curves.
Total Differentials approximate changes in multivariable functions, useful for total error estimation.