Differentiability and differentials

In single-variable calculus, having a derivative at a point is the same as having a good tangent-line approximation there. In two or more variables, that equivalence quietly breaks: a function can have both partial derivatives fxf_x and fyf_y at a point yet still fail to be well-approximated by any plane through that point, because partials only look along the two coordinate directions and miss everything else. This article makes that gap precise with the definition of differentiability, gives the standard sufficient condition that most exam functions satisfy automatically, and introduces the total differential df=fx dx+fy dydf = f_x\,dx + f_y\,dy — the tool used to linearly approximate a function's value and to estimate how small measurement errors in the inputs propagate into a computed output.

The core insight

A function f(x,y)f(x,y) is differentiable at a point when its change can be written as a linear part fx dx+fy dyf_x\,dx+f_y\,dy plus an error that vanishes faster than the increments, and this total differential then gives both a linear approximation of ff near that point and an estimate of error propagation.

The core idea

Differentiability is stronger than having partial derivatives. In one variable, ff differentiable at aa just means f′(a)f'(a) exists, and this automatically makes the tangent line a good local approximation. In two variables the analogous statement has to be built by hand: f(x,y)f(x,y) is differentiable at (a,b)(a,b) if there exist constants A,BA,B such that

f(a+h,b+k)−f(a,b)=A h+B k+ε1h+ε2k,f(a+h,b+k)-f(a,b) = A\,h+B\,k+\varepsilon_1h+\varepsilon_2k,

where: h,kh,k are small increments in x,yx,y, A,BA,B turn out to equal fx(a,b),fy(a,b)f_x(a,b),f_y(a,b), and ε1,ε2→0\varepsilon_1,\varepsilon_2\to0 as (h,k)→(0,0)(h,k)\to(0,0). The mere existence of fx(a,b)f_x(a,b) and fy(a,b)f_y(a,b) does not force this — a function can behave well along the two axes alone yet badly along other directions, so it can have both partials at a point while failing to be even continuous there.

A usable sufficient condition. Checking the ε1,ε2→0\varepsilon_1,\varepsilon_2\to0 condition directly is rarely convenient, so in practice one quotes: if fxf_x and fyf_y exist and are continuous throughout a neighborhood of (a,b)(a,b), then ff is differentiable at (a,b)(a,b). Every function built from elementary formulas (polynomials, sines, exponentials, and their combinations) satisfies this wherever it is defined, which is why differentiability rarely needs to be argued from the raw definition in routine problems.

The total differential. When ff is differentiable, the linear part A h+B kA\,h+B\,k is packaged as

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

where: dx,dydx,dy are small (possibly independent) increments in x,yx,y, and fx,fyf_x,f_y are evaluated at the base point. For nn variables this extends term by term, df=fx1dx1+⋯+fxndxndf=f_{x_1}dx_1+\cdots+f_{x_n}dx_n, one contribution per variable with none dropped. Geometrically, dfdf is exactly the change predicted by the tangent plane to z=f(x,y)z=f(x,y) at that point, while the true change Δf=f(a+Δx,b+Δy)−f(a,b)\Delta f = f(a+\Delta x,b+\Delta y)-f(a,b) is the actual surface height change; differentiability is precisely the statement that Δf−df\Delta f - df shrinks faster than the increments themselves, so Δf≈df\Delta f\approx df for small increments.

Figure
A surface height change near a point compared with the tangent plane prediction, showing the true change and the linear approximation nearly coincide for a small step and diverge for a larger step
True change versus the differential: df tracks Δf only for small steps step size along x, y from the base point value of f actual surface curve, f tangent-plane line, base plus df base point a, b small step: Δf ≈ df, gap tiny large step: gap grows
Derivation ATotal differential as the linear approximation of f

The goal is to show, starting only from the definition of differentiability at (a,b)(a,b), that the total differential df=fx dx+fy dydf=f_x\,dx+f_y\,dy is exactly the correction term that turns f(a,b)f(a,b) into the best available linear estimate of ff at a nearby point (a+Δx,b+Δy)(a+\Delta x,b+\Delta y), with an error that becomes negligible for small increments.

Step 1. Start from the defining relation for differentiability at (a,b)(a,b): there exist constants A,BA,B (equal to fx(a,b),fy(a,b)f_x(a,b),f_y(a,b)) such that f(a+h,b+k)−f(a,b)=Ah+Bk+ε1h+ε2kf(a+h,b+k)-f(a,b)=Ah+Bk+\varepsilon_1h+\varepsilon_2k, with ε1,ε2→0\varepsilon_1,\varepsilon_2\to0 as (h,k)→(0,0)(h,k)\to(0,0). Relabel the increments h=Δxh=\Delta x, k=Δyk=\Delta y to match how error-propagation problems are usually phrased.

Step 2. Substitute A=fx(a,b)A=f_x(a,b) and B=fy(a,b)B=f_y(a,b) into the relation. This gives f(a+Δx,b+Δy)−f(a,b)=fx(a,b)Δx+fy(a,b)Δy+ε1Δx+ε2Δyf(a+\Delta x,b+\Delta y)-f(a,b)=f_x(a,b)\Delta x+f_y(a,b)\Delta y+\varepsilon_1\Delta x+\varepsilon_2\Delta y, splitting the total change Δf\Delta f into a linear piece in Δx,Δy\Delta x,\Delta y plus a remainder built from ε1,ε2\varepsilon_1,\varepsilon_2.

Step 3. Define the total differential as exactly the linear piece, df:=fx(a,b) dx+fy(a,b) dydf := f_x(a,b)\,dx+f_y(a,b)\,dy, writing dx=Δxdx=\Delta x, dy=Δydy=\Delta y for the increments. Then Δf=df+ε1Δx+ε2Δy\Delta f = df + \varepsilon_1\Delta x+\varepsilon_2\Delta y, so the difference Δf−df\Delta f-df is exactly the remainder term that differentiability guarantees shrinks faster than the step size.

Step 4. Drop the vanishing remainder for small increments to get the usable approximation Δf≈df\Delta f\approx df, i.e. f(a+Δx,b+Δy)≈f(a,b)+fx(a,b)Δx+fy(a,b)Δyf(a+\Delta x,b+\Delta y)\approx f(a,b)+f_x(a,b)\Delta x+f_y(a,b)\Delta y. This is the working formula for both linear estimation of ff near a point and for estimating how a small error dx,dydx,dy in the inputs propagates into an error dfdf in the output.

Worked example

A closed cylindrical can is measured with radius r=5 cmr=5\text{ cm} and height h=12 cmh=12\text{ cm}, and the volume is computed as V=πr2hV=\pi r^2h. The measuring instrument has possible errors dr=0.02 cmdr=0.02\text{ cm} and dh=0.05 cmdh=0.05\text{ cm}. Estimate the resulting error in the computed volume, and express it as a percentage of the volume.

Step 1. Compute the partial derivatives of V(r,h)=πr2hV(r,h)=\pi r^2h: Vr=2πrhV_r=2\pi rh and Vh=πr2V_h=\pi r^2.

Step 2. Evaluate the partials at the measured values r=5,h=12r=5,h=12: Vr(5,12)=2π(5)(12)=120πV_r(5,12)=2\pi(5)(12)=120\pi and Vh(5,12)=π(5)2=25πV_h(5,12)=\pi(5)^2=25\pi.

Step 3. Form the total differential using the given error increments: dV=Vr dr+Vh dh=120π(0.02)+25π(0.05)=2.4π+1.25π=3.65π≈11.47 cm3dV=V_r\,dr+V_h\,dh=120\pi(0.02)+25\pi(0.05)=2.4\pi+1.25\pi=3.65\pi\approx11.47\text{ cm}^3.

Step 4. Compute the actual volume and express the error as a percentage. V(5,12)=π(25)(12)=300π≈942.48 cm3V(5,12)=\pi(25)(12)=300\pi\approx942.48\text{ cm}^3, so the relative error is dVV=3.65π300π=3.65300≈0.01217\dfrac{dV}{V}=\dfrac{3.65\pi}{300\pi}=\dfrac{3.65}{300}\approx0.01217, about 1.2%1.2\%. The computed volume is 942.48 cm3942.48\text{ cm}^3 with an estimated absolute error of about ±11.47 cm3\pm11.47\text{ cm}^3, roughly 1.2%1.2\% relative error.

Competitive stretch

The same setup can be flipped: given a maximum tolerable relative error in VV, find the maximum tolerable relative error in rr alone (holding hh exact). Since V=πr2hV=\pi r^2h, writing dV/VdV/V purely from the rr-term gives Vr drV=2πrh drπr2h=2 drr\dfrac{V_r\,dr}{V}=\dfrac{2\pi rh\,dr}{\pi r^2h}=\dfrac{2\,dr}{r} — the relative error in VV from rr alone is twice the relative error in rr, a direct consequence of rr appearing squared in the formula. If the can's volume must be accurate to within 1%1\% using rr alone, rr itself must be measured to within 0.5%0.5\%, i.e. dr≤0.005r=0.025 cmdr\le0.005r=0.025\text{ cm} at r=5r=5.

Common traps

  • Assuming existence of fx,fyf_x,f_y automatically gives differentiability. False in general; the safe route is to quote the sufficient condition, continuity of fx,fyf_x,f_y near the point, rather than treating existence of the partials alone as enough.
  • Confusing Δf\Delta f with dfdf. They agree only approximately and only for small increments; for larger Δx,Δy\Delta x,\Delta y the differential can be a poor estimate because the neglected remainder is no longer negligible.
  • Dropping a term in the total differential. For an nn-variable function, every one of the nn terms fxi dxif_{x_i}\,dx_i belongs in dfdf — skipping a partial that looks small is a common source of error in multi-variable error-propagation problems.
  • Sign and unit errors in error-propagation problems. A decreasing measurement gives a negative increment (as with Δy=−0.01\Delta y=-0.01 in a shrinking-input example), and mixing absolute with relative error, or forgetting to convert units consistently, produces a wrong final estimate even when the calculus is right.

Ask the tutor: if the gap between "having partial derivatives" and "being differentiable" still feels abstract, ask the AI tutor to construct an example function with both partials at the origin that still fails to be differentiable there.

If a function has partial derivatives everywhere, why isn't that always enough for differentiability?

Partial derivatives only measure how ff changes along the two coordinate directions through a point — moving purely in xx or purely in yy. A function can be perfectly well-behaved along those two special directions while still oscillating badly or failing to have a consistent tangent plane along other directions through the same point. Differentiability demands good linear behavior in every direction at once, which is a genuinely stronger requirement. That is exactly why the sufficient condition — continuity of fx,fyf_x,f_y near the point — is so useful: it is what actually rules out this bad behavior for functions built from ordinary formulas.

When would df and the actual change Δf disagree noticeably?

They disagree once the increments dx,dydx,dy are no longer small enough for the remainder term ε1dx+ε2dy\varepsilon_1dx+\varepsilon_2dy to be negligible compared to the linear part. In the volume example, the errors dr=0.02dr=0.02 and dh=0.05dh=0.05 are tiny relative to r=5r=5 and h=12h=12, so dVdV tracks the true change almost exactly. If instead drdr were, say, 2 cm2\text{ cm}, the quadratic dependence on rr in V=πr2hV=\pi r^2h would make the linear estimate noticeably off from the true ΔV\Delta V, because the neglected higher-order terms are no longer small.

How is the total differential different from just adding the two ordinary derivatives f prime with respect to x and y?

There is no single ordinary derivative for a two-variable function — "differentiating with respect to x and y separately" is exactly what the two partial derivatives fx,fyf_x,f_y already are. The total differential is not a new kind of derivative; it is a specific linear combination, df=fx dx+fy dydf=f_x\,dx+f_y\,dy, that accounts for simultaneous small changes in both variables at once. Treating it as some third derivative, rather than as the sum of the two partials' individual contributions weighted by their own increments, is the usual source of confusion here.

Before this

Where this leads