Functions of Two or More Variables
Section titled “Functions of Two or More Variables”A function assigns one output to each allowed input pair. Its domain is a region in the input plane; its graph is a surface in three-dimensional space. These are different objects.
Find the domain by applying every restriction at once. Square roots require nonnegative radicands, logarithms require positive arguments, and denominators cannot vanish.
Example. Find the domain of .
The square root requires , and the denominator requires . Thus the domain is the closed disk of radius with the portion of the line removed:
The circular boundary belongs to the domain except at the two removed points where .
A level curve joins input points with the same output. It is the projection of a horizontal trace of the graph onto the input plane. For , positive levels are circles of radius . Equal increases in height give smaller radial gaps as the circles move outward, reflecting a steeper surface.
For a function of three variables, , the input is a point in space. A level set is usually a surface. We use level surfaces because the full graph would require four dimensions.
Domain, range, and level sets
Section titled “Domain, range, and level sets”The domain contains allowed inputs; the range contains outputs that actually occur. A restriction on the inputs can change the range even when the formula stays the same. For example, squared distance takes every nonnegative value on the full plane, but only values from zero to one on the unit disk.
Example. For , find the domain, range, and level curve corresponding to output .
The logarithm requires , so the domain is the open disk of radius . Its argument is at most and approaches zero near the boundary. Thus the range is .
To find a level curve, solve
For , this is a circle. At , it reduces to the origin. For larger , it is empty. The largest value occurs at the center, and the function decreases without bound near the circular boundary.
Limits and Continuity
Section titled “Limits and Continuity”The statement
means the output approaches whenever an input in the domain approaches from any direction or along any path. More precisely, for every there must be a such that
Two paths giving different limits prove that a limit does not exist. Agreement along several paths does not prove existence; another path may behave differently.
Example. Determine whether has a limit at the origin.
Along ,
Along ,
The limits differ, so the two-variable limit does not exist.
To prove a limit exists, look for a bound depending only on the distance to the target. Polar coordinates often help at the origin, but the bound must work for every angle, including angles that vary with radius.
For instance, away from the origin,
The right side approaches zero, so the squeeze theorem gives
A function is continuous at a point if its value exists and equals its limit there. Polynomials are continuous everywhere; quotients, roots, logarithms, and compositions are continuous wherever their usual domain conditions hold.
When straight paths miss the problem
Section titled “When straight paths miss the problem”Testing paths is a way to disprove a limit. It is not a list of conditions that eventually proves one. Even every straight line through a point can miss behavior concentrated near a curved path. A bound that holds throughout a neighborhood is stronger because it controls all paths at once.
Example. Determine whether has a limit at the origin, and explain what happens along straight lines.
Along with fixed nonzero ,
The horizontal and vertical axes also give zero. However, the denominator suggests balancing against , so try :
Therefore the limit does not exist. The curved path keeps the two denominator terms comparable, while a fixed nonhorizontal line makes the term dominate near the origin.
When direct substitution works by continuity, use it. Path analysis is needed at points where the expression is undefined or continuity is uncertain, not for every multivariable limit.
Partial Derivatives
Section titled “Partial Derivatives”With two independent inputs, there is no single slope until we say how the input point moves. If we increase while holding , the surface reduces to the ordinary curve . Its derivative is one useful slope. Holding instead gives another trace and another slope.
These coordinate-direction measurements are the partial derivatives. They use the familiar difference quotient, with the fixed coordinate written explicitly:
Geometrically, these are slopes of coordinate-direction traces through the surface. Compute them with ordinary derivative rules, treating the other inputs as constants.
For ,
Differentiate again to obtain higher partials. We use . If the mixed second partials are continuous in a neighborhood of the point, then
For an implicit equation that locally defines a differentiable function with ,
Differentiating with the other input fixed
Section titled “Differentiating with the other input fixed”Holding an input constant does not mean deleting it. A factor involving that input remains as a constant multiplier, and a product inside a composite function still requires the chain rule. For example, differentiating an exponential involving a product brings down the fixed input when differentiating with respect to the other one.
Example. For , find the first partials and verify equality of the mixed second partials.
Treating as fixed gives . Treating as fixed gives . Now differentiate each with respect to the other variable:
Both calculations give . The extra exponential term comes from differentiating the multiplier as well as the exponential. Forgetting that product rule is a common source of apparently unequal mixed partials.
In applications, the variables held fixed are part of the meaning of a partial derivative. A temperature rate measured while pressure stays fixed need not agree with the rate measured while volume stays fixed. Always identify the independent inputs before interpreting the derivative.
Differentiability, Differentials, and Local Linearity
Section titled “Differentiability, Differentials, and Local Linearity”In one variable, differentiability means a tangent line gives the correct first-order change near the point. For two inputs, the corresponding approximation is a plane. Its predicted height change must combine the -change and -change consistently, even when both happen at once.
If the plane has coordinate slopes and , it predicts a change of for displacement . There may be an error, but that error must become negligible compared with the distance moved. Merely tending to zero would establish only continuity; differentiability asks the stronger question of whether a linear approximation captures the leading change.
At , express this as
where differentiability requires
The remainder must become small relative to the input displacement. Continuous first partial derivatives near a point are a sufficient condition for differentiability there.
The local linear approximation is
The differential estimates the actual change for small input changes. The differential is linear in the changes; the actual change generally includes higher-order terms.
Example. Use linearization at to estimate .
For , the value at is and the partial derivatives there are and . Thus
The negative estimated change agrees with the larger decrease in the -coordinate.
Estimating measurement error
Section titled “Estimating measurement error”Linearization is useful when input changes are known but evaluating the original function repeatedly is inconvenient. It also estimates how measurement errors affect an output. For a worst-case first-order estimate, add the magnitudes of the individual differential contributions; do not rely on cancellation unless the error directions are known.
Example. A cylinder has radius and height , measured with possible errors of at most and respectively. Estimate the largest relative error in its volume.
For ,
Divide by the nominal volume:
Using the maximum error magnitudes gives , or about . Radius error counts twice in the relative estimate because the radius is squared. This is a first-order estimate, so the small products and squares of the errors are omitted.
Differentiability guarantees that the approximation error is small relative to input distance sufficiently near the base point. It does not provide a useful numerical error bound at an arbitrary distance. Use a nearby base point with easy values and check whether the proposed changes are small on the scale of the inputs.
Partial derivatives can exist without a linear approximation
Section titled “Partial derivatives can exist without a linear approximation”The partial derivatives only measure the coordinate traces. To test whether they support a genuine linearization, the approximation must also work on paths between those traces.
Example. For , define
Determine exactly when this function is continuous and differentiable at the origin, and find its partial derivatives there.
Both axis traces are zero, so for every positive . Those derivatives alone do not settle either of the other questions.
Let . The inequality follows from . It gives a bound valid in every direction:
The right side tends to zero if , proving continuity in that range. Along , the function is exactly . At this stays at , and for smaller it grows without bound. Continuity therefore holds exactly for .
Since the candidate derivative is zero, differentiability asks whether . The same bound becomes
This tends to zero if . The diagonal again proves necessity: the ratio there is , which does not tend to zero at or below that threshold.
Thus partial derivatives exist for every positive , continuity requires , and differentiability requires . The interval between those last two thresholds gives continuous surfaces whose errors still decay too slowly for a tangent plane to give the correct linear approximation.
The Chain Rule
Section titled “The Chain Rule”Suppose a moving point crosses a temperature map. Its temperature can change because it moves east, because it moves north, or because of both motions together. A partial derivative gives change per unit motion along one axis, while the derivative of that coordinate gives how much motion occurs per unit time. Multiplying those rates gives that axis’s contribution to temperature change per unit time.
The local linear approximation makes this precise. Over a short time, the input changes are approximately and . Substitute them into , divide by , and take a limit. With differentiability of the outer function and of the two coordinate functions, the approximation error disappears, leaving
Evaluate the partial derivatives at the current input . With three intermediate inputs, include the third term in the derivative of the outer function.
If and , then
The products here mean and , not higher derivatives. A dependency diagram can help: multiply derivatives along each route from the outer output to the chosen input, then add the routes.
Example. Let , , and . Find .
Since and ,
Directly substituting first gives , which has the same derivative.
Implicit differentiation is another chain-rule application. If and , then , so .
Partial versus total change
Section titled “Partial versus total change”A partial derivative measures what happens when one independent input changes alone. A total derivative along a path includes every input change caused by the path parameter. The symbols look similar, but the questions differ. A quantity can decrease with one input held fixed while increasing along a path where several inputs change together.
Example. Near , the equation defines . Find its tangent plane and its second partial derivatives at that point. Then estimate through quadratic order for small .
Set . At the point, , so a smooth local graph exists. Implicit first differentiation gives and . The tangent plane is therefore , or .
For second derivatives, the coefficients themselves change with . Differentiate with respect to , remembering that both terms are compositions:
Here and at the point. Thus , giving . Symmetry gives . Differentiating the same first-derivative equation with respect to gives
Its values yield , so .
Along , the linear changes cancel. The quadratic part is
Hence . The tangent plane predicts no change along this direction, but the second derivatives reveal a downward bend. The notation means the remaining error divided by tends to zero.
Directional Derivatives and Gradients
Section titled “Directional Derivatives and Gradients”The partial derivatives tell us the change rates along the coordinate axes, but most paths do not follow just one axis. A small displacement produces the first-order change . This is a dot product between the displacement and the vector of partial derivatives.
We call that vector the gradient. It stores the entire linear response to displacement at a point, not just a preferred direction:
For a unit vector , the directional derivative measures change per unit distance in that direction. If is differentiable,
Normalize a supplied direction vector first. Otherwise the dot product also includes its length.
The geometric dot-product formula now explains steepest ascent. For a unit direction making angle with the gradient, . Turning toward the gradient increases the rate because more of the displacement aligns with the function’s linear response. Turning perpendicular to it removes the first-order change.
Consequently, the maximum directional derivative is , attained in the gradient direction when the gradient is nonzero. The minimum is , in the opposite direction. At a zero gradient, all directional derivatives of a differentiable function are zero, but the point need not be a maximum or minimum.
Proof (Gradient perpendicular to a level curve). Let trace a level curve . The chain rule gives
A nonzero gradient is therefore perpendicular to every tangent direction along the level curve. The same reasoning applies to tangent directions on a level surface.
Example. For at , find the rate of change toward and the direction of steepest increase.
The direction from to is , so use . Since ,
The steepest-increase unit direction is , with rate .
A directional derivative is a one-variable derivative
Section titled “A directional derivative is a one-variable derivative”At a point , move along the line . The directional derivative is the ordinary derivative of the resulting composition at zero:
When has unit length, the parameter change measures signed distance. Applying the chain rule to this line gives the gradient dot-product formula for differentiable functions.
Example. On the sphere , find the unit direction of motion at that increases most rapidly, and find that rate per unit distance along the sphere.
Without the constraint, the gradient gives the best direction. But it has a component pointing off the sphere. A valid instantaneous velocity must be tangent: for .
Decompose the gradient into its normal and tangent parts. The normal projection is
leaving the tangent vector . For any unit tangent direction, the normal part contributes zero to . We therefore only need to maximize , attained by aligning with :
This direction is realized by the curve on the sphere. Its derivative at zero is , so the tangent calculation corresponds to actual allowed motion. A straight line with the same initial direction would leave the sphere after that instant.
Tangent Planes and Normal Vectors
Section titled “Tangent Planes and Normal Vectors”For a differentiable graph , the tangent plane at is the graph of its linearization:
A normal is evaluated at .
More generally, let a surface be given by . If has continuous first partial derivatives nearby and , then the gradient is a normal, and the tangent plane is
The normal line is . If the gradient vanishes, this construction does not determine a plane; investigate the surface separately.
For example, on at , the normal is . The tangent plane simplifies to .
Tangents to intersecting surfaces
Section titled “Tangents to intersecting surfaces”If a curve lies on two regular level surfaces, its tangent is perpendicular to both surface normals. Their cross product gives a tangent direction when the normals are not parallel. This connects gradients back to the cross-product geometry of Chapter 1.
Example. Find a tangent line to the intersection of and at .
The point satisfies both equations: and . Take and . Their normals at are and . The cross product is , so a tangent line is
The direction has zero dot product with both normals. Checking point membership first confirms where the local geometry is being calculated. The tangent line need not remain on either surface away from the point.
Maxima and Minima of Functions of Two Variables
Section titled “Maxima and Minima of Functions of Two Variables”At an interior local extremum of a differentiable function, . Critical points also include domain points where a first partial does not exist. A critical point is only a candidate; it can be a saddle point.
Once the first-order term is zero, the next local information comes from how the slopes themselves change. For continuous second partials, the leading quadratic part near a stationary point is
with the derivatives evaluated at the point. If this expression is positive for every nonzero displacement, all sufficiently nearby points rise above the stationary value. If it is negative for every displacement, they lie below. If its sign depends on direction, the point is a saddle.
The mixed term matters because a path can change both inputs together. A surface may bend upward along both coordinate axes yet dip along a diagonal when that mixed term is sufficiently large. Completing the square in the quadratic expression gives a compact way to test all directions at once. For a stationary point , compute
| Result | Classification |
|---|---|
| and | Strict local minimum |
| and | Strict local maximum |
| Saddle point | |
| Test inconclusive |
A continuous function on a closed, bounded region attains absolute extrema. Find interior candidates, analyze every boundary piece and corner, and compare function values. An interior test alone misses boundary extrema.
Example. Classify all critical points of .
The equations and give and . Since , , and , we have .
At , and , so there is a local minimum with value . At , , so there is a saddle point. There is no local maximum.
Absolute extrema need a boundary calculation
Section titled “Absolute extrema need a boundary calculation”The second derivative test classifies local behavior at an interior stationary point. It does not compare that point with the boundary of a region. A practical absolute-extrema calculation often combines multivariable differentiation in the interior with ordinary single-variable optimization on the boundary.
Example. Find the absolute extrema of on .
The interior equations and give , with value . On the circular boundary, use to simplify the objective to . Since there, the boundary minimum is at and the boundary maximum is at .
Comparing all candidates gives an absolute minimum of at and an absolute maximum of at . The alternative form confirms the minimum geometrically.
When the second derivative determinant is zero, inspect the function rather than declaring a saddle. Both and have zero determinant at the origin, but the first has a strict minimum and the second changes sign across different directions.
Lagrange Multipliers
Section titled “Lagrange Multipliers”An unconstrained maximum requires no first-order increase in any direction. A constrained maximum only rules out increase in directions that stay on the constraint. For example, a point could be the highest point on a circle even if moving straight away from the circle would increase the function further.
If defines a regular curve or surface, its tangent directions are perpendicular to . At a constrained extremum, must also be perpendicular to every allowed tangent direction. Otherwise we could move along the constraint in a direction giving a positive or negative first-order change, contradicting an extremum. The two gradients must therefore point along the same normal line, possibly with opposite signs or with .
This gives the Lagrange multiplier equations:
Solve these equations together, then compare the objective values. This gives candidates, not an automatic classification. The usual necessary condition assumes differentiability and at the candidate. Check singular constraint points separately, along with endpoints or boundaries of the allowed portion.
For two constraints in three dimensions, use when the constraint gradients are independent.
Example. Find the absolute maximum and minimum of on , including candidates with zero coordinates.
The sphere is closed and bounded, and its constraint gradient is nonzero everywhere on it. Extrema exist and must satisfy
First consider a zero coordinate. If , the first equation gives , so at least one other coordinate is zero. The constraint then gives the six axis points and their coordinate permutations, all with objective value zero. The other zero-coordinate cases yield no additional points.
If all coordinates are nonzero, multiply the three multiplier equations by respectively. Their left sides all equal , so and . The constraint forces each square to equal one.
There are eight remaining candidates with coordinates . Those with a positive product give value , and those with a negative product give value . Comparing with the zero candidates gives the absolute maximum and absolute minimum .
As a global check, the arithmetic-geometric mean inequality gives . The axis points are genuine stationary candidates, but not extrema: near any of them, small choices of the other two coordinate signs produce both positive and negative products. Dividing by coordinates at the start would have hidden these candidates and left the multiplier analysis incomplete.
Do not divide away candidate points
Section titled “Do not divide away candidate points”The multiplier equations may include factors that can vanish. Dividing by one of those factors without checking its zero case can discard valid extrema. Keep a short case split when necessary, and always substitute every candidate into the original constraint.
Example. Find the largest volume of a rectangular box with positive side lengths and fixed surface area .
Maximize subject to . The multiplier equations are
Multiply these equations by respectively. Their left sides all become . Positivity implies , so comparing the first two gives and therefore . Comparing another pair gives .
Thus the candidate is a cube with side and volume . To verify a global maximum, apply the arithmetic-geometric mean inequality to : their sum is , so , with equality for the cube. The multiplier calculation finds the candidate, and the inequality establishes the maximum over all positive boxes.
Reference
Section titled “Reference”Topic and section order follows Anton, Bivens, and Davis, Calculus: Early Transcendentals, 12th edition, Chapter 13, renumbered as Chapter 3 here. Explanations and worked examples on this page are original study notes.