03 Partial Derivatives and Differentiation

A progressive guide to partial derivatives, differentiability, tangent planes, linearization, differentials, and the multivariable chain rule.

The central ideas

Multivariable differentiation extends ordinary one-variable differentiation to functions whose inputs have several independent components. For a scalar-valued function

f:Rn→R,f:\mathbb R^n\to\mathbb R,

there are two related ideas:

  • A measures change in one coordinate direction while the other variables remain fixed.

  • The gives the best linear approximation to the function near a point.

These ideas lead naturally to tangent planes, , differentials, and the .

Partial derivatives and coordinate directions

For z=f(x,y)z=f(x,y), the with respect to xx at (a,b)(a,b) is

fx(a,b)=lim⁡h→0f(a+h,b)−f(a,b)h,f_x(a,b)=\lim_{h\to 0}\frac{f(a+h,b)-f(a,b)}{h},

provided the limit exists. The variable yy is held constant. Similarly,

fy(a,b)=lim⁡h→0f(a,b+h)−f(a,b)h,f_y(a,b)=\lim_{h\to 0}\frac{f(a,b+h)-f(a,b)}{h},

with xx held constant.

Geometrically, fx(a,b)f_x(a,b) is the slope of the curve formed by intersecting the surface with the vertical plane y=by=b. The value fy(a,b)f_y(a,b) gives the corresponding slope in the yy-direction.

For example, let

f(x,y)=x2y+exy.f(x,y)=x^2y+e^{xy}.

Holding yy constant when differentiating with respect to xx, and holding xx constant when differentiating with respect to yy, gives

fx(x,y)=2xy+yexy,fy(x,y)=x2+xexy.f_x(x,y)=2xy+ye^{xy}, \qquad f_y(x,y)=x^2+xe^{xy}.

For a function of three variables, each is computed by holding the other two variables fixed:

fx=∂f∂x,fy=∂f∂y,fz=∂f∂z.f_x=\frac{\partial f}{\partial x}, \qquad f_y=\frac{\partial f}{\partial y}, \qquad f_z=\frac{\partial f}{\partial z}.

Takeaway: Compute one at a time, treating every other independent variable as a constant.

Higher-order and mixed partials

Partial derivatives can be differentiated repeatedly. For a function f(x,y)f(x,y), the pure second-order partial derivatives are

fxx=∂∂x(fx),fyy=∂∂y(fy),f_{xx}=\frac{\partial}{\partial x}(f_x), \qquad f_{yy}=\frac{\partial}{\partial y}(f_y),

while the mixed partial derivatives are

fxy=∂∂y(fx),fyx=∂∂x(fy).f_{xy}=\frac{\partial}{\partial y}(f_x), \qquad f_{yx}=\frac{\partial}{\partial x}(f_y).

For

f(x,y)=x2y+exy,f(x,y)=x^2y+e^{xy},

the second-order derivatives are

fxx=2y+y2exy,f_{xx}=2y+y^2e^{xy},
fyy=xexy,f_{yy}=xe^{xy},

and

fxy=fyx=2x+exy+xyexy.f_{xy}=f_{yx}=2x+e^{xy}+xye^{xy}.

The equality of mixed partials requires a hypothesis: if the mixed partial derivatives are continuous in a neighborhood of a point, then they are equal there. This result is commonly called Clairaut's theorem. The existence of both mixed partials alone does not always guarantee equality.

Higher-order notation records the differentiation order. For example,

fxxy=∂∂y(∂2f∂x2),fxyz=∂3f∂z ∂y ∂x.f_{xxy}=\frac{\partial}{\partial y}\left(\frac{\partial^2f}{\partial x^2}\right), \qquad f_{xyz}=\frac{\partial^3f}{\partial z\,\partial y\,\partial x}.

Takeaway: Mixed partials may be interchanged when the relevant continuity condition is satisfied.

and the

A function f(x,y)f(x,y) is differentiable at (a,b)(a,b) when its change can be represented by a linear part plus an error that is small relative to the distance traveled. Specifically, there must be constants AA and BB such that

f(a+h,b+k)=f(a,b)+Ah+Bk+r(h,k),f(a+h,b+k)=f(a,b)+Ah+Bk+r(h,k),

where

lim⁡(h,k)→(0,0)r(h,k)h2+k2=0.\lim_{(h,k)\to(0,0)}\frac{r(h,k)}{\sqrt{h^2+k^2}}=0.

When holds,

A=fx(a,b),B=fy(a,b),A=f_x(a,b), \qquad B=f_y(a,b),

so the first-order change is

f(a+h,b+k)−f(a,b)≈fx(a,b)h+fy(a,b)k.f(a+h,b+k)-f(a,b)\approx f_x(a,b)h+f_y(a,b)k.

A useful sufficient condition is that fxf_x and fyf_y exist and are continuous on an open neighborhood of (a,b)(a,b). However, having both first partial derivatives at only one point does not by itself establish .

For f:Rn→Rf:\mathbb R^n\to\mathbb R, the same idea is expressed using the :

f(a+h)=f(a)+Df(a)h+o(∥h∥).f(\mathbf a+\mathbf h)=f(\mathbf a)+Df(\mathbf a)\mathbf h+o(\|\mathbf h\|).

Here, Df(a)Df(\mathbf a) is a linear map.

Tangent planes and

If ff is differentiable at (a,b)(a,b), the graph z=f(x,y)z=f(x,y) has a at (a,b,f(a,b))(a,b,f(a,b)). Its equation is

z=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b).z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).

The same expression, viewed as a function of xx and yy, is the :

L(x,y)=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b).L(x,y)=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).

For points close to (a,b)(a,b),

f(x,y)≈L(x,y).f(x,y)\approx L(x,y).

Consider

f(x,y)=x2+xy+y2f(x,y)=x^2+xy+y^2

at (1,2)(1,2). Since

f(1,2)=7,fx=2x+y,fy=x+2y,f(1,2)=7, \qquad f_x=2x+y, \qquad f_y=x+2y,

we have

fx(1,2)=4,fy(1,2)=5.f_x(1,2)=4, \qquad f_y(1,2)=5.

Therefore,

z=7+4(x−1)+5(y−2)=4x+5y−7.z=7+4(x-1)+5(y-2)=4x+5y-7.

The and are two descriptions of the same first-order approximation.

Using for estimation

provides a practical way to estimate nearby values. Let

f(x,y)=x2+y2f(x,y)=\sqrt{x^2+y^2}

and use the base point (3,4)(3,4). Because

f(3,4)=5,fx=xx2+y2,fy=yx2+y2,f(3,4)=5, \qquad f_x=\frac{x}{\sqrt{x^2+y^2}}, \qquad f_y=\frac{y}{\sqrt{x^2+y^2}},

we obtain

fx(3,4)=35,fy(3,4)=45.f_x(3,4)=\frac{3}{5}, \qquad f_y(3,4)=\frac{4}{5}.

Thus,

L(x,y)=5+35(x−3)+45(y−4).L(x,y)=5+\frac{3}{5}(x-3)+\frac{4}{5}(y-4).

At (3.02,3.99)"), the changes from the base point are \(x-3=0.02 and y−4=−0.01y-4=-0.01. Hence,

f(3.02,3.99)≈5+35(0.02)+45(−0.01)=5.004.f(3.02,3.99)\approx 5+\frac{3}{5}(0.02)+\frac{4}{5}(-0.01)=5.004.

The approximation works because the target point is close to the point where the function and its first partial derivatives were evaluated.

Differentials and error estimation

For z=f(x,y)z=f(x,y), the records the linear approximation to a small change:

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

Consequently,

Δf=f(x+Δx,y+Δy)−f(x,y)≈df=fx Δx+fy Δy.\Delta f=f(x+\Delta x,y+\Delta y)-f(x,y) \approx df=f_x\,\Delta x+f_y\,\Delta y.

For three variables,

df=fx dx+fy dy+fz dz,df=f_x\,dx+f_y\,dy+f_z\,dz,

and in general,

df=∑j=1nfxj dxj.df=\sum_{j=1}^{n}f_{x_j}\,dx_j.

For a rectangular box with volume

V=lwh,V=lwh,

the is

dV=wh dl+lh dw+lw dh.dV=wh\,dl+lh\,dw+lw\,dh.

If l=10l=10, w=4w=4, h=2h=2, and the small measurement changes are dl=0.02dl=0.02, dw=0.01dw=0.01, and dh=0.01dh=0.01, then

dV=(4)(2)(0.02)+(10)(2)(0.01)+(10)(4)(0.01)=0.16+0.20+0.40=0.76.dV=(4)(2)(0.02)+(10)(2)(0.01)+(10)(4)(0.01) =0.16+0.20+0.40=0.76.

Thus the approximate volume error is 0.760.76 cubic units.

The and Jacobian matrices

The tracks how derivatives combine when variables depend on intermediate variables. If z=f(x,y)z=f(x,y), with x=x(t)x=x(t) and y=y(t)y=y(t), then

dzdt=fxdxdt+fydydt.\frac{dz}{dt}=f_x\frac{dx}{dt}+f_y\frac{dy}{dt}.

In vector notation,

ddtf(r(t))=∇f(r(t))⋅r′(t).\frac{d}{dt}f(\mathbf r(t))=\nabla f(\mathbf r(t))\cdot\mathbf r'(t).

If x=x(u,v)x=x(u,v) and y=y(u,v)y=y(u,v), then

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

The derivatives of ff are evaluated at (x(u,v),y(u,v))(x(u,v),y(u,v)).

For example, let

z=x2+y2,x=u+v,y=u−v.z=x^2+y^2, \qquad x=u+v, \qquad y=u-v.

Because

fx=2x,fy=2y,xu=1,yu=1,f_x=2x, \qquad f_y=2y, \qquad x_u=1, \qquad y_u=1,

we get

zu=fxxu+fyyu=2x+2y.z_u=f_xx_u+f_yy_u=2x+2y.

Substituting the expressions for xx and yy,

zu=2(u+v)+2(u−v)=4u.z_u=2(u+v)+2(u-v)=4u.

Direct substitution confirms the result:

z=(u+v)2+(u−v)2=2u2+2v2,zu=4u.z=(u+v)^2+(u-v)^2=2u^2+2v^2, \qquad z_u=4u.

For differentiable maps F:Rn→Rm\mathbf F:\mathbb R^n\to\mathbb R^m and G:Rk→Rn\mathbf G:\mathbb R^k\to\mathbb R^n, the matrix form is

D(F∘G)(u)=DF(G(u))DG(u).D(\mathbf F\circ\mathbf G)(\mathbf u) =D\mathbf F(\mathbf G(\mathbf u))D\mathbf G(\mathbf u).

Thus, the of a composite map is the product of the Jacobian matrices of its components.

A practical problem-solving workflow

A reliable workflow connects the concepts in a consistent order:

  1. Identify the independent and dependent variables.

  2. Compute the needed first partial derivatives, holding all other independent variables fixed.

  3. Compute higher-order partials when required, and verify continuity before interchanging mixed partials.

  4. Check using continuity of first partial derivatives near the point when that sufficient condition applies.

  5. Evaluate the function and its first partial derivatives at the base point.

  6. Construct the or for a first-order approximation.

  7. Use differentials to estimate small changes and measurement errors.

  8. Apply the along a parameterized path or after a change of variables.

The main unifying idea is that first derivatives describe local linear behavior. Partial derivatives describe individual coordinate directions, while the combines those directional contributions into one linear approximation.