6 Numerical Differentiation

Slides:



Advertisements
Similar presentations
Interpolation A standard idea in interpolation now is to find a polynomial pn(x) of degree n (or less) that assumes the given values; thus (1) We call.
Advertisements

MATHEMATICAL METHODS.
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Numerical Computation
2. Numerical differentiation. Approximate a derivative of a given function. Approximate a derivative of a function defined by discrete data at the discrete.
Lecture 18 - Numerical Differentiation
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Computational Methods in Physics PHYS 3437
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Chapter 19 Numerical Differentiation §Estimate the derivatives (slope, curvature, etc.) of a function by using the function values at only a set of discrete.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 22 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 5 Approximations, Errors and The Taylor Series.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
1 Chapter 6 NUMERICAL DIFFERENTIATION. 2 When we have to differentiate a function given by a set of tabulated values or when a complicated function is.
Chapter 6 Numerical Interpolation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
Chapter 4 Numerical Differentiation and Integration 1/16 Given x 0, approximate f ’(x 0 ). h xfhxf xf h )()( lim)('    x0x0 x1x1 h x1x1 x0x0.
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Now that you’ve found a polynomial to approximate your function, how good is your polynomial? Find the 6 th degree Maclaurin polynomial for For what values.
Curve-Fitting Regression
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Chap. 11 Numerical Differentiation and Integration
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Remainder Theorem. The n-th Talor polynomial The polynomial is called the n-th Taylor polynomial for f about c.
Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials.
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
5. Interpolation 5.1 Definition of interpolation. 5.2 Formulas for Interpolation. 5.3 Formulas for Interpolation for unequal interval. 5.4 Applications.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
CSE 330 Numerical Methods Lecture 05 Chapter 5: Numerical Differentiation Md. Omar Faruqe
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
Data manipulation II: Least Squares Fitting
High Accuracy Differentiation Formulas
Numerical Analysis Lecture 42.
Numerical Analysis Lecture 25.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Numerical Analysis Lecture 27.
Interpolation.
Class Notes 18: Numerical Methods (1/2)
Chapter 18.
Chapter 23.
CSE Differentiation Roger Crawfis.
Numerical Analysis Lecture 23.
Numerical differentiation
Numerical Differentiation Chapter 23
POLYNOMIAL INTERPOLATION
Numerical Analysis Lecture 26.
Numerical Computation and Optimization
MATH 2140 Numerical Methods
Numerical Analysis Lecture 19.
4 Interpolation and Polynomial Approximation
5.3 Higher-Order Taylor Methods
MATH 174: NUMERICAL ANALYSIS I
Numerical Analysis Lecture 2.
SKTN 2393 Numerical Methods for Nuclear Engineers
CPE 332 Computer Engineering Mathematics II
12.12 Lagrange Remainder Mathboat.com.
1 Newton’s Method.
Chapter 2 A Survey of Simple Methods and Tools
Numerical Analysis Lecture 24.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

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

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

More Central-Difference Formulas The popular choice are those of order 𝑶 𝒉 𝟐 , 𝑶 𝒉 𝟒 ,

More Central-Difference Formulas Ex. 6.4 let 𝒇 𝒙 =𝒄𝒐𝒔 𝒙 . Compute the approximations to 𝒇′′(𝟎.𝟖)

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 𝑶( 𝒉 𝟒 )

Error Analysis The error term has the form Ex. 6.5 let 𝒇 𝒙 =𝒄𝒐𝒔(𝒙). Find approximations to 𝒇 ′′ 𝟎.𝟖 for 𝒉=𝟎.𝟏

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.

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.

Differentiation of the Lagrange Polynomial Ex. 6.6 Derive the formula Start with the Lagrange interpolation polynomial for 𝒇(𝒕)

Differentiation of the Lagrange Polynomial Ex. 6.7 Derive the formula Start with the Lagrange interpolation polynomial for 𝒇(𝒕) based on five pts

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

Differentiation of the Newton Polynomial Case (ii): if 𝒕 𝟎 =𝒙, 𝒕 𝟏 =𝒙+𝒉, and 𝒕 𝟐 =𝒙−𝒉, then Case (iii): if 𝒕 𝟎 =𝒙, 𝒕 𝟏 =𝒙−𝒉, and 𝒕 𝟐 =𝒙−𝟐𝒉, then

Differentiation of the Newton Polynomial The newton polynomial P(t) of degree N that approximates 𝒇(𝒕) using the nodes 𝒕 𝟎 , 𝒕 𝟐, 𝒕 𝟐 ,…., 𝒕 𝑵 The derivative of 𝑷(𝒕)

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);

Exercise Homework Exercises 6.2.5 P243 1 Program (Report6: 数值微分计算方法实验) Algorithm and Programming 6.1.6 P235 1(b),2,3; Algorithm and Programming 6.2.6 P244 1; Report File Format: 学号_姓名_report6.doc Upload the Online Class(互动教学空间网络学堂物理学院数值计算方法). Deadline :