Академический Документы
Профессиональный Документы
Культура Документы
Setup
Establish uniform weights formula as given in Fornberg, B. "Calculation of Weights in Finite Difference Formulas." SIAM
Review 40, no. 3 (1998): 685-691 and discussed within
http : // reference.wolfram.com/mathematica/tutorial/NDSolvePDE.html.
Compute centered differences and rescale coefficients according to their least common multiple.
First derivative
In[275]:= CDCoefficients@1, 2D
Out[275]= 82 h, 8- 1, 0, 1<<
In[276]:= CDCoefficients@1, 4D
In[277]:= CDCoefficients@1, 6D
In[278]:= CDCoefficients@1, 8D
Out[278]= 8840 h, 83, - 32, 168, - 672, 0, 672, - 168, 32, - 3<<
Second derivative
In[279]:= CDCoefficients@2, 2D
In[280]:= CDCoefficients@2, 4D
In[281]:= CDCoefficients@2, 6D
In[282]:= CDCoefficients@2, 8D
Out[282]= 95040 h2 , 8- 9, 128, - 1008, 8064, - 14 350, 8064, - 1008, 128, - 9<=