Presentation is loading. Please wait.

Presentation is loading. Please wait.

6 Numerical Differentiation

Similar presentations


Presentation on theme: "6 Numerical Differentiation"โ€” Presentation transcript:

1 6 Numerical Differentiation
Numerical Differential Formulas Numerical Methods Dr. Lai Shengjian Research Building 710#, UESTC

2 More Central-Difference Formulas
Taylor series can be used to obtain central-difference formulas for the higher derivatives. Proof.

3 More Central-Difference Formulas
The popular choice are those of order ๐‘ถ ๐’‰ ๐Ÿ , ๐‘ถ ๐’‰ ๐Ÿ’ ,

4 More Central-Difference Formulas
Ex. 6.4 let ๐’‡ ๐’™ =๐’„๐’๐’” ๐’™ . Compute the approximations to ๐’‡โ€ฒโ€ฒ(๐ŸŽ.๐Ÿ–)

5 Error Analysis Let ๐’‡ ๐’Œ = ๐’š ๐’Œ + ๐’† ๐’Œ where ๐’† ๐’Œ is the error in computing ๐’‡(๐’™ ๐’Œ ), including noise in measurement and round-off error. The optimal step size will minimize the quantity Step size dilemma. One partial solution to this problem is to use a formula of higher order so that a larger value of h will produce the desired accuracy. The formula for ๐’‡ โ€ฒโ€ฒ ๐’™ of order ๐‘ถ( ๐’‰ ๐Ÿ’ )

6 Error Analysis The error term has the form
Ex. 6.5 let ๐’‡ ๐’™ =๐’„๐’๐’”(๐’™). Find approximations to ๐’‡ โ€ฒโ€ฒ ๐ŸŽ.๐Ÿ– for ๐’‰=๐ŸŽ.๐Ÿ

7 Error Analysis Generally, if numerical differentiation is performed, only about half the accuracy of witch the computer is cable is obtained. The difficulties are more pronounced when working with experimental data, where the function values have been rounded to only a few digits. If a numerical derivative must be obtained from data, we should consider curve fitting, by using least-squares techniques, and differentiate the formula for the curve.

8 Differentiation of the Lagrange Polynomial
If the function must be evaluated at abscissas that lie on one side of ๐’™ ๐ŸŽ . The central-difference formulas cannot be used. Forward or backward difference formulas, these formulas can be derived by differentiation of the Lagrange interpolation polynomial.

9 Differentiation of the Lagrange Polynomial
Ex. 6.6 Derive the formula Start with the Lagrange interpolation polynomial for ๐’‡(๐’•)

10 Differentiation of the Lagrange Polynomial
Ex. 6.7 Derive the formula Start with the Lagrange interpolation polynomial for ๐’‡(๐’•) based on five pts

11 Differentiation of the Newton Polynomial
The newton polynomial P(t) of degree N=2 that approximates ๐’‡(๐’•) using the nodes ๐’• ๐ŸŽ , ๐’• ๐Ÿ , ๐’• ๐Ÿ Choosing the abscissas in different orders Case (i): if ๐’• ๐ŸŽ =๐’™, ๐’• ๐Ÿ =๐’™+๐’‰, and ๐’• ๐Ÿ =๐’™+๐Ÿ๐’‰, then

12 Differentiation of the Newton Polynomial
Case (ii): if ๐’• ๐ŸŽ =๐’™, ๐’• ๐Ÿ =๐’™+๐’‰, and ๐’• ๐Ÿ =๐’™โˆ’๐’‰, then Case (iii): if ๐’• ๐ŸŽ =๐’™, ๐’• ๐Ÿ =๐’™โˆ’๐’‰, and ๐’• ๐Ÿ =๐’™โˆ’๐Ÿ๐’‰, then

13 Differentiation of the Newton Polynomial
The newton polynomial P(t) of degree N that approximates ๐’‡(๐’•) using the nodes ๐’• ๐ŸŽ , ๐’• ๐Ÿ, ๐’• ๐Ÿ ,โ€ฆ., ๐’• ๐‘ต The derivative of ๐‘ท(๐’•)

14 Programming function [A,df]=diffnew(X,Y) A=Y; N=length(X); for j=2:N
for k=N:-1:j A(k)=(A(k)-A(k-1))/(X(k)-X(k-j+1)); end x0=X(1); df=A(2); prod=1; n1=length(A)-1; for k=2:n1 prod=prod*(x0-X(k)); df=df+prod*A(k+1);

15 Exercise Homework Exercises P243 1 Program (Report6: ๆ•ฐๅ€ผๅพฎๅˆ†่ฎก็ฎ—ๆ–นๆณ•ๅฎž้ชŒ) Algorithm and Programming P235 1(b),2,3; Algorithm and Programming P244 1; Report File Format: ๅญฆๅท_ๅง“ๅ_report6.doc Upload the Online Class(ไบ’ๅŠจๆ•™ๅญฆ็ฉบ้—ด๏ƒ ็ฝ‘็ปœๅญฆๅ ‚๏ƒ ็‰ฉ็†ๅญฆ้™ข๏ƒ ๆ•ฐๅ€ผ่ฎก็ฎ—ๆ–นๆณ•). Deadline :


Download ppt "6 Numerical Differentiation"

Similar presentations


Ads by Google