Numerical Analysis Lecture 26.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

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.
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Chapter 7 Numerical Differentiation and Integration
2. Numerical differentiation. Approximate a derivative of a given function. Approximate a derivative of a function defined by discrete data at the discrete.
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
TECHNIQUES OF INTEGRATION
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.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
7.4 Integration of Rational Functions by Partial Fractions TECHNIQUES OF INTEGRATION In this section, we will learn: How to integrate rational functions.
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 3 Polynomial and Rational Functions.
Integration Copyright © Cengage Learning. All rights reserved.
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
Numerical Methods.
CHAPTER 3 NUMERICAL METHODS
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
EE3561_Unit 5(c)AL-DHAIFALLAH14361 EE 3561 : Computational Methods Unit 5 : Interpolation Dr. Mujahed AlDhaifallah (Term 351) Read Chapter 18, Sections.
5. Interpolation 5.1 Definition of interpolation. 5.2 Formulas for Interpolation. 5.3 Formulas for Interpolation for unequal interval. 5.4 Applications.
CSE 330 Numerical Methods Lecture 05 Chapter 5: Numerical Differentiation Md. Omar Faruqe
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
11/22/ Differentiation-Discrete Functions.
Trigonometric Identities
CHAPTER 3 NUMERICAL METHODS
Copyright © Cengage Learning. All rights reserved.
Chapter 7 Numerical Differentiation and Integration
Copyright © Cengage Learning. All rights reserved.
Numerical Analysis Lecture 25.
Reflexivity, Symmetry, and Transitivity
Interpolation.
Differentiation-Discrete Functions
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.
Differentiation-Continuous Functions
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Differentiation-Discrete Functions
Systems of First Order Linear Equations
Numerical Analysis Lecture 27.
Trigonometric Identities
Chapter 18.
Numerical Solutions of Ordinary Differential Equations
Chapter 23.
Solution of Equations by Iteration
Numerical Analysis Lecture 45.
Chapter 7 Numerical Differentiation and Integration
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Numerical Analysis Lecture 23.
POLYNOMIAL INTERPOLATION
The Fundamental Theorem of Algebra And Zeros of Polynomials
5.1 Power Series Method Section 5.1 p1.
Copyright © Cengage Learning. All rights reserved.
MATH 174: Numerical Analysis
Numerical Computation and Optimization
Numerical Analysis Lecture 19.
INTERPOLASI.
2.10 Solution by Variation of Parameters Section 2.10 p1.
Copyright © Cengage Learning. All rights reserved.
SKTN 2393 Numerical Methods for Nuclear Engineers
Arab Open University Faculty of Computer Studies Dr
Chapter 7 Functions of Several Variables
Numerical Integration
Numerical Analysis Lecture 21.
Numerical Computation and Optimization
Romberg Rule of Integration
Legendre Polynomials Pn(x)
Numerical Analysis Lecture 24.
Theory of Approximation: Interpolation
Presentation transcript:

Numerical Analysis Lecture 26

Chapter 5 Interpolation

Finite Difference Operators Newton’s Forward Difference Finite Difference Operators Newton’s Forward Difference Interpolation Formula Newton’s Backward Difference Interpolation Formula Lagrange’s Interpolation Formula Divided Differences Interpolation in Two Dimensions Cubic Spline Interpolation

DIVIDED DIFFERENCES

The zero-th order divided difference

The first order divided difference is defined as

Second order divided difference

Generally

NEWTON’S DIVIDED DIFFERENCE INTERPOLATION FORMULA

Newton’s divided difference interpolation formula

Newton’s divided differences can also be expressed in terms of forward, backward and central differences.

In terms of forward differences

In terms of backward differences

In terms of central differences

Newton’s Divided Difference Formula with Error Term

Following the basic definition of divided differences, we have for any x

Multiplying the second Equation by (x – x0), third by (x – x0)(x – x1) and so on, and the last by (x – x0)(x – x1) … (x – xn-1) and adding the resulting equations, we obtain

Please note that for x = x0, x1, …, xn, the error term vanishes Where Please note that for x = x0, x1, …, xn, the error term vanishes

Error Term in Interpolation Formulae We know, if y (x) is approximated by a polynomial Pn (x) of degree n then the error is given by where,

Alternatively it is also expressed as Now, consider a function F (x), such that Determine the constant K in such a way that F(x) vanishes for x = x0, x1, …, xn and also for an arbitrarily chosen point , which is different from the given (n + 1) points.

Let I denotes the closed interval spanned by the values Let I denotes the closed interval spanned by the values Then F (x) vanishes (n + 2) times in the interval I. By Rolle’s theorem vanishes at least (n + 1) times in the interval I, at least n times, and so on.

Eventually, we can show that Eventually, we can show that vanishes at least once in the interval I, say at Thus, we obtain Since Pn(x) is a polynomial of degree n, its (n + 1)th derivative is zero. Also, from the definition of

Therefore, we get Hence for some in the interval I.

Further more, we observe that Thus the error committed in replacing y (x) by either Newton’s divided difference formula or by an identical Lagrange’s formula is

INTERPOLATION IN TWO DIMENSIONS

Let u be a polynomial function in two variables, say x and y, in particular quadratic in x and cubic in y, which in general can be written as

This relation involves many terms This relation involves many terms. If we have to write a relation involving three or more variables, even low degree polynomials give rise to long expressions. If necessary, we can certainly write, but such complications can be avoided by handling each variable separately.

If we let x, a constant, say x = c, the equation simplifies to the form Now we adopt the following procedure to interpolate at a point (1, m) in a table of two variables, by treating one variable a constant say x = x1. The problem reduces to that of a single variable interpolation.

Any one of the methods discussed in preceding sections can then be applied to get f (x1, m). Then we repeat this procedure for various values of x say x = x2, x3, …, xn keeping y constant. Thus, we get a new table with y constant at the value y = m and with x varying. We can then interpolate at x = 1.

Example Tabulate the values of the function f (x) = x2+y2-y for x = 0,1,2,3,4 and y = 0,1,2,3,4. Using the table of the values, compute f(2.5, 3.5) by numerical double interpolation

Solution The values of the function for the given values of the given values of x and y are given in the following table X …… y…. 1 2 3 4 6 12 7 13 10 16 9 11 15 21 18 22 28

Cont! Using quadratic interpolation in both x and y directions we need to consider three points in x and y directions. To start with we have to treat one variable as constant, say x. Keeping x = 2.5, y = 3.5 as near the center of the set, we choose the table of values corresponding to x = 1,2, 3 and y = 2, 3, 4.

Cont ! The region of fit for the construction of our interpolation polynomial is shown in different color in the table X …… y…. 1 2 3 4 6 12 7 13 10 16 9 11 15 21 18 22 28

Cont ! Thus using Newton’s forward difference formula, we have At x = 1 Y f 2 3 7 4 13 6

Cont ! Similarly At x = 2 Y f 2 6 3 10 4 16

Cont ! Similarly At x = 3 Y f 2 11 3 15 4 21 6

Cont !

Cont !

Cont ! Therefore we arrive at the following result At y=3.5 X f 1 9.75 2 12.75 3 17.75 5

Cont !

Cont ! And hence no error in interpolation !!! From the functional relation, we also find that And hence no error in interpolation !!!

Numerical Analysis Lecture 26