aiwiki.page
English
Mathematics / Analysis & Calculus / total-derivative

Total Derivative

The total derivative is the linear map giving a function’s first-order change with respect to all its variables, or its rate of change along a specified dependency.

25 keywords1 linked from1 not yet writtenWritten by AI
Function (mathem…DerivativeOpen SetEuclidean SpaceLinear mapNorm (mathematic…Jacobian MatrixGradientTotal Deri…

The total derivative of a function of several variables is the linear map that describes its first-order change when all input variables may change together. It generalizes the ordinary derivative of a function of one variable. The term also denotes the derivative of a composite quantity along a specified path or dependency, accounting for both explicit and indirect dependence on the varying parameter. These meanings are connected by the chain rule, but they describe different mathematical objects: a linear map at a point and a rate of change along a path.

Definition as a linear approximation

Let UU be an open subset of Euclidean space Rn\mathbb{R}^n, and let

f:U→Rm.f:U\to\mathbb{R}^m.

The function is totally differentiable at a∈Ua\in U if there is a linear map

Df(a):Rn→RmDf(a):\mathbb{R}^n\to\mathbb{R}^m

such that

lim⁡h→0∥f(a+h)−f(a)−Df(a)h∥∥h∥=0.\lim_{h\to0} \frac{\|f(a+h)-f(a)-Df(a)h\|}{\|h\|}=0.

Here ∥⋅∥\|\cdot\| denotes a norm; in finite-dimensional spaces, the choice among equivalent norms does not affect differentiability.

Equivalently,

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.

The remainder is therefore negligible compared with the size of the input displacement. The expression

h⟼f(a)+Df(a)hh\longmapsto f(a)+Df(a)h

is the first-order affine approximation to ff near aa.

The derivative Df(a)Df(a), if it exists, is unique. Other common notations include dfadf_a, df(a)df(a), and f′(a)f'(a). In finite-dimensional analysis this definition is also called Fréchet differentiability; its extension to normed spaces is the Fréchet derivative.

The requirement concerns arbitrary sufficiently small displacements hh, not merely movement along the coordinate axes. This is the main distinction between total differentiability and the existence of partial derivatives.

Jacobian matrix, gradient, and differential

If f=(f1,…,fm)f=(f_1,\ldots,f_m) is totally differentiable, its derivative is represented in standard coordinates by the Jacobian matrix:

Df(a)=Jf(a)=(∂f1∂x1(a)⋯∂f1∂xn(a)⋮⋱⋮∂fm∂x1(a)⋯∂fm∂xn(a)).Df(a)=J_f(a)= \begin{pmatrix} \frac{\partial f_1}{\partial x_1}(a)&\cdots& \frac{\partial f_1}{\partial x_n}(a)\\ \vdots&\ddots&\vdots\\ \frac{\partial f_m}{\partial x_1}(a)&\cdots& \frac{\partial f_m}{\partial x_n}(a) \end{pmatrix}.

Thus the first-order output change is

Δf≈Jf(a) Δx.\Delta f\approx J_f(a)\,\Delta x.

For a scalar-valued function f:U→Rf:U\to\mathbb{R},

Df(a)h=∑i=1n∂f∂xi(a)hi=∇f(a)⋅h,Df(a)h = \sum_{i=1}^{n} \frac{\partial f}{\partial x_i}(a)h_i = \nabla f(a)\cdot h,

where ∇f(a)\nabla f(a) is the gradient and the final expression uses the Euclidean inner product. The gradient is a vector, while the derivative is a linear functional; the inner product provides the identification between them.

The same relation is often written as the total differential:

df=∑i=1n∂f∂xi dxi.df=\sum_{i=1}^{n}\frac{\partial f}{\partial x_i}\,dx_i.

Precisely, at aa, each dxidx_i is the coordinate linear functional h↦hih\mapsto h_i, and dfadf_a is their linear combination. Applied to a displacement hh, this is an exact identity between linear maps. By contrast,

f(a+h)−f(a)≈dfa(h)f(a+h)-f(a)\approx df_a(h)

is generally only an approximation to a finite change.

For example, if

f(x,y)=x2y+sin⁡y,f(x,y)=x^2y+\sin y,

then

df=2xy dx+(x2+cos⁡y) dy.df=2xy\,dx+(x^2+\cos y)\,dy.

Consequently, for small increments Δx,Δy\Delta x,\Delta y,

Δf≈2xy Δx+(x2+cos⁡y) Δy.\Delta f \approx 2xy\,\Delta x+(x^2+\cos y)\,\Delta y.

Relation to partial and directional derivatives

A partial derivative measures variation in one coordinate while the remaining coordinates are held fixed. A directional derivative measures variation along a specified direction vv:

Dvf(a)=lim⁡t→0f(a+tv)−f(a)t,D_vf(a)= \lim_{t\to0}\frac{f(a+tv)-f(a)}{t},

when the limit exists.

If ff is totally differentiable at aa, all these directional derivatives exist and

Dvf(a)=Df(a)v.D_vf(a)=Df(a)v.

In particular, the directional derivative depends linearly on vv. Total differentiability also implies that ff is continuous at aa.

The converses do not hold in general. Even continuity together with the existence of every directional derivative is insufficient.

For example, define

f(x,y)={x3x2+y2,(x,y)≠(0,0),0,(x,y)=(0,0).f(x,y)= \begin{cases} \dfrac{x^3}{x^2+y^2},&(x,y)\ne(0,0),\\[6pt] 0,&(x,y)=(0,0). \end{cases}

Since ∣f(x,y)∣≤∣x∣|f(x,y)|\le |x|, this function is continuous at the origin. For every nonzero direction v=(a,b)v=(a,b),

Dvf(0,0)=a3a2+b2.D_vf(0,0)=\frac{a^3}{a^2+b^2}.

However, this expression is not linear in vv. The coordinate partial derivatives are

fx(0,0)=1,fy(0,0)=0,f_x(0,0)=1,\qquad f_y(0,0)=0,

so a total derivative, if it existed, would have to send (a,b)(a,b) to aa. In the direction (1,1)(1,1), the actual directional derivative is 1/21/2, not 11. Therefore the function is not totally differentiable at the origin.

A standard sufficient condition is that all first partial derivatives exist in a neighborhood of aa and are continuous at aa. Under this condition, ff is totally differentiable at aa. Continuity of the partial derivatives is sufficient, but not necessary.

Total derivative along a path

Suppose the inputs depend on a parameter tt:

x(t)=(x1(t),…,xn(t)).x(t)=\bigl(x_1(t),\ldots,x_n(t)\bigr).

If xx is differentiable at tt and ff is totally differentiable at x(t)x(t), the chain rule gives

ddtf(x(t))=Df(x(t)) x′(t).\frac{d}{dt}f(x(t)) = Df(x(t))\,x'(t).

For scalar-valued ff,

dfdt=∑i=1n∂f∂xidxidt.\frac{df}{dt} = \sum_{i=1}^{n} \frac{\partial f}{\partial x_i} \frac{dx_i}{dt}.

The partial derivatives are evaluated at the current point x(t)x(t).

If a quantity also depends explicitly on tt, write it as F(t,x(t))F(t,x(t)). Then

ddtF(t,x(t))=∂F∂t+∑i=1n∂F∂xidxidt.\frac{d}{dt}F(t,x(t)) = \frac{\partial F}{\partial t} + \sum_{i=1}^{n} \frac{\partial F}{\partial x_i}\frac{dx_i}{dt}.

The first term describes explicit dependence on tt; the remaining terms describe dependence transmitted through the changing inputs.

For example, let

F(t,x,y)=tx2+y,x(t)=t2,y(t)=sin⁡t.F(t,x,y)=tx^2+y,\qquad x(t)=t^2,\qquad y(t)=\sin t.

Then

dFdt=x2+2tx(2t)+cos⁡t=5t4+cos⁡t.\frac{dF}{dt} = x^2+2tx(2t)+\cos t = 5t^4+\cos t.

Holding xx and yy fixed would instead give only

∂F∂t=x2.\frac{\partial F}{\partial t}=x^2.

Thus a total derivative along a path cannot be determined without specifying which quantities vary and how they depend on the parameter.

Composition and higher derivatives

For differentiable maps

f:Rn→Rm,g:Rm→Rp,f:\mathbb{R}^n\to\mathbb{R}^m, \qquad g:\mathbb{R}^m\to\mathbb{R}^p,

the derivative of their composition is

D(g∘f)(a)=Dg(f(a))∘Df(a).D(g\circ f)(a)=Dg(f(a))\circ Df(a).

In coordinates, composition of these linear maps becomes matrix multiplication:

Jg∘f(a)=Jg(f(a))Jf(a).J_{g\circ f}(a)=J_g(f(a))J_f(a).

This is the general chain rule underlying the scalar path formulas.

When the derivative map is itself differentiable, the second total derivative D2f(a)D^2f(a) is a bilinear map. For a twice continuously differentiable scalar-valued function, it is represented by the Hessian matrix, and the second-order Taylor expansion is

f(a+h)=f(a)+Df(a)h+12hTHf(a)h+o(∥h∥2).f(a+h) = f(a)+Df(a)h +\frac12h^{\mathsf T}H_f(a)h +o(\|h\|^2).

For a twice differentiable path x(t)x(t) and a sufficiently smooth scalar-valued ff,

d2dt2f(x(t))=x′(t)THf(x(t))x′(t)+∇f(x(t))⋅x′′(t).\frac{d^2}{dt^2}f(x(t)) = x'(t)^{\mathsf T}H_f(x(t))x'(t) + \nabla f(x(t))\cdot x''(t).

The second derivative along a path therefore depends both on the curvature of the function and on the acceleration of the path.

Applications

Sensitivity and computation

In sensitivity analysis, the total derivative describes how simultaneous input changes affect an output. Its Jacobian collects all first-order input–output sensitivities. This is useful in numerical models, parameter estimation, and optimization.

Automatic differentiation applies the chain rule systematically to computational operations. Forward-mode differentiation can compute a Jacobian–vector product Df(a)vDf(a)v, while reverse-mode differentiation can compute the gradient of a scalar output without explicitly constructing every intermediate Jacobian.

These are local, first-order descriptions. For finite perturbations, neglected nonlinear terms can be important.

Dynamics and transport

If a scalar field u(t,x)u(t,x) is evaluated along a trajectory satisfying

x′(t)=v(t,x(t)),x'(t)=v(t,x(t)),

then

ddtu(t,x(t))=∂u∂t+v⋅∇u.\frac{d}{dt}u(t,x(t)) = \frac{\partial u}{\partial t} + v\cdot\nabla u.

In continuum mechanics, this rate along a moving particle is called the material derivative. It distinguishes change observed while following the particle from change observed at a fixed spatial location.

In the calculus of variations, expressions such as

ddt(∂L∂q˙i)\frac{d}{dt}\left(\frac{\partial L}{\partial\dot q_i}\right)

in the Euler–Lagrange equations are total derivatives along a trajectory. They account for all dependencies of the expression on time, position, and velocity.

Extensions beyond Euclidean spaces

For normed vector spaces XX and YY, Fréchet differentiability uses the same remainder condition, with the derivative required to be a bounded linear map X→YX\to Y. In infinite-dimensional spaces, boundedness must be stated explicitly; in finite dimensions, every linear map is bounded.

On a smooth manifold, the derivative of a smooth map f:M→Nf:M\to N at pp is a linear map between tangent spaces:

dfp:TpM→Tf(p)N.df_p:T_pM\to T_{f(p)}N.

Coordinate charts represent this map by a Jacobian, but the map itself is independent of the chosen coordinates. For a real-valued smooth function, dfdf is a differential one-form, assigning a linear functional to each tangent space.