Clever Geek Handbook
📜 ⬆️ ⬇️

Numerical differentiation

Numerical differentiation - a set of methods for calculating the value of the derivative of a discrete given function.

Introduction

The numerical differentiation is based on the approximation of the function from which the derivative is taken by the interpolation polynomial . All basic formulas for numerical differentiation can be obtained using the first Newton interpolation polynomial (Newton's formulas for the beginning of the table).

The main tasks are to calculate the derivative at the edges of the table and in its middle. For a uniform grid, the numerical differentiation formulas “at the beginning of the table” can be represented in a general form as follows:

fi′=onebh∑jajfi+j+Δ(f),{\ displaystyle f '_ {i} = {\ frac {1} {bh}} \ sum _ {j} a_ {j} f_ {i + j} + \ Delta (f),}  

WhereΔ(f) {\ displaystyle \ Delta (f)}   - the error of the formula. Here are the coefficientsaj {\ displaystyle a_ {j}}   andb {\ displaystyle b}   depend on the degree n of the interpolation polynomial used, that is, on the necessary accuracy (convergence rate to the exact value with decreasing grid step) of the formula. The coefficients are presented in the table.

n{\ displaystyle n}  a0{\ displaystyle a_ {0}}  aone{\ displaystyle a_ {1}}  a2{\ displaystyle a_ {2}}  a3{\ displaystyle a_ {3}}  afour{\ displaystyle a_ {4}}  a5{\ displaystyle a_ {5}}  b{\ displaystyle b}  
one{\ displaystyle 1}  -one{\ displaystyle -1}  one{\ displaystyle 1}  0{\ displaystyle 0}  0{\ displaystyle 0}  0{\ displaystyle 0}  0{\ displaystyle 0}  one{\ displaystyle 1}  
2{\ displaystyle 2}  -3{\ displaystyle -3}  four{\ displaystyle 4}  -one{\ displaystyle -1}  0{\ displaystyle 0}  0{\ displaystyle 0}  0{\ displaystyle 0}  2{\ displaystyle 2}  
3{\ displaystyle 3}  -eleven{\ displaystyle -11}  eighteen{\ displaystyle 18}  -9{\ displaystyle -9}  2{\ displaystyle 2}  0{\ displaystyle 0}  0{\ displaystyle 0}  6{\ displaystyle 6}  
four{\ displaystyle 4}  -25{\ displaystyle -25}  48{\ displaystyle 48}  -36{\ displaystyle -36}  16{\ displaystyle 16}  -3{\ displaystyle -3}  0{\ displaystyle 0}  12{\ displaystyle 12}  
5{\ displaystyle 5}  -137{\ displaystyle -137}  300{\ displaystyle 300}  -300{\ displaystyle -300}  200{\ displaystyle 200}  -75{\ displaystyle -75}  12{\ displaystyle 12}  60{\ displaystyle 60}  

Numerical Differentiation Formulas

One of the universal methods for constructing formulas for numerical differentiation is that by the values ​​of the functionf(x) {\ displaystyle f (x)}   in some nodesx0,xone,...,xN {\ displaystyle x_ {0}, x_ {1}, \ ldots, x_ {N} \;}   build an interpolation polynomialPN(x) {\ displaystyle P_ {N} (x)}   (in the form of Lagrange or in the form of Newton) and approximately assume

f(r)(x)≈PN(r)(x),0≤r≤N{\ displaystyle f ^ {(r)} (x) \ approx P_ {N} ^ {(r)} (x), 0 \ leq r \ leq N}  

In some cases, along with approximate equality, it is possible (for example, using the Taylor formula) to obtain the exact equality containing the remainder termR {\ displaystyle R}   (numerical differentiation error)

f(r)(x)=PN(r)(x)+R,0≤r≤N{\ displaystyle f ^ {(r)} (x) = P_ {N} ^ {(r)} (x) + R, 0 \ leq r \ leq N}  

Such formulas are called numerical differentiation formulas with residual terms.

The degree to which the quantityh=maxhi(hi=xi-xi-one) {\ displaystyle h = \ max h_ {i} \, (h_ {i} = x_ {i} -x_ {i-1})}   in the remainder term is called the error order of the formula for numerical differentiation. Formulas with discarded residual terms are simply called numerical differentiation formulas.

Below are some common formulas for numerical differentiation with residual terms for the first(r=one) {\ displaystyle ({r = 1})}   and second(r=2) {\ displaystyle ({r = 2})}   derivatives in nodes located with a constant steph>0 {\ displaystyle {h> 0}}   :

r=one,N=one{\ displaystyle {r = 1, N = 1}}   (two nodes):
f′(xo)=(fone-f0)/h-hf″(ξ)/2{\ displaystyle f ^ {'} ({x_ {o}}) = ({f_ {1} -f_ {0}}) / hh {f ^ {' '} (\ xi)} / 2}  
f′(xone)=(fone-f0)/h+hf″(ξ)/2{\ displaystyle f ^ {'} ({x_ {1}}) = ({f_ {1} -f_ {0}}) / h + h {f ^ {' '} (\ xi)} / 2}  
r=one,N=2{\ displaystyle {r = 1, N = 2}}   (three nodes):
f′(xo)=(-3f0+fourfone-f2)/2h+h2f‴(ξ)/3{\ displaystyle f ^ {'} ({x_ {o}}) = (- 3 {f_ {0}} + 4 {f_ {1}} - {f_ {2}}) / 2 {h} + h ^ {2} {f ^ {'' '} (\ xi)} / 3}  
f′(xone)=(f2-f0)/2h-h2f‴(ξ)/6{\ displaystyle f ^ {'} ({x_ {1}}) = ({f_ {2}} - {f_ {0}}) / 2 {h} -h ^ {2} {f ^ {' '' } (\ xi)} / 6}  
f′(x2)=(f0-fourfone+3f2)/2h+h2f‴(ξ)/3{\ displaystyle f ^ {'} ({x_ {2}}) = ({f_ {0}} - 4 {f_ {1}} + 3 {f_ {2}}) / 2 {h} + h ^ { 2} {f ^ {'' '} (\ xi)} / 3}  
r=2,N=2{\ displaystyle {r = 2, N = 2}}   (three nodes):
f″(x0)=(f0-2fone+f2)/h2-hf‴(ξ){\ displaystyle f ^ {''} ({x_ {0}}) = ({f_ {0}} - 2 {f_ {1}} + {f_ {2}}) / {h ^ {2}} - h {f ^ {'' '} (\ xi)}}  
f″(xone)=(f0-2fone+f2)/h2-h2f(four)(ξ)/12{\ displaystyle f ^ {''} ({x_ {1}}) = ({f_ {0}} - 2 {f_ {1}} + {f_ {2}}) / {h ^ {2}} - h ^ {2} {f ^ {(4)} (\ xi)} / 12}  
f″(x2)=(f0-2fone+f2)/h2+hf‴(ξ){\ displaystyle f ^ {''} ({x_ {2}}) = ({f_ {0}} - 2 {f_ {1}} + {f_ {2}}) / {h ^ {2}} + h {f ^ {'' '} (\ xi)}}  
r=2,N=3{\ displaystyle {r = 2, N = 3}}   (four nodes):
f″(x0)=(2f0-5fone+fourf2-f3)/h2+elevenh2f(four)(ξ)/12{\ displaystyle f ^ {''} ({x_ {0}}) = (2 {f_ {0}} - 5 {f_ {1}} + 4 {f_ {2}} - {f_ {3}}) / {h ^ {2}} + 11 {h ^ {2}} {f ^ {(4)} (\ xi)} / 12}  
f″(xone)=(f0-2fone+f2)/h2-h2f(four)(ξ)/12{\ displaystyle f ^ {''} ({x_ {1}}) = ({f_ {0}} - 2 {f_ {1}} + {f_ {2}}) / {h ^ {2}} - h ^ {2} {f ^ {(4)} (\ xi)} / 12}  
f″(x2)=(fone-2f2+f3)/h2-h2f(four)(ξ)/12{\ displaystyle f ^ {''} ({x_ {2}}) = ({f_ {1}} - 2 {f_ {2}} + {f_ {3}}) / {h ^ {2}} - h ^ {2} {f ^ {(4)} (\ xi)} / 12}  
f″(x3)=(-f0+fourfone-5f2+2f3)/h2+elevenh2f(four)(ξ)/12{\ displaystyle f ^ {''} ({x_ {3}}) = (- {f_ {0}} + 4 {f_ {1}} - 5 {f_ {2}} + 2 {f_ {3}} ) / {h ^ {2}} + 11 {h ^ {2}} {f ^ {(4)} (\ xi)} / 12}  

Whereh {\ displaystyle h}   Is the grid step, and the pointξ {\ displaystyle \ xi}   is some intermediate point.

In constant-step numerical differentiation formulash {\ displaystyle h}   function valuesf(x) {\ displaystyle f ({x})}   are divided intohr {\ displaystyle h ^ {r}}   wherer {\ displaystyle r}   -order of the calculated derivative. Therefore, for smallh {\ displaystyle h}   fatal errors in function valuesf(x) {\ displaystyle f ({x})}   have a strong influence on the result of numerical differentiation. Thus, the problem arises of choosing the optimal steph {\ displaystyle h}   , since the error of the method proper tends to zero forh→0 {\ displaystyle h \ to {0}}   , and the fatal error is growing. As a result, the total error that occurs during numerical differentiation can increase unlimitedly whenh→0 {\ displaystyle h \ to {0}}   . Therefore, the operation of numerical differentiation is considered incorrect.


See also

  • Divided difference
  • Numerical integration


Source - https://ru.wikipedia.org/w/index.php?title=Numeric differentiation&oldid = 79197524


More articles:

  • Clear (Airport)
  • Coffman Cove (Hydroairport)
  • Alfors, Lars
  • Zoravar Andranik (subway station)
  • Craig (hydroaort)
  • Bressan, Mauro
  • Sinagua
  • Deborah Falabella
  • Men's Water Polo Team of Serbia
  • Modest Carinthian

All articles

Clever Geek | 2019