About the Project
3 Numerical MethodsAreas

§3.4 Differentiation

Contents
  1. §3.4(i) Equally-Spaced Nodes
  2. §3.4(ii) Analytic Functions
  3. §3.4(iii) Partial Derivatives

§3.4(i) Equally-Spaced Nodes

The Lagrange (n+1)-point formula is

3.4.1 hft=hf(x0+th)=k=n0n1Bknfk+hRn,t,
n0<t<n1,

and follows from the differentiated form of (3.3.4). The Bkn are the differentiated Lagrangian interpolation coefficients:

3.4.2 Bkn=dAkn/dt,

where Akn 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 hRn,t=hn+1(n+1)!(f(n+1)(ξ0)ddtk=n0n1(tk)+f(n+2)(ξ1)k=n0n1(tk)),

where ξ0 and ξ1I.

For the values of n0 and n1 used in the formulas below

3.4.4 h|Rn,t|hn+1(cn|f(n+2)(ξ1)|+1n+1|f(n+1)(ξ0)|),
n0<t<n1,

where cn is defined by (3.3.12), with numerical values as in §3.3(ii).

Two-Point Formula

3.4.5 hft=f0+f1+hR1,t,
0<t<1.

Three-Point Formula

3.4.6 hft=12(12t)f12tf0+12(1+2t)f1+hR2,t,
|t|<1.

Four-Point Formula

3.4.7 hft=k=12Bk3fk+hR3,t,
1<t<2,
3.4.8 B13 =16(26t+3t2),
B03 =12(1+4t3t2),
B13 =12(2+2t3t2),
B23 =16(13t2).

Five-Point Formula

3.4.9 hft=k=22Bk4fk+hR4,t,
|t|<2,
3.4.10 B24 =112(1t3t2+2t3),
B14 =16(48t3t2+4t3),
B04 =12t(52t2),
B14 =16(4+8t3t24t3),
B24 =112(1+t3t22t3).

Six-Point Formula

3.4.11 hft=k=23Bk5fk+hR5,t,
2<t<3,
3.4.12 B25 =1120(610t15t2+20t35t4),
B15 =124(1232t+3t2+16t35t4),
B05 =112(4+30t15t212t3+5t4),
B15 =112(12+16t21t28t3+5t4),
B25 =124(6+2t21t24t3+5t4),
B35 =1120(415t2+5t4).

Seven-Point Formula

3.4.13 hft=k=33Bk6fk+hR6,t,
|t|<3,
3.4.14 B36 =1720(128t45t2+20t3+15t46t5),
B26 =160(99t30t2+20t3+5t43t5),
B16 =148(3672t39t2+52t3+5t46t5),
B06 =118t(4928t2+3t4),
B16 =148(36+72t39t252t3+5t4+6t5),
B26 =160(9+9t30t220t3+5t4+3t5),
B36 =1720(12+8t45t220t3+15t4+6t5).

Eight-Point Formula

3.4.15 hft=k=34Bk7fk+hR7,t,
3<t<4,
3.4.16 B37 =15040(4856t168t2+140t3+35t442t5+7t6),
B27 =1720(72108t213t2+240t310t436t5+7t6),
B17 =1240(144360t48t2+260t345t430t5+7t6),
B07 =1144(36+392t147t2224t3+70t4+24t57t6),
B17 =1144(144+216t264t2156t3+85t4+18t57t6),
B27 =1240(72+36t267t280t3+90t4+12t57t6),
B37 =1720(48+8t192t220t3+85t4+6t57t6),
B47 =15040(36147t2+70t47t6).

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 1k!f(k)(x0)=12πiCf(ζ)(ζx0)k+1dζ,

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 x0 is interior to C. Taking C to be a circle of radius r centered at x0, we obtain

3.4.18 1k!f(k)(x0)=12πrk02πf(x0+reiθ)eikθdθ.

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

Example

f(z)=ez, x0=0. The integral (3.4.18) becomes

3.4.19 1k!=12πrk02πercosθcos(rsinθkθ)dθ.

With the choice r=k (which is crucial when k is large because of numerical cancellation) the integrand equals ek at the dominant points θ=0,2π, and in combination with the factor kk 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 ut,s=u(x0+th,y0+sh).

3.4.20 u0,0x=12h(u1,0u1,0)+O(h2),
3.4.21 u0,0x=14h(u1,1u1,1+u1,1u1,1)+O(h2).

Second-Order

3.4.22 2u0,0x2=1h2(u1,02u0,0+u1,0)+O(h2),
3.4.23 2u0,0x2=112h2(u2,0+16u1,030u0,0+16u1,0u2,0)+O(h4),
3.4.24 2u0,0x2=13h2(u1,12u0,1+u1,1+u1,02u0,0+u1,0+u1,12u0,1+u1,1)+O(h2).
3.4.25 2u0,0xy=14h2(u1,1u1,1u1,1+u1,1)+O(h2),
3.4.26 2u0,0xy=12h2(u1,0+u1,0+u0,1+u0,12u0,0u1,1u1,1)+O(h2).

Laplacian

3.4.27 2u =2ux2+2uy2.
3.4.28 2u0,0 =1h2(u1,0+u0,1+u1,0+u0,14u0,0)+O(h2),
3.4.29 2u0,0=112h2(60u0,0+16(u1,0+u0,1+u1,0+u0,1)(u2,0+u0,2+u2,0+u0,2))+O(h4).

Fourth-Order

3.4.30 4u0,0x4 =1h4(u2,04u1,0+6u0,04u1,0+u2,0)+O(h2).
3.4.31 4u0,02x2y =1h4(u1,1+u1,1+u1,1+u1,12u1,02u1,02u0,12u0,1+4u0,0)+O(h2).

Biharmonic Operator

3.4.32 4u=4ux4+24u2x2y+4uy4.
3.4.33 4u0,0=1h4(20u0,08(u1,0+u0,1+u1,0+u0,1)+2(u1,1+u1,1+u1,1+u1,1)+(u0,2+u2,0+u2,0+u0,2))+O(h2),
3.4.34 4u0,0=16h4(184u0,0(u0,3+u0,3+u3,0+u3,0)+14(u0,2+u0,2+u2,0+u2,0)77(u0,1+u0,1+u1,0+u1,0)+20(u1,1+u1,1+u1,1+u1,1)(u1,2+u2,1+u1,2+u2,1+u1,2+u2,1+u1,2+u2,1))+O(h4).

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 2u and 4u on square, triangular, and cubic grids, see Collatz (1960, Table VI, pp. 542–546).