Partial Derivatives
Single-variable calculus handles quantities that depend on one input. Most physical quantities depend on several. This chapter extends limits, derivatives, and optimization to functions of two or more variables — the foundation for fields, surfaces, gradients, and constrained optimization throughout engineering and mathematics.
This chapter is the bridge from 1-D calculus to the multivariable tools you'll use constantly in thermodynamics, fluid mechanics, and structural analysis. Don't rush 14.1–14.3: a solid mental picture of surfaces, traces, and level curves makes every later section easier. The gradient (14.6) and Lagrange multipliers (14.8) are the two ideas you will reuse the most in design optimization.
Functions of Several Variables
Functions can take more than one input. We study them verbally, numerically, algebraically, and visually.
Function of Two Variables
A rule that assigns to each ordered pair \((x,y)\) in a domain \(D\) exactly one real number \(f(x,y)\). Here \(x\) and \(y\) are the independent variables and \(z=f(x,y)\) is the dependent variable. The domain is a subset of the plane; the range is the set of output values.
Domain Convention
When a function is given by a formula with no stated domain, the domain is taken to be every pair \((x,y)\) for which the expression returns a well-defined real number — for example, excluding inputs that produce division by zero or the square root of a negative number.
Graph and Surface
The graph of \(f\) is the set of points \((x,y,z)\) in space with \(z=f(x,y)\) and \((x,y)\) in \(D\). It forms a surface sitting directly above (or below) the domain in the \(xy\)-plane, the two-variable analogue of a curve.
Level Curves
The level curves of \(f\) are the plane curves \(f(x,y)=k\) for chosen constants \(k\). They show where the surface has a fixed height, exactly like contour lines on a topographic map. Curves bunched close together signal a steep surface; widely spaced curves signal a gentle one. Isobars (pressure) and isothermals (temperature) are everyday examples.
Functions of Three or More Variables
A function of three variables assigns a number \(f(x,y,z)\) to each triple in its domain. Its graph would need four dimensions, so we visualize it instead through level surfaces \(f(x,y,z)=k\). The idea generalizes to any number of variables \(n\), where inputs are \(n\)-tuples and can be written compactly with vector notation.
Here \(P\) is total production, \(L\) is labor, \(K\) is capital, and \(b,\alpha\) are positive constants. The fitted historical model used \(P(L,K)=1.01\,L^{0.75}K^{0.25}\), with domain restricted to \(L\ge 0,\ K\ge 0\) since labor and capital can't be negative.
When you're asked for a domain, always ask two questions in order: "what makes a square root invalid?" and "what makes a denominator zero?" Sketch the boundary lines/curves first, then shade. A clean domain sketch is worth more partial-credit than a rushed answer.
Limits and Continuity
In two dimensions a point can be approached from infinitely many directions, which changes how limits behave.
Limit of a Function of Two Variables
We write \(\lim_{(x,y)\to(a,b)}f(x,y)=L\) if \(f(x,y)\) can be made arbitrarily close to \(L\) by taking \((x,y)\) sufficiently close to \((a,b)\) — along every path in the domain. Unlike the 1-D case with only left and right, here the point may approach from any direction whatsoever.
Continuity
\(f\) is continuous at \((a,b)\) if \(\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b)\) — the limit exists, the function is defined there, and the two agree. Polynomials are continuous everywhere; rational functions are continuous on their domains. Sums, products, quotients, and compositions of continuous functions are continuous.
To prove a limit doesn't exist, you only need two disagreeing paths — try the axes first, then \(y=x\), then \(y=x^2\). To prove a limit does exist, paths are never enough; switch to polar coordinates or the Squeeze Theorem. Confusing these two jobs is the single most common exam mistake here.
Partial Derivatives
Differentiate with respect to one variable while holding the others fixed.
Partial Derivative
The partial derivative of \(f\) with respect to \(x\) measures the rate of change of \(f\) as \(x\) varies while every other variable is held constant. Geometrically it is the slope of the tangent line to the trace cut by holding the other variable fixed.
Higher and Mixed Partials
Differentiating a partial again gives second-order partials \(f_{xx},\ f_{yy}\) and the mixed partials \(f_{xy},\ f_{yx}\). The notation \(f_{xy}\) means differentiate first with respect to \(x\), then \(y\).
If \(f\) is defined on a disk containing \((a,b)\) and both mixed partials \(f_{xy}\) and \(f_{yx}\) are continuous there, then they are equal:
In practice the order of mixed differentiation does not matter for the functions you will normally encounter.
Partial Differential Equations
Partial derivatives appear in equations expressing physical laws. Solutions of Laplace's equation are called harmonic functions and arise in heat conduction, fluid flow, and electric potential. The wave equation models vibrating strings and traveling sound, light, and water waves.
Laplace and the wave equation are not just abstract curiosities — you'll meet Laplace in steady-state heat and potential flow, and the wave equation in vibrations and acoustics. Memorize their shape now so you recognize them instantly later. A function being "harmonic" simply means it satisfies Laplace's equation.
Tangent Planes and Linear Approximations
Zoom in on a smooth surface and it looks flat — that flat piece is the tangent plane, and it gives the best linear approximation.
Tangent Plane
If \(f\) has continuous first partials, the tangent plane to \(z=f(x,y)\) at a point is the plane containing the two tangent lines to the traces through that point. It is the plane that best approximates the surface nearby.
Linearization and Linear Approximation
The linearization \(L(x,y)\) of \(f\) at \((a,b)\) is the right-hand side of the tangent-plane equation. Near \((a,b)\), \(f(x,y)\approx L(x,y)\). This is the two-variable version of approximating a curve by its tangent line.
If the partial derivatives \(f_x\) and \(f_y\) exist near \((a,b)\) and are continuous at \((a,b)\), then \(f\) is differentiable at \((a,b)\).
Caution: the mere existence of both partials is not enough; continuity of the partials is what guarantees a good linear approximation.
Differentials
For \(z=f(x,y)\), the total differential \(dz\) estimates the change in \(z\) caused by small changes \(dx,dy\) in the inputs. It is the change in height of the tangent plane and closely matches the true change \(\Delta z\) when the increments are small. The idea extends to three or more variables.
The Chain Rule
When variables depend on other variables, derivatives multiply along every path and add across paths.
Chain Rule, Case 1
If \(z=f(x,y)\) is differentiable and both \(x=x(t)\) and \(y=y(t)\) are differentiable functions of a single variable \(t\), then \(z\) is a differentiable function of \(t\). Each input contributes one term.
Chain Rule, Case 2
If \(x\) and \(y\) each depend on two variables \(s\) and \(t\), then \(z\) depends on \(s\) and \(t\) as well. You compute \(\partial z/\partial s\) and \(\partial z/\partial t\) separately, summing one term per intermediate variable.
Directional Derivatives and the Gradient Vector
Partials measure change along the axes. The directional derivative measures change in any direction — and the gradient points the steepest way uphill.
Directional Derivative
The directional derivative \(D_{\mathbf u}f\) gives the rate of change of \(f\) at a point in the direction of a unit vector \(\mathbf u\). Choosing \(\mathbf u=\mathbf i\) or \(\mathbf u=\mathbf j\) recovers the partial derivatives \(f_x\) and \(f_y\), so partials are special cases.
The Gradient Vector
The gradient \(\nabla f\) collects all the first partials into a vector. The directional derivative is then simply the dot product of the gradient with the direction — the scalar projection of \(\nabla f\) onto \(\mathbf u\).
The maximum value of the directional derivative \(D_{\mathbf u}f\) equals \(|\nabla f|\), and it occurs in the direction of the gradient vector \(\nabla f\). In other words, \(f\) increases fastest in the direction of \(\nabla f\), at a rate equal to the gradient's length; it decreases fastest in the opposite direction.
The gradient is the most reusable idea in this chapter. Three facts to lock in: (1) it points toward steepest increase, (2) its magnitude is the steepest slope, (3) it is normal to level sets. Heat flows down the temperature gradient; optimization climbs it. If you remember only one diagram from Chapter 14, make it the gradient perpendicular to a contour line.
Maximum and Minimum Values
Find peaks, valleys, and saddle points by locating critical points and classifying them with second derivatives.
Local Extrema and Critical Points
\(f\) has a local maximum at \((a,b)\) if its value there is at least as large as at all nearby points; a local minimum is defined analogously. A critical point is one where both first partials vanish (\(f_x=0\) and \(f_y=0\)) or where a partial fails to exist. Local extrema can occur only at critical points.
If \(f\) has a local maximum or minimum at \((a,b)\) and the first partials exist there, then \(f_x(a,b)=0\) and \(f_y(a,b)=0\). Geometrically, the tangent plane at an interior extremum is horizontal.
Saddle Point
A critical point that is neither a max nor a min. The surface rises in one direction and falls in another — like a horse's saddle. The classic example is \(z=y^2-x^2\) at the origin.
At a critical point \((a,b)\), let \(D=f_{xx}f_{yy}-(f_{xy})^2\) evaluated at \((a,b)\). Then:
(a) If \(D>0\) and \(f_{xx}>0\): local minimum.
(b) If \(D>0\) and \(f_{xx}<0\): local maximum.
(c) If \(D<0\): saddle point.
If \(D=0\), the test is inconclusive.
Absolute Extrema on a Closed Region
Extreme Value Theorem (two variables)
A continuous function on a closed, bounded set attains both an absolute maximum and an absolute minimum. To find them: evaluate \(f\) at interior critical points, then examine \(f\) along the boundary, and compare all candidate values. The largest is the absolute max; the smallest is the absolute min.
Lagrange Multipliers
Optimize a function subject to a constraint by aligning gradients — no need to solve the constraint for one variable.
The Core Idea
To extremize \(f(x,y,z)\) on a constraint surface \(g(x,y,z)=k\), the largest value occurs where a level surface of \(f\) is tangent to the constraint surface. At that point the gradients point the same way, so \(\nabla f\) is a scalar multiple of \(\nabla g\). The scalar \(\lambda\) is the Lagrange multiplier.
Two Constraints
When the point must satisfy two constraints \(g=k\) and \(h=c\) simultaneously, it is confined to a curve of intersection. There \(\nabla f\) lies in the plane spanned by \(\nabla g\) and \(\nabla h\), so two multipliers are needed.
Lagrange multipliers feel abstract until you see them as "gradients line up at the optimum." Two practical tips: (1) for distance problems, always optimize the squared distance — same answer, cleaner algebra; (2) don't waste time solving for \(\lambda\) unless asked. List your candidate points, plug them into \(f\), and compare. This method scales directly into the constrained optimization you'll do in design and economics.