MATH761 Lesson03: Analysis of FDM

Definition. For grid data 𝐐i={Qi+jq(xi+jh),jJ}, a finite difference formula hk(𝐐i) is a pth-order accurate approximation of the kth derivative q(k)(xi) if ||hk(𝐐i)-q(k)(xi)||=𝒪(hp).

Accuracy analysis in the independent variable space is carried out by Taylor series comparison

In[9]:=

Dp[f[x],1]

f(h+x)-f(x)h

In[11]:=

Series[ Dp[f[x],1] ,{h,0,2}] - f'[x]

12hf''(x)+16h2f(3)(x)+O(h3)

In[24]:=

Table[ {(Dp[f[i],p] /. f->Q /. h->1)/h,Limit[(Normal[Series[Dp[f[x],p],{h,0,p}]] - f'[x])/h^p, h->0] /. f->q},{p,1,5}] // TableForm

Qi+1-Qih q''(x)2 -3Qi+4Qi+1-Qi+22h -13q(3)(x) -11Qi+18Qi+1-9Qi+2+2Qi+36h 14q(4)(x) -25Qi+48Qi+1-36Qi+2+16Qi+3-3Qi+412h -15q(5)(x) -137Qi+300Qi+1-300Qi+2+200Qi+3-75Qi+4+12Qi+560h 16q(6)(x)

In[25]:=