Partial Differentiation

Learning Objectives

  • Define and compute partial derivatives for functions of multiple variables, identifying variables to hold constant.
  • Apply the Second Partials Test (Hessian matrix discriminant) to rigorously classify relative maxima, minima, and saddle points on 3D surfaces.
  • Employ the method of Lagrange Multipliers to solve constrained optimization problems commonly found in engineering design.
  • Utilize the multivariable Chain Rule and Implicit Function Theorem to differentiate complex, interdependent parameter systems.
  • Compute and geometrically interpret the Gradient Vector, understanding its relationship to steepest ascent and orthogonal level curves.
  • Apply Total Differentials to approximate multidimensional functional changes and estimate compound measurement errors.
Real-world civil engineering and physical science problems rarely involve just one isolated variable. The bending stress in a structural beam depends simultaneously on the applied load, beam length, and the geometric properties of its cross-section. The flow rate in a pipe depends on pressure, viscosity, and diameter. To rigorously analyze and optimize these multidimensional systems, we must transition from single-variable calculus to multivariable calculus, utilizing partial differentiation to isolate the effect of individual variables.

Functions of Several Variables

Multivariable Function

A function z=f(x,y)z = f(x, y) assigns a unique output zz for every independent input pair (x,y)(x, y) in its domain. The geometric graph of such a function forms a surface in 3D Cartesian space.

Partial Derivatives

When we differentiate a function of multiple variables, we must specify which variable is changing while strictly holding all other independent variables constant. This isolated rate of change is called a partial derivative. Geometrically, taking the partial derivative with respect to xx (fxf_x) represents the slope of the tangent line to the surface z=f(x,y)z = f(x,y) in a cross-section plane parallel to the xz-plane.

Notation

  • ∂z∂x\frac{\partial z}{\partial x} or fxf_x: Partial derivative with respect to xx (treat yy as constant).
  • ∂z∂y\frac{\partial z}{\partial y} or fyf_y: Partial derivative with respect to yy (treat xx as constant).
  • Note the use of the "curly d" symbol (∂\partial).

Interactive Simulation

Use the simulation below to explore partial derivatives.

Partial Derivatives

Visualizing Surface: z=0.5(x2−y2)z = 0.5(x^2 - y^2)
Red Arrow: Slope along x-axis (∂z/∂x\partial z / \partial x)
Green Arrow: Slope along y-axis (∂z/∂y\partial z / \partial y)

0.50
0.50
z value:0.00
Slope X (∂z/∂x\partial z/\partial x):0.50
Slope Y (∂z/∂y\partial z/\partial 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=∂2z∂x2f_{xx} = \frac{\partial^2 z}{\partial x^2}
  • fyy=∂2z∂y2f_{yy} = \frac{\partial^2 z}{\partial y^2}
  • fxy=∂2z∂x∂yf_{xy} = \frac{\partial^2 z}{\partial x \partial y} (Mixed partial: differentiate w.r.t xx then yy)
  • fyx=∂2z∂y∂xf_{yx} = \frac{\partial^2 z}{\partial y \partial x} (Mixed partial: differentiate w.r.t yy then xx)

Clairaut's Theorem

Clairaut's Theorem: If the mixed partial derivatives are continuous, then the order doesn't matter: fxy=fyxf_{xy} = f_{yx}.

Extrema of Functions of Two Variables (Second Partials Test)

The Second Partials Test classifies the local behavior of an interior stationary point of z=f(x,y)z=f(x,y). At a candidate (a,b)(a,b), the function and all first- and second-order partial derivatives must be continuous on an open neighborhood of that point, so ff is C2C^2 there; also, fx(a,b)=fy(a,b)=0f_x(a,b)=f_y(a,b)=0. Points outside the domain interior or without these regularity conditions are not classified by this theorem.

Second Partials Discriminant

Evaluate the Hessian determinant at an interior stationary point.

D(a,b)=fxx(a,b)fyy(a,b)−[fxy(a,b)]2D(a,b) = f_{xx}(a,b)f_{yy}(a,b) - [f_{xy}(a,b)]^2

Variables

SymbolDescriptionUnit
D(a,b)D(a,b)Hessian determinant at the candidate point-
fxx,fyyf_{xx}, f_{yy}Pure second partial derivatives-
fxyf_{xy}Mixed second partial derivative-

Apply the Second Partials Test

  1. Solve fx(x,y)=0f_x(x,y)=0 and fy(x,y)=0f_y(x,y)=0 together. Keep every solution (a,b)(a,b) that lies in the interior of the domain.
  2. For each candidate, verify that the first and second partial derivatives are continuous on an open neighborhood of (a,b)(a,b). If this condition fails, do not apply this test to that point.
  3. Evaluate fxxf_{xx}, fyyf_{yy}, and fxyf_{xy} at the candidate, then calculate D(a,b)D(a,b).
  4. Classify that candidate:
    • If D(a,b)>0D(a,b)>0 and fxx(a,b)>0f_{xx}(a,b)>0, it is a local minimum.
    • If D(a,b)>0D(a,b)>0 and fxx(a,b)<0f_{xx}(a,b)<0, it is a local maximum.
    • If D(a,b)<0D(a,b)<0, it is a saddle point.
    • If D(a,b)=0D(a,b)=0, the test is inconclusive; assign no maximum, minimum, or saddle classification from this test.
  5. Repeat the calculation and classification for every other interior stationary candidate.
Two-Variable Second Partials Test: Classify Each Interior Stationary Point

Find every interior stationary candidate, check the theorem's local regularity assumptions, then compute and interpret the discriminant separately at each point.

Applicability at each candidate (a,b): f_x(a,b)=f_y(a,b)=0, (a,b) is interior, and f plus all first- and second-order partial derivatives are continuous throughout an open neighborhood of (a,b), so f is C² there. Compute D=f_xx(a,b)f_yy(a,b)-[f_xy(a,b)]² for every candidate. D<0 gives a saddle; D>0 with f_xx>0 gives a local minimum; D>0 with f_xx<0 gives a local maximum; D=0 is inconclusive and receives no class. This is a local interior-point test only. Boundary points, constrained-domain candidates, and comparison of values for absolute extrema require separate analysis. Critical points where a first partial does not exist are outside this workflow.

Two-Variable Second Partials Test: Classify Each Interior Stationary PointFind every interior stationary candidate, check the theorem's local regularity assumptions, then compute and interpret the discriminant separately at each point.. Applicability at each candidate (a,b): f_x(a,b)=f_y(a,b)=0, (a,b) is interior, and f plus all first- and second-order partial derivatives are continuous throughout an open neighborhood of (a,b), so f is C² there. Compute D=f_xx(a,b)f_yy(a,b)-[f_xy(a,b)]² for every candidate. D<0 gives a saddle; D>0 with f_xx>0 gives a local minimum; D>0 with f_xx<0 gives a local maximum; D=0 is inconclusive and receives no class. This is a local interior-point test only. Boundary points, constrained-domain candidates, and comparison of values for absolute extrema require separate analysis. Critical points where a first partial does not exist are outside this workflow.. Start → Solve f_x = 0 and f_y = 0; retain all interior solutions (a,b).; Solve f_x = 0 and f_y = 0; retain all interior solutions (a,b). → Any interior stationary candidates?; Any interior stationary candidates? — Yes → Select the next untested candidate (a,b).; Any interior stationary candidates? — No → No point is available for this stationary-point test.; No point is available for this stationary-point test. → Local classifications are complete. Analyze boundaries and constraints separately for global extrema.; Select the next untested candidate (a,b). → Interior and C² near (a,b)?; Interior and C² near (a,b)? — Yes → Evaluate f_xx, f_yy, f_xy; compute D at (a,b).; Interior and C² near (a,b)? — No → Do not classify this point with the test; analyze it separately.; Evaluate f_xx, f_yy, f_xy; compute D at (a,b). → Is D < 0?; Is D < 0? — Yes → Classify (a,b) as a saddle point.; Is D < 0? — No → Is D > 0?; Is D > 0? — Yes → Is f_xx(a,b) > 0?; Is D > 0? — No: D = 0 → D = 0: record inconclusive; assign no class.; Is f_xx(a,b) > 0? — Yes → Classify (a,b) as a local minimum.; Is f_xx(a,b) > 0? — No: f_xx < 0 → Classify (a,b) as a local maximum.; Classify (a,b) as a saddle point. → Any untested interior candidates remain?; Classify (a,b) as a local minimum. → Any untested interior candidates remain?; Classify (a,b) as a local maximum. → Any untested interior candidates remain?; D = 0: record inconclusive; assign no class. → Any untested interior candidates remain?; Do not classify this point with the test; analyze it separately. → Any untested interior candidates remain?; Any untested interior candidates remain? — Yes → Return to candidate selection.; Return to candidate selection. → Select the next untested candidate (a,b).; Any untested interior candidates remain? — No → Local classifications are complete. Analyze boundaries and constraints separately for global extrema.; Local classifications are complete. Analyze boundaries and constraints separately for global extrema. → End

Start → Solve f_x = 0 and f_y = 0; retain all interior solutions (a,b).; Solve f_x = 0 and f_y = 0; retain all interior solutions (a,b). → Any interior stationary candidates?; Any interior stationary candidates? — Yes → Select the next untested candidate (a,b).; Any interior stationary candidates? — No → No point is available for this stationary-point test.; No point is available for this stationary-point test. → Local classifications are complete. Analyze boundaries and constraints separately for global extrema.; Select the next untested candidate (a,b). → Interior and C² near (a,b)?; Interior and C² near (a,b)? — Yes → Evaluate f_xx, f_yy, f_xy; compute D at (a,b).; Interior and C² near (a,b)? — No → Do not classify this point with the test; analyze it separately.; Evaluate f_xx, f_yy, f_xy; compute D at (a,b). → Is D < 0?; Is D < 0? — Yes → Classify (a,b) as a saddle point.; Is D < 0? — No → Is D > 0?; Is D > 0? — Yes → Is f_xx(a,b) > 0?; Is D > 0? — No: D = 0 → D = 0: record inconclusive; assign no class.; Is f_xx(a,b) > 0? — Yes → Classify (a,b) as a local minimum.; Is f_xx(a,b) > 0? — No: f_xx < 0 → Classify (a,b) as a local maximum.; Classify (a,b) as a saddle point. → Any untested interior candidates remain?; Classify (a,b) as a local minimum. → Any untested interior candidates remain?; Classify (a,b) as a local maximum. → Any untested interior candidates remain?; D = 0: record inconclusive; assign no class. → Any untested interior candidates remain?; Do not classify this point with the test; analyze it separately. → Any untested interior candidates remain?; Any untested interior candidates remain? — Yes → Return to candidate selection.; Return to candidate selection. → Select the next untested candidate (a,b).; Any untested interior candidates remain? — No → Local classifications are complete. Analyze boundaries and constraints separately for global extrema.; Local classifications are complete. Analyze boundaries and constraints separately for global extrema. → End

  • Start: terminator
  • Solve f_x = 0 and f_y = 0; retain all interior solutions (a,b).: process. This workflow classifies stationary points where both first partial derivatives equal zero. Boundary points and points where a first partial does not exist are outside its candidate set.
  • Any interior stationary candidates?: decision
  • No point is available for this stationary-point test.: process
  • Select the next untested candidate (a,b).: process
  • Interior and C² near (a,b)?: decision. Confirm the candidate is interior and f, all first partials, and all second partials are continuous on an open neighborhood of the point.
  • Do not classify this point with the test; analyze it separately.: process
  • Evaluate f_xx, f_yy, f_xy; compute D at (a,b).: process. Use D=f_xx(a,b)f_yy(a,b)-[f_xy(a,b)]² for this candidate, not a value carried over from another point.
  • Is D < 0?: decision
  • Classify (a,b) as a saddle point.: process
  • Is D > 0?: decision
  • Is f_xx(a,b) > 0?: decision
  • Classify (a,b) as a local minimum.: process
  • Classify (a,b) as a local maximum.: process
  • D = 0: record inconclusive; assign no class.: process
  • Any untested interior candidates remain?: decision
  • Return to candidate selection.: process
  • Local classifications are complete. Analyze boundaries and constraints separately for global extrema.: process
  • End: terminator

Local Classification Does Not Establish Global Extrema

The Second Partials Test addresses local behavior at interior stationary points. It does not evaluate boundary points or determine absolute extrema on a closed, constrained, or otherwise restricted domain. Analyze boundary and constraint candidates with methods suited to those sets, then compare the relevant function values when seeking a global maximum or minimum.

Contour Signatures for the Second Partials Test
These analytical contour maps use exact functions centered at the interior stationary point (0, 0). Concentric levels that increase away from the center correspond to a local minimum; levels that decrease away correspond to a local maximum. For the saddle, the zero contours x = y and x = -y divide regions where the function has opposite signs. The discriminants and fxx signs printed below each map show how the theorem's output matches each local shape.

Lagrange Multipliers

Optimization problems in engineering design almost always come with strict physical or economic constraints. For instance, determining the dimensions of a cylindrical water tank that maximizes storage volume given a fixed budget for surface area material. The method of Lagrange Multipliers is a powerful analytical technique to solve these constrained optimization problems without needing to explicitly parameterize the constraint.

Method of Lagrange Multipliers

For a differentiable objective ff and equality constraint g=cg=c, a constrained local extremum at a regular interior point where ∇g≠0\nabla g\ne\mathbf{0} must satisfy ∇f=λ∇g\nabla f=\lambda\nabla g for some scalar λ\lambda.

Method of Lagrange Multipliers

Gradient relationship for constrained optimization.

∇f=λ∇g\nabla f = \lambda \nabla g

Variables

SymbolDescriptionUnit
∇f\nabla fGradient of the objective function-
λ\lambdaLagrange multiplier-
∇g\nabla gGradient of the constraint function-
This expands into a system of equations: fx=λgxf_x = \lambda g_x, fy=λgyf_y = \lambda g_y, fz=λgzf_z = \lambda g_z, along with the original constraint g(x,y,z)=cg(x,y,z) = c. Solving gives candidate points; satisfying these equations alone does not prove a local or global extremum.
Objective and Constraint Gradients at a Constrained Point
This exact contour diagram illustrates the Lagrange condition at one regular point: the level curve f = 1/2 is tangent to the constraint x + y = 1 at P = (1/2, 1/2), and their gradients are parallel. Here both gradients are (1, 1), so λ = 1. The figure explains the local geometry only; it does not supply a complete candidate-search procedure.

Chain Rule for Several Variables

If z=f(x,y)z = f(x, y) where xx and yy are themselves functions of another variable tt, then the total derivative of zz with respect to tt is:

Chain Rule for Several Variables

Total derivative with respect to a parameter t.

dzdt=∂z∂xdxdt+∂z∂ydydt\frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}

Variables

SymbolDescriptionUnit
dzdt\frac{dz}{dt}Total derivative of z with respect to t-
∂z∂x,∂z∂y\frac{\partial z}{\partial x}, \frac{\partial z}{\partial y}Partial derivatives of z-
dxdt,dydt\frac{dx}{dt}, \frac{dy}{dt}Derivatives of intermediate variables-

Implicit Partial Differentiation

Often, an equation F(x,y,z)=0F(x, y, z) = 0 defines zz implicitly as a function of xx and yy. Instead of solving for zz, we can find the partial derivatives using the Implicit Function Theorem.
To find the partial derivative of zz with respect to xx or yy:

Implicit Partial Derivative (w.r.t x)

Finding partial derivative implicitly.

∂z∂x=−Fx(x,y,z)Fz(x,y,z)\frac{\partial z}{\partial x} = -\frac{F_x(x, y, z)}{F_z(x, y, z)}

Variables

SymbolDescriptionUnit
∂z∂x\frac{\partial z}{\partial x}Partial derivative of z with respect to x-
Fx,FzF_x, F_zPartial derivatives of implicit function F-

Implicit Partial Derivative (w.r.t y)

Finding partial derivative implicitly.

∂z∂y=−Fy(x,y,z)Fz(x,y,z)\frac{\partial z}{\partial y} = -\frac{F_y(x, y, z)}{F_z(x, y, z)}

Variables

SymbolDescriptionUnit
∂z∂y\frac{\partial z}{\partial y}Partial derivative of z with respect to y-
Fy,FzF_y, F_zPartial derivatives of implicit function F-
Where FxF_x, FyF_y, and FzF_z are the partial derivatives of the function FF with respect to each variable, assuming Fz≠0F_z \neq 0.

The Gradient Vector

The gradient of a function f(x,y)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)f(x, y), the gradient, denoted by ∇f(x,y)\nabla 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)⟩\nabla f(x, y) = \left\langle f_x(x, y), f_y(x, y) \right\rangle

Variables

SymbolDescriptionUnit
∇f(x,y)\nabla f(x, y)Gradient vector of f-
fx,fyf_x, f_yPartial derivatives of f-

Properties of the Gradient Vector

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∣|\nabla 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)f(x, y) in the direction of a unit vector u=⟨u1,u2⟩\mathbf{u} = \langle u_1, u_2 \rangle 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)u2D_{\mathbf{u}}f(x, y) = \nabla f(x, y) \cdot \mathbf{u} = f_x(x, y)u_1 + f_y(x, y)u_2

Variables

SymbolDescriptionUnit
Duf(x,y)D_{\mathbf{u}}f(x, y)Directional derivative in direction u-
∇f(x,y)\nabla f(x, y)Gradient vector-
u\mathbf{u}Unit direction vector-
u1,u2u_1, u_2Components of unit vector u-

Interactive Simulation

Use 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²

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 dzdz approximates the total change in zz due to small simultaneous changes in xx (dxdx) and yy (dydy).

Total Differential

Approximate total change in z.

dz=∂z∂xdx+∂z∂ydydz = \frac{\partial z}{\partial x} dx + \frac{\partial z}{\partial y} dy

Variables

SymbolDescriptionUnit
dzdzTotal differential of z-
∂z∂x,∂z∂y\frac{\partial z}{\partial x}, \frac{\partial z}{\partial y}Partial derivatives-
dx,dydx, dyDifferentials of independent variables-
This principle is fundamental in engineering error analysis for experiments or surveys involving multiple measured variables. For instance, in surveying, if land area is calculated from independent length and width measurements that both have associated tolerances, the total differential provides an explicit mathematical bound for the maximum expected error in the computed area.

Engineering Applications

Partial differentiation is foundational in solid mechanics and fluid dynamics. For example, the stress and strain on a structural element are described by tensors derived from partial derivatives of displacement fields. The gradient vector is also heavily used in optimization algorithms to find structural configurations that minimize weight while meeting safety constraints.

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.