Multivariable Differential Calculus

Differentiability as local linearization, with gradients, chain rules, tangent geometry, Taylor models, and constrained optimization under explicit regularity conditions.

A derivative in several variables is not a list of slopes. It is the single linear map that best predicts the output change caused by every sufficiently small input change. Partial derivatives are coordinates of that map when the map exists; they are not, by themselves, proof that it exists.

Functions, domains, and limits #

A scalar field is a function f:D⊆Rn→Rf:D\subseteq\mathbb R^n\to\mathbb R. A vector-valued map has the form F:D⊆Rn→RmF:D\subseteq\mathbb R^n\to\mathbb R^m. Before differentiating, identify the actual domain. Roots, logarithms, denominators, and inverse trigonometric functions can create boundaries or holes that later affect tangent formulas and conservative-field tests.

The limit

lim⁡x→af(x)=L\lim_{x\to a}f(x)=L

means that every sufficiently near point of the domain, regardless of its direction of approach, gives a value near LL. Testing paths is therefore asymmetric:

  • two paths with different limits disprove the multivariable limit;
  • agreement along many selected paths does not prove the limit.

A reliable proof usually bounds ∣f(x)−L∣|f(x)-L| by an expression depending only on ∥x−a∥\|x-a\|.

For example,

f(x,y)=x2yx2+y2,f(0,0)=0f(x,y)=\frac{x^2y}{x^2+y^2},\qquad f(0,0)=0

satisfies

∣f(x,y)∣≤∣y∣x2x2+y2≤∣y∣≤x2+y2,|f(x,y)|\le |y|\frac{x^2}{x^2+y^2}\le |y|\le \sqrt{x^2+y^2},

so f(x,y)→0f(x,y)\to0 as (x,y)→(0,0)(x,y)\to(0,0).

Differentiability is a linear approximation #

A map F:Rn→RmF:\mathbb R^n\to\mathbb R^m is differentiable at aa if there is a linear map DF(a)DF(a) such that

F(a+h)=F(a)+DF(a)h+r(h),∥r(h)∥∥h∥→0.F(a+h)=F(a)+DF(a)h+r(h), \qquad \frac{\|r(h)\|}{\|h\|}\to0.

For a scalar field f:Rn→Rf:\mathbb R^n\to\mathbb R,

Df(a)h=∇f(a)⋅h.Df(a)h=\nabla f(a)\cdot h.

For a vector-valued map, the matrix of DF(a)DF(a) is the Jacobian

JF(a)=[∂F1/∂x1⋯∂F1/∂xn⋮⋱⋮∂Fm/∂x1⋯∂Fm/∂xn]x=a.J_F(a)= \begin{bmatrix} \partial F_1/\partial x_1 & \cdots & \partial F_1/\partial x_n\\ \vdots & \ddots & \vdots\\ \partial F_m/\partial x_1 & \cdots & \partial F_m/\partial x_n \end{bmatrix}_{x=a}.

Local linearization of a multivariable function The input increment h moves the base point a to a plus h. On the graph, the derivative predicts a point on the tangent plane, while the actual surface point differs by the residual r of h. 1. Perturb the input 2. Compare prediction with the graph x₁ x₂ a a + h h The derivative acts on the whole vector h, not on one coordinate at a time. surface z = f(x) tangent plane at a f(a) linear change Df(a)h r(h) actual predicted f(a + h) = f(a) + Df(a)h + r(h), with ‖r(h)‖ / ‖h‖ → 0
Differentiability is one whole-vector prediction: Df(a)h gives the tangent-plane change, and the residual becomes negligible relative to the size of h.

A practical sufficient condition is that all first partial derivatives exist in a neighborhood of aa and are continuous at aa. This is sufficient, not necessary.

Why partial derivatives are weaker #

The function

f(x,y)={x2yx4+y2,(x,y)≠(0,0),0,(x,y)=(0,0)f(x,y)= \begin{cases} \dfrac{x^2y}{x^4+y^2},&(x,y)\ne(0,0),\\ 0,&(x,y)=(0,0) \end{cases}

has both coordinate partial derivatives equal to zero at the origin. Along y=x2y=x^2, however, f(x,x2)=1/2f(x,x^2)=1/2. It is not even continuous there, so it cannot be differentiable. Coordinate-axis behavior did not control all directions.

Chain rule and total differential #

If F:Rn→RmF:\mathbb R^n\to\mathbb R^m is differentiable at aa, and G:Rm→RpG:\mathbb R^m\to\mathbb R^p is differentiable at F(a)F(a), then

D(G∘F)(a)=DG(F(a)) DF(a).D(G\circ F)(a)=DG(F(a))\,DF(a).

This is matrix multiplication because a small increment is transformed twice:

h↦DF(a)Δy↦DG(F(a))Δz.h \xmapsto{DF(a)} \Delta y \xmapsto{DG(F(a))} \Delta z.

For z=f(x,y)z=f(x,y), x=x(u,v)x=x(u,v), and y=y(u,v)y=y(u,v),

∂z∂u=fx∂x∂u+fy∂y∂u,∂z∂v=fx∂x∂v+fy∂y∂v.\frac{\partial z}{\partial u} =f_x\frac{\partial x}{\partial u} +f_y\frac{\partial y}{\partial u}, \qquad \frac{\partial z}{\partial v} =f_x\frac{\partial x}{\partial v} +f_y\frac{\partial y}{\partial v}.

The total differential

df=fx dx+fy dydf=f_x\,dx+f_y\,dy

is the linear part of the change, not an equality with the finite change Δf\Delta f. More precisely,

Δf=df+o ⁣((Δx)2+(Δy)2).\Delta f=df+o\!\left(\sqrt{(\Delta x)^2+(\Delta y)^2}\right).

A sensitivity calculation with units #

For an ideal resistor, electrical power is

P(V,R)=V2R.P(V,R)=\frac{V^2}{R}.

At V=12 VV=12\ \mathrm V and R=6 ΩR=6\ \Omega, the power is 24 W24\ \mathrm W. The two partial derivatives at that operating point are

PV=2VR=4 W/V,PR=−V2R2=−4 W/Ω.P_V=\frac{2V}{R}=4\ \mathrm{W/V}, \qquad P_R=-\frac{V^2}{R^2}=-4\ \mathrm{W/\Omega}.

If the voltage rises by 0.1 V0.1\ \mathrm V while resistance rises by 0.2 Ω0.2\ \Omega, the total differential predicts

ΔP≈PVΔV+PRΔR=4(0.1)−4(0.2)=−0.4 W.\Delta P\approx P_V\Delta V+P_R\Delta R =4(0.1)-4(0.2)=-0.4\ \mathrm W.

The exact new power is 12.12/6.2≈23.615 W12.1^2/6.2\approx23.615\ \mathrm W, a change of about −0.385 W-0.385\ \mathrm W. This is what the derivative does in an engineering model: it converts a vector of small input changes or tolerances into a first-order output change without re-evaluating every nearby case. A Jacobian does the same job for several outputs at once.

Gradient and directional derivatives #

For a unit vector uu, differentiability gives

Duf(a)=Df(a)u=∇f(a)⋅u.D_u f(a)=Df(a)u=\nabla f(a)\cdot u.

Cauchy–Schwarz then yields

∣Duf(a)∣≤∥∇f(a)∥.|D_u f(a)|\le \|\nabla f(a)\|.

When ∇f(a)≠0\nabla f(a)\ne0, the steepest increase is in the gradient direction, the steepest decrease is opposite it, and the maximum rate is ∥∇f(a)∥\|\nabla f(a)\|.

The unit-vector condition matters. If vv is not normalized, ∇f⋅v\nabla f\cdot v is the derivative per unit of the parameter multiplying vv, not per unit distance.

For a regular level surface F(x,y,z)=cF(x,y,z)=c, any tangent curve r(t)r(t) satisfies

F(r(t))=c⟹∇F(r(t))⋅r′(t)=0.F(r(t))=c \quad\Longrightarrow\quad \nabla F(r(t))\cdot r'(t)=0.

Thus ∇F(a)\nabla F(a) is normal to the surface only when ∇F(a)≠0\nabla F(a)\ne0. At singular points the usual tangent-plane formula can fail or cease to determine a unique plane.

Taylor models and the Hessian #

If ff is twice continuously differentiable near aa, then

f(a+h)=f(a)+∇f(a)⋅h+12hTHf(a)h+o(∥h∥2),f(a+h) =f(a)+\nabla f(a)\cdot h +\frac12 h^\mathsf T H_f(a)h +o(\|h\|^2),

where HfH_f is the Hessian matrix.

At a stationary point, ∇f(a)=0\nabla f(a)=0, the quadratic form hTHf(a)hh^\mathsf T H_f(a)h gives the leading local shape:

  • positive definite Hessian: strict local minimum;
  • negative definite Hessian: strict local maximum;
  • indefinite Hessian: saddle point;
  • semidefinite or singular Hessian: the test is inconclusive.

“Inconclusive” does not mean “no extremum.” Both x4+y4x^4+y^4 and x4−y4x^4-y^4 have zero Hessian at the origin, but the first has a minimum and the second a saddle.

Unconstrained and constrained extrema #

For a differentiable function, an interior local extremum must satisfy ∇f=0\nabla f=0. Absolute extrema on a compact domain require more work:

  1. find interior critical points;
  2. analyze every boundary component;
  3. include corners, endpoints, and singular boundary points;
  4. compare the function values.

The boundary step is essential. A Hessian test sees only local interior behavior.

For a smooth constraint g(x)=0g(x)=0, a constrained local extremum x∗x_* with ∇g(x∗)≠0\nabla g(x_*)\ne0 satisfies

∇f(x∗)=λ∇g(x∗).\nabla f(x_*)=\lambda\nabla g(x_*).

The reason is geometric: feasible velocities vv lie in the tangent space ∇g(x∗)⋅v=0\nabla g(x_*)\cdot v=0, and at an extremum ∇f(x∗)⋅v=0\nabla f(x_*)\cdot v=0 for every such vv. Hence both gradients are normal to the same tangent space.

The multiplier equation is only a candidate condition. Classify candidates by comparing values or by restricting second-order changes to tangent directions.

Worked constrained example #

Interpret xx and yy as loads assigned to two channels whose required total is x+y=3x+y=3. Suppose their normalized losses are x2x^2 and 2y22y^2, so the second channel penalizes additional load more strongly. Minimize f(x,y)=x2+2y2f(x,y)=x^2+2y^2 subject to x+y=3x+y=3.

Set g=x+y−3g=x+y-3. Then

(2x,4y)=λ(1,1),(2x,4y)=\lambda(1,1),

so 2x=4y2x=4y, hence x=2yx=2y. Together with x+y=3x+y=3, this gives (x,y)=(2,1)(x,y)=(2,1). Because the constraint is a closed affine line and ff is strictly convex, this candidate is the unique global minimum, with value 66.

The strict-convexity argument is stronger than merely solving the multiplier equations: it supplies global uniqueness.

The optimum assigns more load to the less costly channel. At (2,1)(2,1) the marginal losses, 2x2x and 4y4y, are equal. If they were unequal, moving a small amount of load from the higher-marginal-loss channel to the other would reduce the total. That marginal balance is the operational meaning of the multiplier condition.

Failure modes #

  • Treating partial derivatives as proof of differentiability.
  • Using several matching paths as proof of a limit.
  • Writing a tangent plane to F=cF=c without checking ∇F≠0\nabla F\ne0.
  • Calling ∇f⋅v\nabla f\cdot v a directional derivative without normalizing vv.
  • Applying the Hessian test at a nonstationary point.
  • Declaring “no extremum” when the Hessian test is inconclusive.
  • Solving only ∇f=0\nabla f=0 for an absolute-extremum problem and ignoring the boundary.
  • Using Lagrange multipliers where the constraint gradient vanishes, or applying a second-order test in all directions instead of feasible tangent directions.

Sources

  1. bookDifferential and Integral Calculus of Functions of Several Variables and Differential Equations: Lecture Notes and Practicumpdfnotes
  2. bookOpenStax Calculus Volume 3, Chapter 4
  3. bookTangent Planes and Linear Approximations
  4. bookThe Chain Rule
  5. bookMaxima/Minima Problems
  6. bookLagrange Multipliers
  7. bookOpenStax University Physics Volume 2 — Electrical Energy and Power

Searches titles, aliases, headings, summaries, and full text.↑↓ move ↵ open esc close