Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

Similar documents
INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

A first order divided difference

Scientific Computing

ERROR IN LINEAR INTERPOLATION

NUMERICAL MATHEMATICS & COMPUTING 7th Edition

Function approximation

Polynomial Interpolation Part II

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

3.1 Interpolation and the Lagrange Polynomial

NUMERICAL MATHEMATICS & COMPUTING 7th Edition

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Introduction Linear system Nonlinear equation Interpolation

Q1. Discuss, compare and contrast various curve fitting and interpolation methods

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

NUMERICAL MATHEMATICS & COMPUTING 6th Edition

BSM510 Numerical Analysis

Numerical Methods of Approximation

Interpolation and Approximation

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

MA2501 Numerical Methods Spring 2015

Numerical Methods. King Saud University

Scientific Computing: An Introductory Survey

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

Chapter 2 Interpolation

Numerical Analysis: Interpolation Part 1

Chapter 4: Interpolation and Approximation. October 28, 2005

Numerical Marine Hydrodynamics

Interpolation and the Lagrange Polynomial

Review I: Interpolation

Interpolation Theory

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Interpolating Accuracy without underlying f (x)

NUMERICAL MATHEMATICS AND COMPUTING

Interpolation & Polynomial Approximation. Hermite Interpolation I

Neville s Method. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Neville s Method

Lecture 10 Polynomial interpolation

The Fast Fourier Transform

1 Roots of polynomials

Non-polynomial Least-squares fitting

lecture 4: Constructing Finite Difference Formulas

Numerical Methods and Computation Prof. S.R.K. Iyengar Department of Mathematics Indian Institute of Technology Delhi

Linear Algebra. Min Yan

Applied Numerical Analysis Quiz #2

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

MATHEMATICAL METHODS INTERPOLATION

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

Exam in Numerical Methods (MA2501)

1 Lecture 8: Interpolating polynomials.

Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools:

Triangular Plate Displacement Elements

SYSTEMS OF NONLINEAR EQUATIONS

University of British Columbia Math 307, Final

Law of Trichotomy and Boundary Equations

Systems of Second Order Differential Equations Cayley-Hamilton-Ziebur

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Lecture 20: Lagrange Interpolation and Neville s Algorithm. for I will pass through thee, saith the LORD. Amos 5:17

C O M P U L S O R Y R E A D I N G S 1

We consider the problem of finding a polynomial that interpolates a given set of values:

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000:

LEAST SQUARES DATA FITTING

Linear Least-Squares Data Fitting

November 20, Interpolation, Extrapolation & Polynomial Approximation

Numerical Analysis Exam with Solutions

Curve Fitting. Objectives

Quaternion Cubic Spline

Global polynomial interpolants suffer from the Runge Phenomenon if the data sites (nodes) are not chosen correctly.

MA2501 Numerical Methods Spring 2015

Language American English

7. Piecewise Polynomial (Spline) Interpolation

Preliminary Examination in Numerical Analysis

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF SCIENCE & HUMANITIES STATISTICS & NUMERICAL METHODS TWO MARKS

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

PARTIAL DIFFERENTIAL EQUATIONS

Data representation and approximation

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

lecture 5: Finite Difference Methods for Differential Equations

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017

The Normal Equations. For A R m n with m > n, A T A is singular if and only if A is rank-deficient. 1 Proof:

CS 323: Numerical Analysis and Computing

EIGENVALUES AND EIGENVECTORS

Pattern Recognition and Machine Learning. Perceptrons and Support Vector machines

Function Approximation

Curve Fitting and Interpolation

LEAST SQUARES APPROXIMATION

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes

1.1. The analytical denition. Denition. The Bernstein polynomials of degree n are dened analytically:

Lecture 11: Measuring the Complexity of Proofs

Chapter 0.B.3. [More than Just] Lines.

Rigid Geometric Transformations

Interpolation. P. Sam Johnson. January 30, P. Sam Johnson (NITK) Interpolation January 30, / 75

Fairfield Public Schools

Eigenvalues and Eigenvectors

Extreme Values and Positive/ Negative Definite Matrix Conditions

GENG2140, S2, 2012 Week 7: Curve fitting

CAM Ph.D. Qualifying Exam in Numerical Analysis CONTENTS

Transcription:

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation Ward Cheney/David Kincaid c UT Austin Engage Learning: Thomson-Brooks/Cole www.engage.com www.ma.utexas.edu/cna/nmc6 November 7, 2011 2011 1 / 24

4.1 Interpolation The viscosity of water has been experimentally determined at different temperatures, as indicated in this table: Temperature 0 5 10 15 Viscosity 1.792 1.519 1.308 1.140 How can we estimate a reasonable value for the viscosity at temperature 8? The method of polynomial interpolation can be used to create a polynomial of degree 3 that assumes the values in the table. This polynomial should provide acceptable intermediate values for temperatures not tabulated. The value of that polynomial at the point 8 turns out to be 1.386. 2011 2 / 24

Polynomial Interpolation We pose three problems concerning the representation of functions to give an indication of the subject matter related to polynomial interpolation, on splines, and on least squares. First Problem: Suppose that we have a table of numerical values of a function: x x 0 x 1 x n y y 0 y 1 y n Is it possible to find a simple and convenient formula that reproduces the given points exactly? 2011 3 / 24

Second Problem: It is assumed that the given table of numerical values is contaminated by errors, as might occur if the values came from a physical experiment. How can we find a formula that represents the data (approximately) and, if possible, filters out the errors? 2011 4 / 24

Third Problem: A function f is given, perhaps in the form of a computer procedure, but it is an expensive function to evaluate. In this case, we ask for another function g that is simpler to evaluate and produces a reasonable approximation to f. Sometimes in this problem, we want g to approximate f with full machine precision. 2011 5 / 24

In all of these problems, a simple function p can be obtained that represents or approximates the given table or function f. The representation p can always be taken to be a polynomial, although many other types of simple functions can also be used. Once a simple function p has been obtained, it can be used in place of f in many situations. For example, the integral of f could be estimated by the integral of p, and the latter should generally be easier to evaluate. 2011 6 / 24

In many situations, a polynomial solution to the problems outlined above will be unsatisfactory from a practical point of view, and other classes of functions must be considered. Later one other class of versatile functions is discussed: the spline functions. Presently, we are concerned with polynomials exclusively, and later we will discuss general linear families of functions, of which splines and polynomials are important examples. The obvious way in which a polynomial can fail as a practical solution to one of the preceding problems is that its degree may be unreasonably high. 2011 7 / 24

For instance, if the table considered contains 1,000 entries, a polynomial of degree 999 may be required to represent it. Polynomials also may have the surprising defect of being highly oscillatory. If the table is precisely represented by a polynomial p, then p(x i ) = y i for 0 i n. For points other than the given x i, however, p(x) may be a very poor representation of the function from which the table arose. Later an example involving the Runge function illustrates this phenomenon. 2011 8 / 24

Polynomial Interpolation We begin again with a table of values and assume that the x i s form a set of n + 1 distinct points. x x 0 x 1 x n y y 0 y 1 y n The table represents n + 1 points in the Cartesian plane, and we want to find a polynomial curve that passes through all points. 2011 9 / 24

Thus, we seek to determine a polynomial that is defined for all x, and takes on the corresponding values of y i for each of the n + 1 distinct x i s in this table. A polynomial p for which is said to interpolate the table. The points x i are called nodes. p(x i ) = y i (0 i n) 2011 10 / 24

Consider the first and simplest case, n = 0. Here, a constant function solves the problem. In other words, the polynomial p of degree 0 defined by the equation p(x) = y 0 reproduces the one-node table. 2011 11 / 24

The next simplest case occurs when n = 1. Since a straight line can be passed through two points, a linear function is capable of solving the problem. Explicitly, the polynomial p defined by ( x x1 ) p(x) = x 0 x 1 = y 0 + ( x x0 ) y 0 + x 1 x 0 ( y1 y ) 0 (x x 0 ) x 1 x 0 is of first degree (at most) and reproduces the table. That means (in this case) that p(x 0 ) = y 0 and p(x 1 ) = y 1, as is easily verified. This p is used for linear interpolation. y 1 2011 12 / 24

Example Find the polynomial of least degree that interpolates this table: x 1.4 1.25 y 3.7 3.9 2011 13 / 24

By the equation above, the polynomial that is sought is p(x) = ( x 1.25 1.4 1.25 = 3.7 + ) ( x 1.4 3.7 + 1.25 1.4 ( 3.9 3.7 1.25 1.4 = 3.7 4 (x 1.4) 3 ) (x 1.4) ) 3.9 2011 14 / 24

As we can see, an interpolating polynomial can be written in a variety of forms; among these are those known as the Newton form and the Lagrange form. The Newton form is probably the most convenient and efficient; however, conceptually, the Lagrange form has several advantages. 2011 15 / 24

Recursive Property of Divided Differences At the heart of the new method is the following remarkable theorem: Theorem The divided differences obey the formula f [x 0, x 1,..., x k ] = f [x 1, x 2,..., x k ] f [x 0, x 1,..., x k 1 ] x k x 0 (1) 2011 16 / 24

Notice that f [x 0, x 1,..., x k ] is not changed if the nodes x 0, x 1,..., x k are permuted: Thus, for example, f [x 0, x 1, x 2 ] = f [x 1, x 2, x 0 ] The reason is that f [x 0, x 1, x 2 ] is the coefficient of x 2 in the quadratic polynomial interpolating f at x 0, x 1, x 2, Whereas f [x 1, x 2, x 0 ] is the coefficient of x 2 in the quadratic polynomial interpolating f at x 1, x 2, x 0 These two polynomials are, of course, the same. 2011 17 / 24

Invariance Theorem A formal statement in mathematical language is as follows: Theorem The divided difference f [x 0, x 1,..., x k ] is invariant under all permutations of the arguments x 0, x 1,..., x k. 2011 18 / 24

Since the variables x 0, x 1,..., x k and k are arbitrary, the recursive Formula (1) can also be written as f [x i, x i+1,..., x j 1, x j ] = f [x i+1, x i+2,..., x j ] f [x i, x i+1,..., x j 1 ] x j x i (2) The first three divided differences are thus f [x i ] = f (x i ) f [x i, x i+1 ] = f [x i+1] f [x i ] x i+1 x i f [x i, x i+1, x i+2 ] = f [x i+1, x i+2 ] f [x i, x i+1 ] x i+2 x i 2011 19 / 24

Using Formula (3), we can construct a divided-difference table for a function f. It is customary to arrange it as follows (here n = 3): x f [ ] f [, ] f [,, ] f [,,, ] x 0 f [x 0 ] f [x 0, x 1 ] x 1 f [x 1 ] f [x 0, x 1, x 2 ] f [x 1, x 2 ] f [x 0, x 1, x 2, x 3 ] x 2 f [x 2 ] f [x 1, x 2, x 3 ] f [x 2, x 3 ] x 3 f [x 3 ] In the table, the coefficients along the top diagonal are the ones needed to form the Newton form of the interpolating polynomial. 2011 20 / 24

Example Construct a divided-difference diagram for the function f given in the following table, and write out the Newton form of the interpolating polynomial. x 1 3 2 0 2 13 5 f (x) 3 4 3 3 2011 21 / 24

The first entry is f [x 0, x 1 ] = ( 13 4 3) / ( 3 2 1) = 1 2 After completion of column 3, the first entry in column 4 is f [x 0, x 1, x 2 ] = f [x 1, x 2 ] f [x 0, x 1 ] x 2 x 0 = The complete diagram follows. 1 6 1 2 0 1 = 1 3 2011 22 / 24

x f [ ] f [, ] f [,, ] f [,,, ] 1 3 3 2 13 4 1 2 1 1 3 6 2 0 3 5 3 2 3 2 5 3 2011 23 / 24

Thus, we obtain p 3 (x) = 3 + 1 2 (x 1) + 1 3 (x 1)( x 3 2) 2(x 1) ( x 3 2) x 2011 24 / 24