# §3.4 Differentiation

## §3.4(i) Equally-Spaced Nodes

The Lagrange $(n+1)$-point formula is

 3.4.1 $hf^{\prime}_{t}=hf^{\prime}(x_{0}+th)=\sum_{k=n_{0}}^{n_{1}}B_{k}^{n}f_{k}+hR^% {\prime}_{n,t},$ $n_{0}, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder Referenced by: §3.4(i) Permalink: http://dlmf.nist.gov/3.4.E1 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

and follows from the differentiated form of (3.3.4). The $B_{k}^{n}$ are the differentiated Lagrangian interpolation coefficients:

 3.4.2 $B_{k}^{n}=\ifrac{\mathrm{d}A_{k}^{n}}{\mathrm{d}t},$ Defines: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients (locally) Symbols: $\frac{\mathrm{d}\NVar{f}}{\mathrm{d}\NVar{x}}$: derivative of $f$ with respect to $x$ and $A_{k}^{n}$: Lagrangian interpolation coefficients Referenced by: §3.4(i) Permalink: http://dlmf.nist.gov/3.4.E2 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

where $A_{k}^{n}$ is as in (3.3.10).

If $f^{(n+2)}(x)$ is continuous on the interval $I$ defined in §3.3(i), then the remainder in (3.4.1) is given by

 3.4.3 $hR^{\prime}_{n,t}=\frac{h^{n+1}}{(n+1)!}\left(f^{(n+1)}(\xi_{0})\frac{\mathrm{% d}}{\mathrm{d}t}\prod_{k=n_{0}}^{n_{1}}(t-k)+f^{(n+2)}(\xi_{1})\prod_{k=n_{0}}% ^{n_{1}}(t-k)\right),$ Defines: $R^{\prime}_{n,t}(x)$: remainder (locally) Symbols: $\frac{\mathrm{d}\NVar{f}}{\mathrm{d}\NVar{x}}$: derivative of $f$ with respect to $x$ and $!$: factorial (as in $n!$) Permalink: http://dlmf.nist.gov/3.4.E3 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

where $\xi_{0}$ and $\xi_{1}\in I$.

For the values of $n_{0}$ and $n_{1}$ used in the formulas below

 3.4.4 $h\left|R^{\prime}_{n,t}\right|\leq h^{n+1}\left(c_{n}\left|f^{(n+2)}(\xi_{1})% \right|+\frac{1}{n+1}\left|f^{(n+1)}(\xi_{0})\right|\right),$ $n_{0}, Symbols: $c_{n}$: product and $R^{\prime}_{n,t}(x)$: remainder Permalink: http://dlmf.nist.gov/3.4.E4 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

where $c_{n}$ is defined by (3.3.12), with numerical values as in §3.3(ii).

### Two-Point Formula

 3.4.5 $hf^{\prime}_{t}=-f_{0}+f_{1}+hR^{\prime}_{1,t},$ $0. Symbols: $R^{\prime}_{n,t}(x)$: remainder Permalink: http://dlmf.nist.gov/3.4.E5 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

### Three-Point Formula

 3.4.6 $hf^{\prime}_{t}=-\tfrac{1}{2}(1-2t)f_{-1}-2tf_{0}+\tfrac{1}{2}(1+2t)f_{1}+hR^{% \prime}_{2,t},$ $\left|t\right|<1$. Symbols: $R^{\prime}_{n,t}(x)$: remainder A&S Ref: 25.3.4 Permalink: http://dlmf.nist.gov/3.4.E6 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)

### Four-Point Formula

 3.4.7 $hf^{\prime}_{t}=\sum_{k=-1}^{2}B_{k}^{3}f_{k}+hR^{\prime}_{3,t},$ $-1, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder A&S Ref: 25.3.5 (modification of) Permalink: http://dlmf.nist.gov/3.4.E7 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)
 3.4.8 $\displaystyle B_{-1}^{3}$ $\displaystyle=-\tfrac{1}{6}(2-6t+3t^{2}),$ $\displaystyle B_{0}^{3}$ $\displaystyle=-\tfrac{1}{2}(1+4t-3t^{2}),$ $\displaystyle B_{1}^{3}$ $\displaystyle=\tfrac{1}{2}(2+2t-3t^{2}),$ $\displaystyle B_{2}^{3}$ $\displaystyle=-\tfrac{1}{6}(1-3t^{2}).$ Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients Permalink: http://dlmf.nist.gov/3.4.E8 Encodings: TeX, TeX, TeX, TeX, pMML, pMML, pMML, pMML, png, png, png, png See also: Annotations for 3.4(i)

### Five-Point Formula

 3.4.9 $hf^{\prime}_{t}=\sum_{k=-2}^{2}B_{k}^{4}f_{k}+hR^{\prime}_{4,t},$ $\left|t\right|<2$, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder A&S Ref: 25.3.6 (modification of) Permalink: http://dlmf.nist.gov/3.4.E9 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)
 3.4.10 $\displaystyle B_{-2}^{4}$ $\displaystyle=\tfrac{1}{12}(1-t-3t^{2}+2t^{3}),$ $\displaystyle B_{-1}^{4}$ $\displaystyle=-\tfrac{1}{6}(4-8t-3t^{2}+4t^{3}),$ $\displaystyle B_{0}^{4}$ $\displaystyle=-\tfrac{1}{2}t(5-2t^{2}),$ $\displaystyle B_{1}^{4}$ $\displaystyle=\tfrac{1}{6}(4+8t-3t^{2}-4t^{3}),$ $\displaystyle B_{2}^{4}$ $\displaystyle=-\tfrac{1}{12}(1+t-3t^{2}-2t^{3}).$ Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients Permalink: http://dlmf.nist.gov/3.4.E10 Encodings: TeX, TeX, TeX, TeX, TeX, pMML, pMML, pMML, pMML, pMML, png, png, png, png, png See also: Annotations for 3.4(i)

### Six-Point Formula

 3.4.11 $hf^{\prime}_{t}=\sum_{k=-2}^{3}B_{k}^{5}f_{k}+hR^{\prime}_{5,t},$ $-2, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder Permalink: http://dlmf.nist.gov/3.4.E11 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)
 3.4.12 $\displaystyle B_{-2}^{5}$ $\displaystyle=\tfrac{1}{120}(6-10t-15t^{2}+20t^{3}-5t^{4}),$ $\displaystyle B_{-1}^{5}$ $\displaystyle=-\tfrac{1}{24}(12-32t+3t^{2}+16t^{3}-5t^{4}),$ $\displaystyle B_{0}^{5}$ $\displaystyle=-\tfrac{1}{12}(4+30t-15t^{2}-12t^{3}+5t^{4}),$ $\displaystyle B_{1}^{5}$ $\displaystyle=\tfrac{1}{12}(12+16t-21t^{2}-8t^{3}+5t^{4}),$ $\displaystyle B_{2}^{5}$ $\displaystyle=-\tfrac{1}{24}(6+2t-21t^{2}-4t^{3}+5t^{4}),$ $\displaystyle B_{3}^{5}$ $\displaystyle=\tfrac{1}{120}(4-15t^{2}+5t^{4}).$ Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients Permalink: http://dlmf.nist.gov/3.4.E12 Encodings: TeX, TeX, TeX, TeX, TeX, TeX, pMML, pMML, pMML, pMML, pMML, pMML, png, png, png, png, png, png See also: Annotations for 3.4(i)

### Seven-Point Formula

 3.4.13 $hf^{\prime}_{t}=\sum_{k=-3}^{3}B_{k}^{6}f_{k}+hR^{\prime}_{6,t},$ $\left|t\right|<3$, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder Permalink: http://dlmf.nist.gov/3.4.E13 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)
 3.4.14 $\displaystyle B_{-3}^{6}$ $\displaystyle=-\tfrac{1}{720}(12-8t-45t^{2}+20t^{3}+15t^{4}-6t^{5}),$ $\displaystyle B_{-2}^{6}$ $\displaystyle=\tfrac{1}{60}(9-9t-30t^{2}+20t^{3}+5t^{4}-3t^{5}),$ $\displaystyle B_{-1}^{6}$ $\displaystyle=-\tfrac{1}{48}(36-72t-39t^{2}+52t^{3}+5t^{4}-6t^{5}),$ $\displaystyle B_{0}^{6}$ $\displaystyle=-\tfrac{1}{18}t(49-28t^{2}+3t^{4}),$ $\displaystyle B_{1}^{6}$ $\displaystyle=\tfrac{1}{48}(36+72t-39t^{2}-52t^{3}+5t^{4}+6t^{5}),$ $\displaystyle B_{2}^{6}$ $\displaystyle=-\tfrac{1}{60}(9+9t-30t^{2}-20t^{3}+5t^{4}+3t^{5}),$ $\displaystyle B_{3}^{6}$ $\displaystyle=\tfrac{1}{720}(12+8t-45t^{2}-20t^{3}+15t^{4}+6t^{5}).$ Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients Permalink: http://dlmf.nist.gov/3.4.E14 Encodings: TeX, TeX, TeX, TeX, TeX, TeX, TeX, pMML, pMML, pMML, pMML, pMML, pMML, pMML, png, png, png, png, png, png, png See also: Annotations for 3.4(i)

### Eight-Point Formula

 3.4.15 $hf^{\prime}_{t}=\sum_{k=-3}^{4}B_{k}^{7}f_{k}+hR^{\prime}_{7,t},$ $-3, Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients and $R^{\prime}_{n,t}(x)$: remainder Permalink: http://dlmf.nist.gov/3.4.E15 Encodings: TeX, pMML, png See also: Annotations for 3.4(i)
 3.4.16 $\displaystyle B_{-3}^{7}$ $\displaystyle=-\tfrac{1}{5040}(48-56t-168t^{2}+140t^{3}+35t^{4}-42t^{5}+7t^{6}),$ $\displaystyle B_{-2}^{7}$ $\displaystyle=\tfrac{1}{720}(72-108t-213t^{2}+240t^{3}-10t^{4}-36t^{5}+7t^{6}),$ $\displaystyle B_{-1}^{7}$ $\displaystyle=-\tfrac{1}{240}(144-360t-48t^{2}+260t^{3}-45t^{4}-30t^{5}+7t^{6}),$ $\displaystyle B_{0}^{7}$ $\displaystyle=-\tfrac{1}{144}(36+392t-147t^{2}-224t^{3}+70t^{4}+24t^{5}-7t^{6}),$ $\displaystyle B_{1}^{7}$ $\displaystyle=\tfrac{1}{144}(144+216t-264t^{2}-156t^{3}+85t^{4}+18t^{5}-7t^{6}),$ $\displaystyle B_{2}^{7}$ $\displaystyle=-\tfrac{1}{240}(72+36t-267t^{2}-80t^{3}+90t^{4}+12t^{5}-7t^{6}),$ $\displaystyle B_{3}^{7}$ $\displaystyle=\tfrac{1}{720}(48+8t-192t^{2}-20t^{3}+85t^{4}+6t^{5}-7t^{6}),$ $\displaystyle B_{4}^{7}$ $\displaystyle=-\tfrac{1}{5040}(36-147t^{2}+70t^{4}-7t^{6}).$ Symbols: $B_{k}^{n}$: differentiated Lagrangian interpolation coefficients Permalink: http://dlmf.nist.gov/3.4.E16 Encodings: TeX, TeX, TeX, TeX, TeX, TeX, TeX, TeX, pMML, pMML, pMML, pMML, pMML, pMML, pMML, pMML, png, png, png, png, png, png, png, png See also: Annotations for 3.4(i)

For corresponding formulas for second, third, and fourth derivatives, with $t=0$, see Collatz (1960, Table III, pp. 538–539). For formulas for derivatives with equally-spaced real nodes and based on Sinc approximations (§3.3(vi)), see Stenger (1993, §3.5).

## §3.4(ii) Analytic Functions

If $f$ can be extended analytically into the complex plane, then from Cauchy’s integral formula (§1.9(iii))

 3.4.17 $\frac{1}{k!}\,f^{(k)}(x_{0})=\frac{1}{2\pi i}\int_{C}\frac{f(\zeta)}{(\zeta-x_% {0})^{k+1}}\,\mathrm{d}\zeta,$

where $C$ is a simple closed contour described in the positive rotational sense such that $C$ and its interior lie in the domain of analyticity of $f$, and $x_{0}$ is interior to $C$. Taking $C$ to be a circle of radius $r$ centered at $x_{0}$, we obtain

 3.4.18 $\frac{1}{k!}\,f^{(k)}(x_{0})=\frac{1}{2\pi r^{k}}\int_{0}^{2\pi}f(x_{0}+re^{i% \theta})e^{-ik\theta}\mathrm{d}\theta.$

The integral on the right-hand side can be approximated by the composite trapezoidal rule (3.5.2).

### Example

$f(z)=e^{z}$, $x_{0}=0$. The integral (3.4.18) becomes

 3.4.19 $\frac{1}{k!}=\frac{1}{2\pi r^{k}}\int_{0}^{2\pi}e^{r\mathop{\cos\/}\nolimits% \theta}\mathop{\cos\/}\nolimits\!\left(r\mathop{\sin\/}\nolimits\theta-k\theta% \right)\mathrm{d}\theta.$

With the choice $r=k$ (which is crucial when $k$ is large because of numerical cancellation) the integrand equals $e^{k}$ at the dominant points $\theta=0,2\pi$, and in combination with the factor $k^{-k}$ in front of the integral sign this gives a rough approximation to $1/k!$. The choice $r=k$ is motivated by saddle-point analysis; see §2.4(iv) or examples in §3.5(ix). As explained in §§3.5(i) and 3.5(ix) the composite trapezoidal rule can be very efficient for computing integrals with analytic periodic integrands.

## §3.4(iii) Partial Derivatives

### First-Order

For partial derivatives we use the notation $u_{t,s}=u(x_{0}+th,y_{0}+sh)$.

 3.4.20 $\frac{\partial u_{0,0}}{\partial x}=\frac{1}{2h}\,(u_{1,0}-u_{-1,0})+\mathop{O% \/}\nolimits\!\left(h^{2}\right),$
 3.4.21 $\frac{\partial u_{0,0}}{\partial x}=\frac{1}{4h}\,(u_{1,1}-u_{-1,1}+u_{1,-1}-u% _{-1,-1})+\mathop{O\/}\nolimits\!\left(h^{2}\right).$

### Second-Order

 3.4.22 $\frac{{\partial}^{2}u_{0,0}}{{\partial x}^{2}}=\frac{1}{h^{2}}\,(u_{1,0}-2u_{0% ,0}+u_{-1,0})+\mathop{O\/}\nolimits\!\left(h^{2}\right),$
 3.4.23 $\frac{{\partial}^{2}u_{0,0}}{{\partial x}^{2}}=\frac{1}{12h^{2}}\,(-u_{2,0}+16% u_{1,0}-30u_{0,0}+16u_{-1,0}-u_{-2,0})+\mathop{O\/}\nolimits\!\left(h^{4}% \right),$
 3.4.24 $\frac{{\partial}^{2}u_{0,0}}{{\partial x}^{2}}=\frac{1}{3h^{2}}\,(u_{1,1}-2u_{% 0,1}+u_{-1,1}+u_{1,0}-2u_{0,0}+u_{-1,0}+u_{1,-1}-2u_{0,-1}+u_{-1,-1})+\mathop{% O\/}\nolimits\!\left(h^{2}\right).$
 3.4.25 $\frac{{\partial}^{2}u_{0,0}}{\partial x\partial y}=\frac{1}{4h^{2}}\,(u_{1,1}-% u_{1,-1}-u_{-1,1}+u_{-1,-1})+\mathop{O\/}\nolimits\!\left(h^{2}\right),$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding, $\partial\NVar{x}$: partial differential of $x$ and $u$: function A&S Ref: 25.3.26 Permalink: http://dlmf.nist.gov/3.4.E25 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)
 3.4.26 $\frac{{\partial}^{2}u_{0,0}}{\partial x\partial y}=-\frac{1}{2h^{2}}\,(u_{1,0}% +u_{-1,0}+u_{0,1}+u_{0,-1}-2u_{0,0}-u_{1,1}-u_{-1,-1})+\mathop{O\/}\nolimits\!% \left(h^{2}\right).$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding, $\partial\NVar{x}$: partial differential of $x$ and $u$: function A&S Ref: 25.3.27 Permalink: http://dlmf.nist.gov/3.4.E26 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)

### Laplacian

 3.4.27 $\displaystyle\nabla^{2}u$ $\displaystyle=\frac{{\partial}^{2}u}{{\partial x}^{2}}+\frac{{\partial}^{2}u}{% {\partial y}^{2}}\,.$ 3.4.28 $\displaystyle\nabla^{2}u_{0,0}$ $\displaystyle=\frac{1}{h^{2}}\,(u_{1,0}+u_{0,1}+u_{-1,0}+u_{0,-1}-4u_{0,0})+% \mathop{O\/}\nolimits\!\left(h^{2}\right),$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding and $u$: function A&S Ref: 25.3.30 Permalink: http://dlmf.nist.gov/3.4.E28 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)
 3.4.29 $\nabla^{2}u_{0,0}=\frac{1}{12h^{2}}\left(-60u_{0,0}+16(u_{1,0}+u_{0,1}+u_{-1,0% }+u_{0,-1})-(u_{2,0}+u_{0,2}+u_{-2,0}+u_{0,-2})\right)+\mathop{O\/}\nolimits\!% \left(h^{4}\right).$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding and $u$: function A&S Ref: 25.3.31 Permalink: http://dlmf.nist.gov/3.4.E29 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)

### Fourth-Order

 3.4.30 $\displaystyle\frac{{\partial}^{4}u_{0,0}}{{\partial x}^{4}}$ $\displaystyle=\frac{1}{h^{4}}\,(u_{2,0}-4u_{1,0}+6u_{0,0}-4u_{-1,0}+u_{-2,0})+% \mathop{O\/}\nolimits\!\left(h^{2}\right).$ 3.4.31 $\displaystyle\frac{{\partial}^{4}u_{0,0}}{{\partial}^{2}x{\partial}^{2}y}$ $\displaystyle=\frac{1}{h^{4}}\,(u_{1,1}+u_{-1,1}+u_{1,-1}+u_{-1,-1}-2u_{1,0}-2% u_{-1,0}-2u_{0,1}-2u_{0,-1}+4u_{0,0})+\mathop{O\/}\nolimits\!\left(h^{2}\right).$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding, $\partial\NVar{x}$: partial differential of $x$ and $u$: function A&S Ref: 25.3.29 Permalink: http://dlmf.nist.gov/3.4.E31 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)

### Biharmonic Operator

 3.4.32 $\nabla^{4}u=\frac{{\partial}^{4}u}{{\partial x}^{4}}+2\frac{{\partial}^{4}u}{{% \partial}^{2}x{\partial}^{2}y}+\frac{{\partial}^{4}u}{{\partial y}^{4}}\,.$
 3.4.33 $\nabla^{4}u_{0,0}=\frac{1}{h^{4}}\,(20u_{0,0}-8(u_{1,0}+u_{0,1}+u_{-1,0}+u_{0,% -1})+2(u_{1,1}+u_{1,-1}+u_{-1,1}+u_{-1,-1})+(u_{0,2}+u_{2,0}+u_{-2,0}+u_{0,-2}% ))+\mathop{O\/}\nolimits\!\left(h^{2}\right),$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding and $u$: function A&S Ref: 25.3.32 Permalink: http://dlmf.nist.gov/3.4.E33 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)
 3.4.34 $\nabla^{4}u_{0,0}=\frac{1}{6h^{4}}\,(184u_{0,0}-(u_{0,3}+u_{0,-3}+u_{3,0}+u_{-% 3,0})+14(u_{0,2}+u_{0,-2}+u_{2,0}+u_{-2,0})-77(u_{0,1}+u_{0,-1}+u_{1,0}+u_{-1,% 0})+20(u_{1,1}+u_{1,-1}+u_{-1,1}+u_{-1,-1})-(u_{1,2}+u_{2,1}+u_{1,-2}+u_{2,-1}% +u_{-1,2}+u_{-2,1}+u_{-1,-2}+u_{-2,-1}))+\mathop{O\/}\nolimits\!\left(h^{4}% \right).$ Symbols: $\mathop{O\/}\nolimits\!\left(\NVar{x}\right)$: order not exceeding and $u$: function A&S Ref: 25.3.33 Permalink: http://dlmf.nist.gov/3.4.E34 Encodings: TeX, pMML, png See also: Annotations for 3.4(iii)

The results in this subsection for the partial derivatives follow from Panow (1955, Table 10). Those for the Laplacian and the biharmonic operator follow from the formulas for the partial derivatives.

For additional formulas involving values of $\nabla^{2}u$ and $\nabla^{4}u$ on square, triangular, and cubic grids, see Collatz (1960, Table VI, pp. 542–546).