Post · 8 min read· pp. 1058–1063

Higher-Order Differentials

Introduction

Higher-order differentials are necessary skills for calculus. When it comes to the multivariate higher-order differentials, people will often feel confused about the definition and the mathematical expressions.

In this blog post, I would like to discuss and derive the univariate and multivariate higher-order differentials.

Prerequisites

Derivative Definition

The derivative of a function y=f(x)y = f(x) measures the rate of change of yy with respect to xx. The derivative of the function y=f(x)y = f(x) at the point xx is defined as the limit of the ratio ΔyΔx\frac{\Delta y}{\Delta x} as Δx→0\Delta x \rightarrow 0.

y′=f′(x)=dydx=df(x)dx=lim⁡Δx→0ΔyΔx=lim⁡Δx→0f(x+Δx)−f(x)Δx\begin{align} y^{\prime} &= f^{\prime}(x) \\ &= \frac{dy}{dx} \\ &= \frac{d f(x)}{dx} \\ &= \lim_{\Delta x \rightarrow 0} \frac{\Delta y}{\Delta x} \\ &= \lim_{\Delta x \rightarrow 0} \frac{f(x + \Delta x) - f(x)}{\Delta x} \\ \end{align}

Multi-Index Notation

There are some notations in order to express the multivariate Taylor theorem conveniently.

Suppose α∈Nn\alpha \in \mathbb{N}^n, α={α1,α2,⋯ ,αn}\alpha = \{\alpha_1, \alpha_2, \cdots, \alpha_n\}, and x∈Rnx \in \mathbb{R}^n, x={x1,x2,⋯ ,xn}x = \{x_1, x_2, \cdots, x_n\}, we have the following notations.

∣α∣=α1+α2+⋯+αn\lvert \alpha \rvert = \alpha_1 + \alpha_2 + \cdots + \alpha_n

α!=α1!α2!⋯αn!\alpha ! = \alpha_1! \alpha_2! \cdots \alpha_n!

(nα)=n!α!=n!α1!α2!⋯αn!{n \choose \alpha} = \frac{n!}{\alpha !} = \frac{n!}{\alpha_1! \alpha_2! \cdots \alpha_n!}

xα=x1α1x2α2⋯xnαnx^{\alpha} = x_1^{\alpha_1} x_2^{\alpha_2} \cdots x_n^{\alpha_n}

Given a constant natural number kk, how many different α\alpha are there such that ∣α∣=k\lvert \alpha \rvert = k?

Let’s look at an example. Assume n=3n = 3 and k=2k = 2, the α\alpha such that ∣α∣=k\lvert \alpha \rvert = k are

α=(2,0,0)α=(0,2,0)α=(0,0,2)α=(1,1,0)α=(1,0,1)α=(0,1,1)\begin{gather} \alpha = (2, 0, 0) \\ \alpha = (0, 2, 0) \\ \alpha = (0, 0, 2) \\ \alpha = (1, 1, 0) \\ \alpha = (1, 0, 1) \\ \alpha = (0, 1, 1) \\ \end{gather}

Therefore, we have $6$ different α\alpha for n=3n = 3 and k=2k = 2.

The formula for the general case is actually not hard to derive. This combination problem is actually equivalent to the combination problem that we have k+nk + n identical balls, and nn different boxes, how many unique ways to put these balls into the boxes such that each box has at least one ball. To solve it, we would need to put all the k+nk+n balls as a sequence, and insert n−1n-1 barriers between the balls, such that each two adjacent balls could have at most one barrier. The number of combinations for this problem is, obviously, (k+n−1n−1)k+n-1 \choose n-1.

Let’s verify if the formula we derived is valid for the example we have seen above.

(k+n−1n−1)=(2+3−13−1)=(42)=6{k+n-1 \choose n-1} = {2+3-1 \choose 3-1} = {4 \choose 2} = 6

Univariate Higher-Order Differentials

First-Order Differential

Suppose a univariate function f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} in an interval I=(a,b)I = (a, b), y=f(x)y = f(x), the first-order differential of the function at the point x∈Ix \in I is defined as

dy=df(x)=f′(x)dxdy = df(x) = f^{\prime}(x) dx

Note that the definition of the first-order differential is consistent with the definition of the derivative.

There are many useful properties of the first-order differential, which could be proved by the definition of derivatives mentioned in the prerequisite section. The properties that will be used for deriving the higher-order differentials are the linearity rule and the product rule.

d(af(x)+bg(x))=adf(x)+bg(x)=af′(x)dx+bg′(x)dx\begin{align} d(af(x) + bg(x)) &= a df(x) + b g(x) \\ &= a f^{\prime}(x) dx + b g^{\prime}(x) dx \\ \end{align}

d(f(x)g(x))=g(x)df(x)+f(x)dg(x)=g(x)f′(x)dx+f(x)g′(x)dx\begin{align} d(f(x) g(x)) &= g(x)df(x) + f(x) dg(x) \\ &= g(x)f^{\prime}(x) dx + f(x)g^{\prime}(x) dx \\ \end{align}

We will skip the proofs for these properties since the proofs are somewhat trivial.

Higher-Order Differential

Because xx is an independent variable, dxdx is treated as a constant, and only dependent variable has the first-order differential, so we have the second-order differential of yy, d2yd^2 y, as follows

d2y=d(dy)=d(f′(x)dx)=d(f′(x))dx=(f′′(x)dx)dx=f′′(x)(dx)2=f′′(x)dx2\begin{align} d^2y &= d (dy) \\ &= d \big( f^{\prime}(x) dx \big) \\ &= d \big( f^{\prime}(x) \big) dx \\ &= \big( f^{\prime\prime}(x) dx \big) dx \\ &= f^{\prime\prime}(x) (dx)^2 \\ &= f^{\prime\prime}(x) dx^2 \\ \end{align}

Note that (dx)2(dx)^2 is commonly denoted as dx2dx^2.

d2y=f′′(x)dx2\begin{align} d^2y &= f^{\prime\prime}(x) dx^2 \\ \end{align}

In general, the nn-th order differential dnyd^n y is

dny=fn(x)dxnd^n y = f^{n}(x) dx^n

This also leads to the nn-order derivative for univariate function.

fn(x)=dnydxnf^{n}(x) = \frac{d^n y}{dx^n}

Sometimes, it is written as

fn(x)=dnf(x)dxnf^{n}(x) = \frac{d^n f (x)}{dx^n}

Higher-Order Differential of a Composite Function

Suppose y=f(x)y = f(x) and xx is also dependent on an auxillary or latent variable uu, i.e., x=g(u)x = g(u),

y=f(x)=f(g(u))y = f(x) = f(g(u))

By applying the first-order differential properties, we have

d2y=d(dy)=d(f′(x)dx)\begin{align} d^2y &= d (dy) \\ &= d \big( f^{\prime}(x) dx \big) \\ \end{align}

Note that now xx is not an independent variable and dxdx is no longer a constant, so we have

d2y=d(f′(x)dx)=(d(f′(x))dx+f′(x)d(dx))=f′′(x)(dx)2+f′(x)d2x=f′′(x)dx2+f′(x)d2x\begin{align} d^2y &= d \big( f^{\prime}(x) dx \big) \\ &= \Big( d\big( f^{\prime}(x) \big) dx + f^{\prime}(x) d (dx) \Big) \\ &= f^{\prime\prime}(x) (dx)^2 + f^{\prime}(x) d^2 x \\ &= f^{\prime\prime}(x) dx^2 + f^{\prime}(x) d^2 x \\ \end{align}

Using the same approach, computing d3yd^3y, d4yd^4y, ⋯\cdots, dnyd^ny, ⋯\cdots, becomes relatively simpler. For example,

d3y=d(d2y)=d(f′′(x)dx2+f′(x)d2x)=d(f′′(x)dx2)+d(f′(x)d2x)=d(f′′(x))dx2+f′′(x)d(dx2)+d(f′(x))d2x+f′(x)d(d2x)=f′′′(x)dxdx2+f′′(x)d((dx)(dx))+f′′(x)dxd2x+f′(x)d3x=f′′′(x)dx3+f′′(x)(d(dx)dx+dxd(dx))+f′′(x)dxd2x+f′(x)d3x=f′′′(x)dx3+f′′(x)(d2xdx+dxd2x)+f′′(x)dxd2x+f′(x)d3x=f′′′(x)dx3+3f′′(x)dxd2x+f′(x)d3x\begin{align} d^3y &= d (d^2y) \\ &= d \big( f^{\prime\prime}(x) dx^2 + f^{\prime}(x) d^2 x \big) \\ &= d \big( f^{\prime\prime}(x) dx^2 \big) + d \big( f^{\prime}(x) d^2 x \big) \\ &= d \big( f^{\prime\prime}(x) \big) dx^2 + f^{\prime\prime}(x) d ( dx^2 ) + d \big( f^{\prime}(x) \big) d^2 x + f^{\prime}(x) d( d^2 x )\\ &= f^{\prime\prime\prime}(x) dx dx^2 + f^{\prime\prime}(x) d \big( (dx)(dx) \big) + f^{\prime\prime}(x) dx d^2 x + f^{\prime}(x) d^3 x\\ &= f^{\prime\prime\prime}(x) dx^3 + f^{\prime\prime}(x) \big(d ( dx) dx + dx d(dx) \big) + f^{\prime\prime}(x) dx d^2 x + f^{\prime}(x) d^3 x\\ &= f^{\prime\prime\prime}(x) dx^3 + f^{\prime\prime}(x) (d^2x dx + dx d^2x) + f^{\prime\prime}(x) dx d^2 x + f^{\prime}(x) d^3 x\\ &= f^{\prime\prime\prime}(x) dx^3 + 3 f^{\prime\prime}(x) dx d^2 x + f^{\prime}(x) d^3 x \\ \end{align}

Multivariate Higher-Order Differentials

First-Order Differential

Suppose a univariate function f:Rn→Rf: \mathbb{R}^n \rightarrow \mathbb{R} in a region, y=f(x)=f(x1,x2,⋯ ,xn)y = f(x) = f(x_1, x_2, \cdots, x_n), the first-order partial differential of the function at the point x={x1,x2,⋯ ,xn}x = \{ x_1, x_2, \cdots, x_n \} with respect to the variable xix_i is defined as

∂y∂xidxi\frac{\partial y}{\partial x_i} dx_i

The first-order total differential of the function evaluated at xx is defined as

dy=∂y∂x1dx1+∂y∂x2dx2+⋯+∂y∂xndxn=∑i=1n∂y∂xidxi=∑i=1n∂f(x)∂xidxi\begin{align} dy &= \frac{\partial y}{\partial x_1} dx_1 + \frac{\partial y}{\partial x_2} dx_2 + \cdots + \frac{\partial y}{\partial x_n} dx_n \\ &= \sum_{i = 1}^{n} \frac{\partial y}{\partial x_i} dx_i \\ &= \sum_{i = 1}^{n} \frac{\partial f(x)}{\partial x_i} dx_i \\ \end{align}

Higher-Order Differential

Similar to the higher-order differential for univariate functions, we could derive the higher-order differential for multivariate functions based on definitions.

The second-order total differential of the function evaluated at xx is

d2y=d(dy)=d(∑i=1n∂y∂xidxi)=∑i=1nd(∂y∂xidxi)=∑i=1nd(∂y∂xi)dxi=∑i=1n(∑j=1n∂(∂yxi)∂xjdxj)dxi=∑i=1n(∑j=1n∂2y∂xi∂xjdxj)dxi=∑i=1n(∑j=1n∂2y∂xi∂xjdxidxj)=∑∣α∣=2(∣α∣α)(∂∣α∣y∂x1α1∂x2α2⋯∂xnαndx1α1dx2α2⋯dxnαn)=∑∣α∣=2(∣α∣α)(∂∣α∣f(x)∂x1α1∂x2α2⋯∂xnαndx1α1dx2α2⋯dxnαn)\begin{align} d^2 y &= d (dy) \\ &= d \bigg( \sum_{i = 1}^{n} \frac{\partial y}{\partial x_i} dx_i \bigg) \\ &= \sum_{i = 1}^{n} d \bigg( \frac{\partial y}{\partial x_i} dx_i \bigg) \\ &= \sum_{i = 1}^{n} d \bigg( \frac{\partial y}{\partial x_i} \bigg) dx_i \\ &= \sum_{i = 1}^{n} \bigg( \sum_{j=1}^{n} \frac{\partial(\frac{\partial y}{x_i})}{\partial x_j} dx_j \bigg) dx_i \\ &= \sum_{i = 1}^{n} \bigg( \sum_{j=1}^{n} \frac{\partial^2 y}{\partial x_i \partial x_j} dx_j \bigg) dx_i \\ &= \sum_{i = 1}^{n} \bigg( \sum_{j=1}^{n} \frac{\partial^2 y}{\partial x_i \partial x_j} dx_i dx_j \bigg) \\ &= \sum_{\lvert \alpha \rvert = 2}^{} {\lvert \alpha \rvert \choose \alpha} \bigg( \frac{\partial^{\lvert \alpha \rvert} y}{\partial x_1^{\alpha_1} \partial x_2^{\alpha_2} \cdots \partial x_n^{\alpha_n}} dx_1^{\alpha_1} dx_2^{\alpha_2} \cdots dx_n^{\alpha_n} \bigg) \\ &= \sum_{\lvert \alpha \rvert = 2}^{} {\lvert \alpha \rvert \choose \alpha} \bigg( \frac{\partial^{\lvert \alpha \rvert} f(x)}{\partial x_1^{\alpha_1} \partial x_2^{\alpha_2} \cdots \partial x_n^{\alpha_n}} dx_1^{\alpha_1} dx_2^{\alpha_2} \cdots dx_n^{\alpha_n} \bigg) \\ \end{align}

where α∈Nn\alpha \in \mathbb{N}^n and (∣α∣α)\lvert \alpha \rvert \choose \alpha is the multinomial coefficient represented using multi-index notation.

In general, the kk-th order total differential of the function evaluated at xx is

dky=dkf(x)=∑∣α∣=k(kα)(∂∣α∣f(x)∂x1α1∂x2α2⋯∂xnαndx1α1dx2α2⋯dxnαn)\begin{align} d^k y &= d^k f(x) \\ &= \sum_{\lvert \alpha \rvert = k}^{} {k \choose \alpha} \bigg( \frac{\partial^{\lvert \alpha \rvert} f(x)}{\partial x_1^{\alpha_1} \partial x_2^{\alpha_2} \cdots \partial x_n^{\alpha_n}} dx_1^{\alpha_1} dx_2^{\alpha_2} \cdots dx_n^{\alpha_n} \bigg) \\ \end{align}

If we denote

dx=dx1,dx2,⋯ ,dxndx = {d x_1, d x_2, \cdots, d x_n}

and the kk-th order partial derivative

Dαf=∂∣α∣f∂x1α1∂x2α2⋯∂xnαnD^{\alpha}f = \frac{\partial^{\lvert \alpha \rvert} f}{\partial x_1^{\alpha_1} \partial x_2^{\alpha_2} \cdots \partial x_n^{\alpha_n}}

We could simplify the kk-th order total differential of the function evaluated at xx,

dky=dkf(x)=∑∣α∣=k(∣α∣α)Dαf(x)(dx)α\begin{align} d^k y &= d^k f(x) \\ &= \sum_{\lvert \alpha \rvert = k}^{} {\lvert \alpha \rvert \choose \alpha} D^{\alpha}f(x) (dx)^{\alpha}\\ \end{align}

As has been discussed in the prerequisite section, the number of terms in the summation is (k+n−1n−1)k+n-1 \choose n-1.

Higher-Order Differential of a Composite Function

The higher-order differential for multivariate functions that consists of composite function(s) are much more complicated and should be discussed case by case. We will just skip the discussion about it here.

References