Numerical Computation and Optimization

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.
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #14 Interpolation.
CISE301_Topic61 SE301: Numerical Methods Topic 6 Numerical Differentiation Lecture 23 KFUPM Read Chapter 23, Sections 1-2.
Chapter 7 Numerical Differentiation and Integration
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Curve-Fitting Polynomial Interpolation
Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.
Curve Fitting and Interpolation: Lecture (II)
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 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
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
CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3.
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter.
Polynomials. 2 Content Evaluation Root finding Root Bracketing Interpolation Resultant.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
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 Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Introduction to Numerical Analysis I MATH/CMPSC 455 Interpolation.
Chapter 3 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.
1 INTERPOLASI. Direct Method of Interpolation 3 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a value.
5. Interpolation 5.1 Definition of interpolation. 5.2 Formulas for Interpolation. 5.3 Formulas for Interpolation for unequal interval. 5.4 Applications.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
CSE 330 Numerical Methods Lecture 05 Chapter 5: Numerical Differentiation Md. Omar Faruqe
Section 2.5. Objectives:  Use the Fundamental Theorem of Algebra to determine the number of zeros of a polynomial function.  Find all zeros of polynomial.
1 Numerical Differentiation. 2  First order derivatives  High order derivatives  Examples.
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
Numerical Integration
High Accuracy Differentiation Formulas
Polynomial Interpolation
Section 3.4 Zeros of Polynomial Functions
Numerical Analysis Lecture 25.
Chapter 4: Linear Differential Equations
Copyright © Cengage Learning. All rights reserved.
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 Integration Formulas
Section 3.4 Zeros of Polynomial Functions
Interpolation.
Chapter 18.
INTERPOLATION Prof. Samuel Okolie, Prof. Yinka Adekunle & Dr
Numerical Analysis Lecture 7.
Today’s class Multiple Variable Linear Regression
MATH 2140 Numerical Methods
Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik
POLYNOMIAL INTERPOLATION
Numerical Analysis Lecture 26.
MATH 174: Numerical Analysis
INTERPOLASI.
Numerical Computation and Optimization
6 Numerical Differentiation
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Computation and Optimization
Numerical Analysis Lecture 21.
(1) Find all of the zeros of f.
Numerical Computation and Optimization
Curve Fitting Filling in the gaps.
Lagrange Remainder.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Interpolation with unequal intervals
Theory of Approximation: Interpolation
Presentation transcript:

Numerical Computation and Optimization Interpolation By Assist Prof. Dr. Ahmed Jabbar

Headlines Introduction. Linear and Quadratic Interpolation. Newton’s Divided Difference Method. Lagrange Method. Inverse Interpolation. Error in Polynomial Interpolation. CISE301_Topic5

Introduction Interpolation was used for long time to provide an estimate of a tabulated function at values that are not available in the table. What is sin (0.15)? x sin(x) 0.0000 0.1 0.0998 0.2 0.1987 0.3 0.2955 0.4 0.3894 Using Linear Interpolation sin (0.15) ≈ 0.1493 True value (4 decimal digits) sin (0.15) = 0.1494

The Interpolation Problem Given a set of n+1 points, Find an nth order polynomial that passes through all points, such that:

Example Temperature (degree) Viscosity 1.792 5 1.519 10 1.308 15 1.140 An experiment is used to determine the viscosity of water as a function of temperature. The following table is generated: Problem: Estimate the viscosity when the temperature is 8 degrees.

Interpolation Problem Find a polynomial that fits the data points exactly. Linear Interpolation: V(T)= 1.73 − 0.0422 T V(8)= 1.3924

Existence and Uniqueness Given a set of n+1 points: Assumption: are distinct Theorem: There is a unique polynomial fn(x) of order ≤ n such that:

Linear and Quadratic Interpolation

Examples of Polynomial Interpolation Linear Interpolation Given any two points, there is one polynomial of order ≤ 1 that passes through the two points. Quadratic Interpolation Given any three points there is one polynomial of order ≤ 2 that passes through the three points.

Linear Interpolation Given any two points, The line that interpolates the two points is: Example : Find a polynomial that interpolates (1,2) and (2,4).

Quadratic Interpolation Given any three points: The polynomial that interpolates the three points is:

Newton’s Divided Difference Method Interpolation Newton’s Divided Difference Method

General nth Order Interpolation Given any n+1 points: The polynomial that interpolates all points is:

Divided Differences

Divided Difference Table x F[ ] F[ , ] F[ , , ] F[ , , ,] x0 F[x0] F[x0,x1] F[x0,x1,x2] F[x0,x1,x2,x3] x1 F[x1] F[x1,x2] F[x1,x2,x3] x2 F[x2] F[x2,x3] x3 F[x3]

Divided Difference Table x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15 f(xi) -5 1 -3 -1 -15 Entries of the divided difference table are obtained from the data table using simple operations.

Divided Difference Table x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15 f(xi) -5 1 -3 -1 -15 The first two column of the table are the data columns. Third column: First order differences. Fourth column: Second order differences.

Divided Difference Table -5 1 -3 -1 -15 x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15

Divided Difference Table -5 1 -3 -1 -15 x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15

Divided Difference Table -5 1 -3 -1 -15 x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15

Divided Difference Table -5 1 -3 -1 -15 x F[ ] F[ , ] F[ , , ] -5 2 -4 1 -3 6 -1 -15 f2(x)= F[x0]+F[x0,x1] (x-x0)+F[x0,x1,x2] (x-x0)(x-x1)

Two Examples x y 1 2 3 8 x y 2 3 1 8 What do you observe? Obtain the interpolating polynomials for the two examples: x y 1 2 3 8 x y 2 3 1 8 What do you observe?

Two Examples x Y 1 3 2 5 8 x Y 2 3 1 4 8 Ordering the points should not affect the interpolating polynomial.

Properties of Divided Difference Ordering the points should not affect the divided difference:

Example x f(x) 2 3 4 5 1 6 7 9 Find a polynomial to interpolate the data.

Example x f(x) f[ , ] f[ , , ] f[ , , , ] f[ , , , , ] 2 3 1 -1.6667 1.5417 -0.6750 4 5 -4 4.5 -1.8333 -1 6 7 9

Summary

Interpolation Lagrange Method

The Interpolation Problem Given a set of n+1 points: Find an nth order polynomial: that passes through all points, such that:

Lagrange Interpolation Problem: Given Find the polynomial of least order such that: Lagrange Interpolation Formula: ….

Lagrange Interpolation

Lagrange Interpolation Example 1/3 1/4 1 y 2 -1 7

Example Find a polynomial to interpolate: Both Newton’s interpolation method and Lagrange interpolation method must give the same answer. x y 1 3 2 5 4

Newton’s Interpolation Method 1 2 -3/2 7/6 -5/8 3 -1 -4/3 -2 5 4

Interpolating Polynomial

Interpolating Polynomial Using Lagrange Interpolation Method

Inverse Interpolation

Inverse Interpolation …. One approach: Use polynomial interpolation to obtain fn(x) to interpolate the data then use Newton’s method to find a solution to x

Inverse Interpolation 1. Exchange the roles of x and y. 2. Perform polynomial Interpolation on the new table. 3. Evaluate …. ….

Inverse Interpolation x y x y

Inverse Interpolation Question: What is the limitation of inverse interpolation? The original function has an inverse. y1, y2, …, yn must be distinct.

Inverse Interpolation Example 1 2 3 y 3.2 2.0 1.6 3.2 1 -.8333 1.0417 2.0 2 -2.5 1.6 3

Errors in polynomial Interpolation Polynomial interpolation may lead to large errors (especially for high order polynomials). BE CAREFUL When an nth order interpolating polynomial is used, the error is related to the (n+1)th order derivative.

Error in Polynomial Interpolation

10th Order Polynomial Interpolation

Errors in polynomial Interpolation Theorem

Example

Summary The interpolating polynomial is unique. Different methods can be used to obtain it. Newton’s divided difference Lagrange interpolation Others Polynomial interpolation can be sensitive to data. BE CAREFUL when high order polynomials are used.