Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation

Size: px
Start display at page:

Download "Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation"

Transcription

1 Some notes on Chapter 8: Polynomial and Piecewise-polynomial Interpolation See your notes. 1. Lagrange Interpolation (8.2) 1

2 2. Newton Interpolation (8.3) different form of the same polynomial as Lagrange (!!! the polynomial is unique!) The set of polynomials (1) 1, x x 0, (x x 0 )(x x 1 ),..., (x x 0 )... (x x n 1 ) form a basis for the set of all polynomials of degree n: linearly indep., any polyn. of deg. n can be written as linear combination: (2) P n (x) = a 0 + a 1 (x x 0 ) + a 2 (x x 0 )(x x 1 ) + + a n (x x 0 )... (x x n 1 ) where a 0, a 1,..., a n are constants to be determined from p n (x i ) = f(x i ) at x 0 : a 0 = P n (x 0 ) = f(x 0 ) at x 1 : f(x 0 ) + a 1 (x x 0 ) = P n (x 1 ) = f(x 1 ) a 1 = f(x 1) f(x 0 ) = f(x 1) a 0 x 1 x 0 x 1 x 0 at x 2 : a 2 = f(x 2) a 0 a 1 (x 2 x 0 ) (x 2 x 0 )(x 2 x 1 ) Notice: a 2 = a 2 (x 0, x 1, x 2, a 0, a 1, f(x 2 )), adding a new point x 3 does not change the previously calculated a i Divided differences 0-th: f[x i ] = f(x i ) 1-st: f[x i, x j ] = f[x j] f[x i ] x j x i f (ξ), ξ [x i, x j ] 2-nd: f[x i, x j, x k ] = f[x j, x k ] f[x i, x j ] x k x i f (ξ), ξ [x i, x k ] k-th: f[x i,..., x i+k ] = f[x i+1,..., x i+k ] f[x i,..., x i+k 1 ] x i+k x i f (k) (ξ), ξ [x i, x i+k ] Difference analog for Tailor polynomial f(x) = f(ξ) + (x ξ)f (ξ) + 1 2! (x ξ)2 f (ξ) +... In formula for P n (x): a k = f[x 0,..., x k ] Newton s form of interpolation polynomial (N. dd.): (3) P n (x) = f[x 0 ] + n f[x 0,..., x k ](x x 0 )... (x x k 1 ) k=1 2

3 Lagrange: nodes are fixed, interpolate many diff. functions Newton: interpolate the same functions, increas # of nodes 3. Interpolation Error (8.4) r n (x) = f(x) P n (x) - error of interpolation/remainder Theorem. Let f(x) C n+1 [a, b], x k [a, b], k = 0,..., n. Then x [a, b] ξ(x) [a, b]: Alternative form. thus we have r n (x) = f (n+1) (ξ(x)) (n + 1)! ω(x), ω(x) = r n (x) = f[x 0,..., x n, x] ω(x), ω(x) = f[x 0,..., x n, x] = f (n+1) (ξ(x)) (n + 1)! n (x x k ) k=0 n (x x k ) k=0 Examples. f(x) = 1 x, nodes x 0 = 2, x 1 = 2.75, x 2 = 4 2nd Lagrange polynomial P (x) = 1 64 (x 2.75)(x 4) (x 2)(x 4) (x 2)(x 2.75) = 1 22 x x Determine the error form for this polynomial and the maximum error when the polynomial is used to approximate f(x) for x [2, 4]. Solution: Because f(x) = x 1, we have f (x) = x 2, f (x) = 2x 3, andf (x) = 6x 4. As a consequence, the second Lagrange polynomial has the error form f (ξ(x)) (x x 0 )(x x 1 )(x x 2 ) = (ξ(x)) 4 (x 2)(x 2.75)(x 4), 3! The maximum value of ξ(x) 4 (4 2) 2 = 1/16. We now need to deterthe maximum value on this interval of the absolute value of the polynomial Then critical points: ( 7, 25 ) and ( 7, Max. error: g(x) = (x 2)(x 2.75)(x 4) = x x x ) g (x) = 1 (3x 7)(2x 7) 2 f (ξ(x)) (x x 0 )(x x 1 )(x x 2 ) 1 3! =

4 4. Piecewise-polynomial interpolation: Cubic Splines? Is the interpolation project convergent? Namely, if # of nodes n, can we expect the interpolation error r n (x) = f(x) p n (x) 0? Answer: NO Why? High-degree polynomials (i.e. interpolations on large number of nodes) can oscillate erratically (they are too smooth), that is, a minor fluctuation over a small portion of the interval can induce large fluctuations over the entire range. (depends on the function and choice of nodes) What can we do? Reduce the smoothness of interpolant, i.e. consider piecewise-polynomial approximation. Namely, we divide the approximation interval into a collection of subintervals and construct a (generally) different approximating polynomial on each subinterval. I. Easiest: piecewise-linear, joining a set of data points (x i, f i ), i = 0,..., n with f i = f(x i ) by a series of straight lines (that s how Matlab creates continuous smooth graphs). : sharp endpoints, no differentiability, interpolating func. is not smooth (contradiction with physics) II. piecewise-quadratic interpolant - fitting one quadratic polynomial between each successive pair of nodes: interpolant is continious, its derivative is not 4

5 Figure 1. linear-piecewise inerpolation III. Cubic spline interpolation - piecewise cubic polynomial with two cont. derivatives. What the strange name spline is all about? Mathematical splines originated in the CAD software developed by the aircraft and automobile design industry in the late 1950s and early 1960s and were named after a special wooden or metal drafting tool used in the manual design of ship hulls: a spline. Those were used to manually interpolate the curve using the known points. 5

6 Figure 2. linear (red) and cubic (magenta) spline interpolation with 5 nodes Grid (set of nodes) on [a, b] a = x 0 < x 1 < < x n = b. Cubic spline s(x) corresponding to f(x) and x i : (1) s(x) is cubic polynomial, denoted s i (x) = a i + b i (x x i ) + c i (x x i ) 2 + d i (x x i ) 3 on each [x i 1, x i ], i = 1,..., n [4n unknowns] (2) s(x i ) = f(x i ) - condition of interpolation: s i (x i 1 ) = f(x i 1 ); s i (x i ) = f(x i ) i = 1,..., n [2n eq s] (3) s(x), s (x), s (x) are continuous on [a, b]: s i (x i ) = s i+1 (x i ), (follows from 2) s i(x i ) = s i+1(x i ), i = 1,..., n 1 [2n 2 eq s] s i (x i ) = s i+1(x i ), i = 1,..., n 1 [2n 2 eq s] Total: 4n unknowns vs. 4n 2 eq s: leaves 2 degrees of freedom for conditions on the endpoints: s (x 0 ) = s (x n ) = 0 (natural (or free) boundary) (zero curvature at end, thin rod); s (x 0 ) = f (x 0 ) and s (x n ) = f (x n ) (clamped boundary). Constructing spline: s i (x) = a i + b i (x x i ) + c i 2 (x x i ) 2 + d i (x x 6 i) 3 on [x i, x i+1 ], i = 0,..., n 1 why a i, b i, c i, d i : (4) (5) (6) thus s i(x) = b i + c i (x x i ) + d i 2 (x x i) 2 s i (x) = c i + d i (x x i ) s i (x) = d i a i = s i (x i ), b i = s i(x i ), c i = s i (x i ), d i = s i (x i ) 6

7 Interpolation conditions s(x i ) = f(x i ): a i = f(x i ) = f i, i = 0,..., n Continiuity of s(x): s i (x i ) = s i+1 (x i ), i = 1,..., n 1: a i = a i+1 + b i+1 (x i x i+1 ) + c i+1 2 (x i x i+1 ) 2 + d i+1 6 (x i x i+1 ) 3 Denoting h i = x i x i 1 h i b i h2 i 2 c i + h3 i 6 d i = f i f i 1, i = 1,..., n Continiuity of s (x): s i(x i ) = s i+1(x i ), i = 1,..., n 1: c i h i d i 2 h2 i = b i b i 1, i = 2,..., n Continiuity of s (x): s i (x i ) = s i+1(x i ), i = 1,..., n 1: d i h i = c i c i 1, i = 2,..., n Rewriting we get the three-diagonal system of linear equations: b i = h i 2 c i h2 i 6 d i f i f i 1 h i ; d i = c i c i 1 h i and ( fi+1 f i h i c i 1 + 2(h i + h i+1 )c i + h i+1 c i+1 = 6 h i+1 f i f i 1 h i i = 1,..., n 1, ), c 0 = c n = 0 [= s (x 0 ); = s (x n )= 0 for natural splines] 7

8 FINALLY: We get cubic spline: on each [x i, x i+1 ], i = 0,..., n 1 For h i = x i x i 1 s i (x) = a i + b i (x x i ) + c i 2 (x x i) 2 + d i 6 (x x i) 3 a i = f i, b i = h i 2 c i h2 i 6 d i f i f i 1 h i ; d i = c i c i 1 h i and where α 1 β β 1 α 2 β β n β n 2 α n 1 c 1 c 2. c n 1 = z 1 z 2. z n 1 ( fi+1 f i α i = 2(h i + h i+1 ); β i = h i+1, z i = 6 f ) i f i 1 h i+1 h i 8

9 Special case for uniformly distributed nodes and some adjustements for MATLAB The cubic spline s i (x) = a i + b i (x x i ) + c i 2 (x x i) 2 + d i 6 (x x i) 3 MATLAB: for k=1:n-1 x1 = x((x<=nodes(k+1))&(x>=nodes(k)))-nodes(k+1); Spline((x<=Nodes(k+1))&(x>=Nodes(k)))=a(k)+b(k)*x1+c(k)./2*x1. 2+ d(k)./6*x1. 3; end For h i = x i x i 1 (mesh step) we have a i = f i+1, b i = h ( c i h ) 2 3 d i + f i+1 f i ; d i = c i c i 1 h i h and linear system for c 1, c 2,..., c n 1 (remember, c 0 = c n = 0) 4h h c 1 h 4h h c h h 4h c n 1 = z 1 z 2. z n 1 where z i = 6 h (f i 2f i+1 + f i+2 ) 9

10 10

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

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines Cubic Splines MATH 375 J. Robert Buchanan Department of Mathematics Fall 2006 Introduction Given data {(x 0, f(x 0 )), (x 1, f(x 1 )),...,(x n, f(x n ))} which we wish to interpolate using a polynomial...

More information

3.1 Interpolation and the Lagrange Polynomial

3.1 Interpolation and the Lagrange Polynomial MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate

More information

SPLINE INTERPOLATION

SPLINE INTERPOLATION Spline Background SPLINE INTERPOLATION Problem: high degree interpolating polynomials often have extra oscillations. Example: Runge function f(x = 1 1+4x 2, x [ 1, 1]. 1 1/(1+4x 2 and P 8 (x and P 16 (x

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

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

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1

More information

Curve Fitting and Interpolation

Curve Fitting and Interpolation Chapter 5 Curve Fitting and Interpolation 5.1 Basic Concepts Consider a set of (x, y) data pairs (points) collected during an experiment, Curve fitting: is a procedure to develop or evaluate mathematical

More information

Interpolation Theory

Interpolation Theory Numerical Analysis Massoud Malek Interpolation Theory The concept of interpolation is to select a function P (x) from a given class of functions in such a way that the graph of y P (x) passes through the

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

More information

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

Lecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Polynomial Interpolation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 24, 2013 1.1 Introduction We first look at some examples. Lookup table for f(x) = 2 π x 0 e x2

More information

Empirical Models Interpolation Polynomial Models

Empirical Models Interpolation Polynomial Models Mathematical Modeling Lia Vas Empirical Models Interpolation Polynomial Models Lagrange Polynomial. Recall that two points (x 1, y 1 ) and (x 2, y 2 ) determine a unique line y = ax + b passing them (obtained

More information

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1 Data Analysis-I Interpolation Soon-Hyung Yook December 4, 2015 Soon-Hyung Yook Data Analysis-I December 4, 2015 1 / 1 Table of Contents Soon-Hyung Yook Data Analysis-I December 4, 2015 2 / 1 Introduction

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Maria Cameron Theoretical foundations. Let. be a partition of the interval [a, b].

Maria Cameron Theoretical foundations. Let. be a partition of the interval [a, b]. Maria Cameron 1 Interpolation by spline functions Spline functions yield smooth interpolation curves that are less likely to exhibit the large oscillations characteristic for high degree polynomials Splines

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

CHAPTER 4. Interpolation

CHAPTER 4. Interpolation CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given

More information

Polynomial Review Problems

Polynomial Review Problems Polynomial Review Problems 1. Find polynomial function formulas that could fit each of these graphs. Remember that you will need to determine the value of the leading coefficient. The point (0,-3) is on

More information

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

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20 Exam 2 Average: 85.6 Median: 87.0 Maximum: 100.0 Minimum: 55.0 Standard Deviation: 10.42 Fall 2011 1 Today s class Multiple Variable Linear Regression Polynomial Interpolation Lagrange Interpolation Newton

More information

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n . - Piecewise Linear-Quadratic Interpolation Piecewise-polynomial Approximation: Problem: Givenn pairs of data points x i, y i, i,,...,n, find a piecewise-polynomial Sx S x if x x x Sx S x if x x x 2 :

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

MA2501 Numerical Methods Spring 2015

MA2501 Numerical Methods Spring 2015 Norwegian University of Science and Technology Department of Mathematics MA5 Numerical Methods Spring 5 Solutions to exercise set 9 Find approximate values of the following integrals using the adaptive

More information

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

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Interpolation Escuela de Ingeniería Informática de Oviedo (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34 Outline 1 Introduction 2 Lagrange interpolation 3 Piecewise polynomial

More information

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.

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. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

Numerical interpolation, extrapolation and fi tting of data

Numerical interpolation, extrapolation and fi tting of data Chapter 6 Numerical interpolation, extrapolation and fi tting of data 6.1 Introduction Numerical interpolation and extrapolation is perhaps one of the most used tools in numerical applications to physics.

More information

Chapter 3 Interpolation and Polynomial Approximation

Chapter 3 Interpolation and Polynomial Approximation Chapter 3 Interpolation and Polynomial Approximation Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Polynomial Interpolation

More information

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

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000: MATH4414.01 ASSIGNMENT 07 SOLUTIONS 8.1 Following is census data showing the population of the US between 1900 and 2000: Years after 1900 Population in millions 0 76.0 20 105.7 40 131.7 60 179.3 80 226.5

More information

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, 1 Interpolation 11 Introduction In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points, {x i, y i = f(x i ) i = 1 n, obtained,

More information

Cubic Splines; Bézier Curves

Cubic Splines; Bézier Curves Cubic Splines; Bézier Curves 1 Cubic Splines piecewise approximation with cubic polynomials conditions on the coefficients of the splines 2 Bézier Curves computer-aided design and manufacturing MCS 471

More information

Chapter 1 Numerical approximation of data : interpolation, least squares method

Chapter 1 Numerical approximation of data : interpolation, least squares method Chapter 1 Numerical approximation of data : interpolation, least squares method I. Motivation 1 Approximation of functions Evaluation of a function Which functions (f : R R) can be effectively evaluated

More information

Applied Numerical Analysis Quiz #2

Applied Numerical Analysis Quiz #2 Applied Numerical Analysis Quiz #2 Modules 3 and 4 Name: Student number: DO NOT OPEN UNTIL ASKED Instructions: Make sure you have a machine-readable answer form. Write your name and student number in the

More information

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

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 17 Numerical Integration Formulas PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Math Numerical Analysis Mid-Term Test Solutions

Math Numerical Analysis Mid-Term Test Solutions Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)

More information

1 Review of Interpolation using Cubic Splines

1 Review of Interpolation using Cubic Splines cs412: introduction to numerical analysis 10/10/06 Lecture 12: Instructor: Professor Amos Ron Cubic Hermite Spline Interpolation Scribes: Yunpeng Li, Mark Cowlishaw 1 Review of Interpolation using Cubic

More information

Computational Physics

Computational Physics Interpolation, Extrapolation & Polynomial Approximation Lectures based on course notes by Pablo Laguna and Kostas Kokkotas revamped by Deirdre Shoemaker Spring 2014 Introduction In many cases, a function

More information

2

2 1 Notes for Numerical Analysis Math 54 by S. Adjerid Virginia Polytechnic Institute and State University (A Rough Draft) 2 Contents 1 Polynomial Interpolation 5 1.1 Review...............................

More information

There is a unique function s(x) that has the required properties. It turns out to also satisfy

There is a unique function s(x) that has the required properties. It turns out to also satisfy Numerical Analysis Grinshpan Natural Cubic Spline Let,, n be given nodes (strictly increasing) and let y,, y n be given values (arbitrary) Our goal is to produce a function s() with the following properties:

More information

Polynomial Interpolation Part II

Polynomial Interpolation Part II Polynomial Interpolation Part II Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term 2016 Exercise Session

More information

Interpolation and Polynomial Approximation I

Interpolation and Polynomial Approximation I Interpolation and Polynomial Approximation I If f (n) (x), n are available, Taylor polynomial is an approximation: f (x) = f (x 0 )+f (x 0 )(x x 0 )+ 1 2! f (x 0 )(x x 0 ) 2 + Example: e x = 1 + x 1! +

More information

Numerical techniques to solve equations

Numerical techniques to solve equations Programming for Applications in Geomatics, Physical Geography and Ecosystem Science (NGEN13) Numerical techniques to solve equations vaughan.phillips@nateko.lu.se Vaughan Phillips Associate Professor,

More information

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

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation Outline Interpolation 1 Interpolation 2 3 Michael T. Heath Scientific Computing 2 / 56 Interpolation Motivation Choosing Interpolant Existence and Uniqueness Basic interpolation problem: for given data

More information

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

Q1. Discuss, compare and contrast various curve fitting and interpolation methods Q1. Discuss, compare and contrast various curve fitting and interpolation methods McMaster University 1 Curve Fitting Problem statement: Given a set of (n + 1) point-pairs {x i,y i }, i = 0,1,... n, find

More information

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning 76 Chapter 7 Interpolation 7.1 Interpolation Definition 7.1.1. Interpolation of a given function f defined on an interval [a,b] by a polynomial p: Given a set of specified points {(t i,y i } n with {t

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Polynomial Interpolation

Polynomial Interpolation Capter 4 Polynomial Interpolation In tis capter, we consider te important problem of approximatinga function fx, wose values at a set of distinct points x, x, x,, x n are known, by a polynomial P x suc

More information

A first order divided difference

A first order divided difference A first order divided difference For a given function f (x) and two distinct points x 0 and x 1, define f [x 0, x 1 ] = f (x 1) f (x 0 ) x 1 x 0 This is called the first order divided difference of f (x).

More information

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

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Chapter 2 Interpolation

Chapter 2 Interpolation Chapter 2 Interpolation Experiments usually produce a discrete set of data points (x i, f i ) which represent the value of a function f (x) for a finite set of arguments {x 0...x n }. If additional data

More information

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

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University Lagrange Interpolation and Neville s Algorithm Ron Goldman Department of Computer Science Rice University Tension between Mathematics and Engineering 1. How do Mathematicians actually represent curves

More information

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter

Interpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter Key References: Interpolation 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter 6. 2. Press, W. et. al. Numerical Recipes in C, Cambridge: Cambridge University Press. Chapter 3

More information

Applied Math 205. Full office hour schedule:

Applied Math 205. Full office hour schedule: Applied Math 205 Full office hour schedule: Rui: Monday 3pm 4:30pm in the IACS lounge Martin: Monday 4:30pm 6pm in the IACS lounge Chris: Tuesday 1pm 3pm in Pierce Hall, Room 305 Nao: Tuesday 3pm 4:30pm

More information

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

INTERPOLATION Background Polynomial Approximation Problem:

INTERPOLATION Background Polynomial Approximation Problem: INTERPOLATION Background Polynomial Approximation Problem: given f(x) C[a, b], find P n (x) = a 0 + a 1 x + a 2 x 2 + + a n x n with P n (x) close to f(x) for x [a, b]. Motivations: f(x) might be difficult

More information

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration. Unit IV Numerical Integration and Differentiation Numerical integration and differentiation quadrature classical formulas for equally spaced nodes improper integrals Gaussian quadrature and orthogonal

More information

Curve Fitting. Objectives

Curve Fitting. Objectives Curve Fitting Objectives Understanding the difference between regression and interpolation. Knowing how to fit curve of discrete with least-squares regression. Knowing how to compute and understand the

More information

Piecewise Polynomial Interpolation

Piecewise Polynomial Interpolation Piecewise Polynomial Interpolation 1 Piecewise linear interpolation Suppose we have data point (x k,y k ), k =0, 1,...N. A piecewise linear polynomial that interpolates these points is given by p(x) =p

More information

19.4 Spline Interpolation

19.4 Spline Interpolation c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General 9.4 Spline Interpolation Given data (function values, points in the xy-plane) (x, ƒ ), (x, ƒ ),, (x n, ƒ n ) can be interpolated by a polynomial

More information

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005 4 Interpolation 4.1 Polynomial interpolation Problem: LetP n (I), n ln, I := [a,b] lr, be the linear space of polynomials of degree n on I, P n (I) := { p n : I lr p n (x) = n i=0 a i x i, a i lr, 0 i

More information

Section 6.6 Gaussian Quadrature

Section 6.6 Gaussian Quadrature Section 6.6 Gaussian Quadrature Key Terms: Method of undetermined coefficients Nonlinear systems Gaussian quadrature Error Legendre polynomials Inner product Adapted from http://pathfinder.scar.utoronto.ca/~dyer/csca57/book_p/node44.html

More information

Interpolation and extrapolation

Interpolation and extrapolation Interpolation and extrapolation Alexander Khanov PHYS6260: Experimental Methods is HEP Oklahoma State University October 30, 207 Interpolation/extrapolation vs fitting Formulation of the problem: there

More information

Math 578: Assignment 2

Math 578: Assignment 2 Math 578: Assignment 2 13. Determine whether the natural cubic spline that interpolates the table is or is not the x 0 1 2 3 y 1 1 0 10 function 1 + x x 3 x [0, 1] f(x) = 1 2(x 1) 3(x 1) 2 + 4(x 1) 3 x

More information

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2?

Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. What for x = 1.2? Applied Numerical Analysis Interpolation Lecturer: Emad Fatemizadeh Interpolation Input: A set (x i -yy i ) data. Output: Function value at arbitrary point x. 0 1 4 1-3 3 9 What for x = 1.? Interpolation

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

Numerical Methods of Approximation

Numerical Methods of Approximation Contents 31 Numerical Methods of Approximation 31.1 Polynomial Approximations 2 31.2 Numerical Integration 28 31.3 Numerical Differentiation 58 31.4 Nonlinear Equations 67 Learning outcomes In this Workbook

More information

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

Lecture 20: Lagrange Interpolation and Neville s Algorithm. for I will pass through thee, saith the LORD. Amos 5:17 Lecture 20: Lagrange Interpolation and Neville s Algorithm for I will pass through thee, saith the LORD. Amos 5:17 1. Introduction Perhaps the easiest way to describe a shape is to select some points on

More information

Curve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines

Curve Fitting. 1 Interpolation. 2 Composite Fitting. 1.1 Fitting f(x) 1.2 Hermite interpolation. 2.1 Parabolic and Cubic Splines Curve Fitting Why do we want to curve fit? In general, we fit data points to produce a smooth representation of the system whose response generated the data points We do this for a variety of reasons 1

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 7 Interpolation Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted

More information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

More information

Polynomial Interpolation

Polynomial Interpolation Capter 4 Polynomial Interpolation In tis capter, we consider te important problem of approximating a function f(x, wose values at a set of distinct points x, x, x 2,,x n are known, by a polynomial P (x

More information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

More information

Section 5.3 The Newton Form of the Interpolating Polynomial

Section 5.3 The Newton Form of the Interpolating Polynomial Section 5.3 The Newton Form of the Interpolating Polynomial Key terms Divided Difference basis Add-on feature Divided Difference Table The Lagrange form is not very efficient if we have to evaluate the

More information

2-4 Zeros of Polynomial Functions

2-4 Zeros of Polynomial Functions Write a polynomial function of least degree with real coefficients in standard form that has the given zeros. 33. 2, 4, 3, 5 Using the Linear Factorization Theorem and the zeros 2, 4, 3, and 5, write f

More information

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

More information

Additional exercises with Numerieke Analyse

Additional exercises with Numerieke Analyse Additional exercises with Numerieke Analyse March 10, 017 1. (a) Given different points x 0, x 1, x [a, b] and scalars y 0, y 1, y, z 1, show that there exists at most one polynomial p P 3 with p(x i )

More information

CS412: Introduction to Numerical Methods

CS412: Introduction to Numerical Methods CS412: Introduction to Numerical Methods MIDTERM #1 2:30PM - 3:45PM, Tuesday, 03/10/2015 Instructions: This exam is a closed book and closed notes exam, i.e., you are not allowed to consult any textbook,

More information

CHAPTER 3 Further properties of splines and B-splines

CHAPTER 3 Further properties of splines and B-splines CHAPTER 3 Further properties of splines and B-splines In Chapter 2 we established some of the most elementary properties of B-splines. In this chapter our focus is on the question What kind of functions

More information

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019,

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

Cubic Spline. s(x) = s j (x) = a j + b j (x x j ) + c j (x x j ) 2 + d j (x x j ) 3, j = 0,... n 1 (1)

Cubic Spline. s(x) = s j (x) = a j + b j (x x j ) + c j (x x j ) 2 + d j (x x j ) 3, j = 0,... n 1 (1) Cubic Spline Suppose we are given a set of interpolating points (x i, y i ) for i = 0, 1, 2, n We seek to construct a piecewise cubic function s(x) that has the for x [[x j, x j+1 ] we have: s(x) = s j

More information

Cubic Splines. Antony Jameson. Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305

Cubic Splines. Antony Jameson. Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305 Cubic Splines Antony Jameson Department of Aeronautics and Astronautics, Stanford University, Stanford, California, 94305 1 References on splines 1. J. H. Ahlberg, E. N. Nilson, J. H. Walsh. Theory of

More information

Polynomial Functions and Their Graphs

Polynomial Functions and Their Graphs Polynomial Functions and Their Graphs Definition of a Polynomial Function Let n be a nonnegative integer and let a n, a n- 1,, a 2, a 1, a 0, be real numbers with a n 0. The function defined by f (x) a

More information

Convergence rates of derivatives of a family of barycentric rational interpolants

Convergence rates of derivatives of a family of barycentric rational interpolants Convergence rates of derivatives of a family of barycentric rational interpolants J.-P. Berrut, M. S. Floater and G. Klein University of Fribourg (Switzerland) CMA / IFI, University of Oslo jean-paul.berrut@unifr.ch

More information

To find an approximate value of the integral, the idea is to replace, on each subinterval

To find an approximate value of the integral, the idea is to replace, on each subinterval Module 6 : Definition of Integral Lecture 18 : Approximating Integral : Trapezoidal Rule [Section 181] Objectives In this section you will learn the following : Mid point and the Trapezoidal methods for

More information

CHAPTER 2 POLYNOMIALS KEY POINTS

CHAPTER 2 POLYNOMIALS KEY POINTS CHAPTER POLYNOMIALS KEY POINTS 1. Polynomials of degrees 1, and 3 are called linear, quadratic and cubic polynomials respectively.. A quadratic polynomial in x with real coefficient is of the form a x

More information

University of British Columbia Math 307, Final

University of British Columbia Math 307, Final 1 University of British Columbia Math 307, Final April 23, 2012 3.30-6.00pm Name: Student Number: Signature: Instructor: Instructions: 1. No notes, books or calculators are allowed. A MATLAB/Octave formula

More information

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes Root finding: 1 a The points {x n+1, }, {x n, f n }, {x n 1, f n 1 } should be co-linear Say they lie on the line x + y = This gives the relations x n+1 + = x n +f n = x n 1 +f n 1 = Eliminating α and

More information

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University Interpolation Sanzheng Qiao Department of Computing and Software McMaster University January, 2014 Outline 1 Introduction 2 Polynomial Interpolation 3 Piecewise Polynomial Interpolation 4 Natural Cubic

More information

BSM510 Numerical Analysis

BSM510 Numerical Analysis BSM510 Numerical Analysis Polynomial Interpolation Prof. Manar Mohaisen Department of EEC Engineering Review of Precedent Lecture Polynomial Regression Multiple Linear Regression Nonlinear Regression Lecture

More information

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

MTH301 Calculus II Glossary For Final Term Exam Preparation

MTH301 Calculus II Glossary For Final Term Exam Preparation MTH301 Calculus II Glossary For Final Term Exam Preparation Glossary Absolute maximum : The output value of the highest point on a graph over a given input interval or over all possible input values. An

More information

UNIT-II INTERPOLATION & APPROXIMATION

UNIT-II INTERPOLATION & APPROXIMATION UNIT-II INTERPOLATION & APPROXIMATION LAGRANGE POLYNAMIAL 1. Find the polynomial by using Lagrange s formula and hence find for : 0 1 2 5 : 2 3 12 147 : 0 1 2 5 : 0 3 12 147 Lagrange s interpolation formula,

More information

Numerical Integration

Numerical Integration Numerical Integration Sanzheng Qiao Department of Computing and Software McMaster University February, 2014 Outline 1 Introduction 2 Rectangle Rule 3 Trapezoid Rule 4 Error Estimates 5 Simpson s Rule 6

More information

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University

Intro Polynomial Piecewise Cubic Spline Software Summary. Interpolation. Sanzheng Qiao. Department of Computing and Software McMaster University Interpolation Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Introduction 2 Polynomial Interpolation 3 Piecewise Polynomial Interpolation 4 Natural Cubic Spline

More information

Extrapolation in Numerical Integration. Romberg Integration

Extrapolation in Numerical Integration. Romberg Integration Extrapolation in Numerical Integration Romberg Integration Matthew Battaglia Joshua Berge Sara Case Yoobin Ji Jimu Ryoo Noah Wichrowski Introduction Extrapolation: the process of estimating beyond the

More information

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

9.5. Polynomial and Rational Inequalities. Objectives. Solve quadratic inequalities. Solve polynomial inequalities of degree 3 or greater.

9.5. Polynomial and Rational Inequalities. Objectives. Solve quadratic inequalities. Solve polynomial inequalities of degree 3 or greater. Chapter 9 Section 5 9.5 Polynomial and Rational Inequalities Objectives 1 3 Solve quadratic inequalities. Solve polynomial inequalities of degree 3 or greater. Solve rational inequalities. Objective 1

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

Numerical Integration (Quadrature) Another application for our interpolation tools!

Numerical Integration (Quadrature) Another application for our interpolation tools! Numerical Integration (Quadrature) Another application for our interpolation tools! Integration: Area under a curve Curve = data or function Integrating data Finite number of data points spacing specified

More information