 3.3 Hermite Interpolation Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Find the osculating polynomial P(x) such that.

Slides:



Advertisements
Similar presentations
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Advertisements

Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
Computational Methods in Physics PHYS 3437
Chapter 3, Interpolation and Extrapolation. Interpolation & Extrapolation (x i,y i ) Find an analytic function f(x) that passes through given N points.
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Splines II – Interpolating Curves
Chapter 4 Roots of Equations
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
Lecture 9 Interpolation and Splines. Lingo Interpolation – filling in gaps in data Find a function f(x) that 1) goes through all your data points 2) does.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
ON MULTIVARIATE POLYNOMIAL INTERPOLATION
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 5 Numerical Integration. 2 A Review of the Definite Integral.
Empirical Modeling Dongsup Kim Department of Biosystems, KAIST Fall, 2004.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Scientific Computing Linear and Quadratic Splines.
Simpson Rule For Integration.
Great Theoretical Ideas in Computer Science.
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Curves.
difficult if we consider Didn’t you say it’s a very
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Curves. First of all… You may ask yourselves “What did those papers have to do with computer graphics?” –Valid question Answer: I thought they were cool,
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
 6.2 Pivoting Strategies 1/17 Chapter 6 Direct Methods for Solving Linear Systems -- Pivoting Strategies Example: Solve the linear system using 4-digit.
1 Finite Elements. 2 Finite elements Formally identical to spectral technique Dependent variables expanded as linear combinations of basis local, non.
CHAPTER 3 NUMERICAL METHODS
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Chapter 3 Interpolation
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Mohiuddin Ahmad SUNG-BONG JANG Interpolation II (8.4 SPLINE INTERPOLATION) (8.5 MATLAB’s INTERPOLATION Functions)
L5 – Curves in GIS NGEN06 & TEK230: Algorithms in Geographical Information Systems by: Sadegh Jamali (source: Lecture notes in GIS, Lars Harrie) 1 L5-
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
Spline Interpolation A Primer on the Basics by Don Allen.
MA2213 Lecture 2 Interpolation.
By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.
5. Interpolation 5.1 Definition of interpolation. 5.2 Formulas for Interpolation. 5.3 Formulas for Interpolation for unequal interval. 5.4 Applications.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
MA4229 Lectures 15, 16 Week 13 Nov 1, Chapter 18 Interpolation by piecewise polynomials.
One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to.
Finite Element Method. History Application Consider the two point boundary value problem.
Interpolation - Introduction
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
5 Solving Polynomial Equations.
CHAPTER 3 NUMERICAL METHODS
Curve-Fitting Spline Interpolation
Numerical Analysis Lecture 25.
Chapter 15 Curve Fitting : Splines
Today’s class Multiple Variable Linear Regression
Spline Interpolation Class XVII.
Warm-up: Find the equation of a quadratic function in standard form that has a root of 2 + 3i and passes through the point (2, -27). Answer: f(x) = -3x2.
Numerical Analysis Lecture 26.
MATH 174: Numerical Analysis I
5.3 Higher-Order Taylor Methods
SKTN 2393 Numerical Methods for Nuclear Engineers
Chapter 2 A Survey of Simple Methods and Tools
Generalized Finite Element Methods
Theory of Approximation: Interpolation
Presentation transcript:

 3.3 Hermite Interpolation Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Find the osculating polynomial P(x) such that P(x i ) = f (x i ), P’ (x i ) = f ’ (x i ), …, P (m_i) (x i ) = f (m_i) (x i ) for all i = 0, 1, …, n. 1/12 Note: Given N conditions (and hence N equations), a polynomial of degree can be determined.  Given N conditions (and hence N equations), a polynomial of degree can be determined. N  1N  1N  1N  1 The osculating polynomial that agrees with f and all its derivatives of order  m 0 at one point x 0 is just the Taylor polynomial  The osculating polynomial that agrees with f and all its derivatives of order  m 0 at one point x 0 is just the Taylor polynomial with remainder The case when m i = 1 for each i = 0, 1, …, n gives the Hermite polynomials.  The case when m i = 1 for each i = 0, 1, …, n gives the Hermite polynomials.

Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Example: Suppose x 0  x 1  x 2. Given f(x 0 ), f(x 1 ), f(x 2 ) and f ’(x 1 ), find the polynomial P(x) such that P(x i ) = f (x i ) , i = 0, 1, 2, and P’(x 1 ) = f ’(x 1 ). Analyze the errors. Solution: First of all, the degree of P(x) must be … 3. Similar to Lagrange polynomials, we may assume the form of Hermite polynomial as    2 13 )()()()()(  0 i ii xhx1x1 f ’xhxfxP  where h i (x j ) =  ij, h i ’(x 1 ) = 0, (x i ) = 0, ’(x 1 ) = 1  h1h1  h1h1 h0(x)h0(x) Has roots x 1, x 2, and h 0 ’(x 1 ) = 0  x 1 is a multiple root. )()()( xxxxCxh  h 0 (x 0 ) = 1  C 0 h2(x)h2(x) Similar to h 0 (x). h1(x)h1(x) Has roots x 0, x 2  ))( ()( 201 xxxxBAxAxxh  A and B can be solved with h 1 (x 1 ) = 1 and h 1 ’(x 1 ) = 0. (x)  h1h1 Has roots x 0, x 1, x 2   h1h1 ))( ()( 2101 xxxxxxCx   h1h1 ’(x 1 ) = 1  C 1 can be solved. Similar to Lagrange error analysis 2/12

Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation In general, given x 0, …, x n ; y 0, …, y n and y 0 ’, …, y n ’. The Hermite polynomial H 2n+1 (x) satisfies H 2n+1 (x i ) = y i and H’ 2n+1 (x i ) = y i ’ for all i.    n i )()( )(  0 i i xhxh yiyi x H 2n+1   n  0 i yi’yi’ where h i (x j ) =  ij, h i ’(x j ) = 0, (x j ) = 0, ’(x j ) =  ij  hihi  hihi hi(x)hi(x) x 0, …, x i, …, x n are all roots with multiplicity 2   )()()(x L2L2 BxAxh n, iiii  A i and B i can be solved by h i (x i ) = 1 and h i ’(x i ) = 0  (x)  hihi All the roots x 0, …, x n have multiplicity 2 except x i   hihi )()( ii L n, i 2 (x) xxCx   hihi ’(x i ) = 1  C i = 1  hihi )(x)( i L n, i 2 (x) xx  If, then Solution: Let Such a Hermite interpolating polynomial is unique 3/12

Chapter 3 Interpolation and Polynomial Approximation -- Hermite Interpolation Quiz: Given x i = i +1, i = 0, 1, 2, 3, 4, 5. Which one is h 2 (x)?  x y x y slope=1 HW: p.140 #7 4/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation  3.4 Cubic Spline Interpolation Remember what I have said? Increasing the degree of interpolating polynomial will NOT guarantee a good result, since high-degree polynomials are oscillating. Example: Consider the Lagrange polynomial P n (x) of on [  5, 5]. Take P n (x)  f (x)  Piecewise polynomial approximation 5/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation  Piecewise linear interpolation Approximate f (x) by linear polynomials on each subinterval : Let. Then as uniform No longer smooth.  Hermite piecewise polynomials Given Construct the Hermite polynomial of degree 3 with y and y’ on the two endpoints of. It is not easy to obtain the derivatives. How can we make a smooth interpolation without asking too much from f ? Headache … 6/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation  Cubic Spline Definition: Given a function f defined on [a, b] and a set of nodes a = x 0 < x 1 < … < x n = b, a cubic spline interpolant S for f is a function that satisfies the following conditions: a.S(x) is a cubic polynomial, denoted S i (x), on the subinterval [ x i, x i+1 ] for each i = 0, 1, …, n – 1; b.S(x i ) = f (x i ) for each i = 0, 1, …, n; c.S i+1 (x i+1 ) = S i (x i+1 ) for each i = 0, 1, …, n – 2; d.S’ i+1 (x i+1 ) = S’ i (x i+1 ) for each i = 0, 1, …, n – 2; e.S” i+1 (x i+1 ) = S” i (x i+1 ) for each i = 0, 1, …, n – 2; f(x)f(x) H(x)H(x) S(x)S(x) 7/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation  Method of Bending Moment Then S j ”(x) is a polynomial of degree, which can be determined by the values of f on nodes. 1 2 Assume S j ”(x j  1 ) = M j  1 , S j ”(x j ) = M j. Then for all x  [ x j – 1, x j ], S j ”(x) = j j j j j j h xx M h xx M 1 1      Integrate S j ”(x) twice, we obtain S j ’(x) and S j (x) : j j j j j j j A h xx M h xx M        2 )( 2 )( S j ’(x) = jj j j j j j j BxA h xx M h xx M       6 )( 6 )( S j (x) = Can be solved by S j (x j  1 ) = y j  1 S j (x j ) = y j Let h j = x j – x j – 1 and S(x) = S j (x) for x  [ x j – 1, x j ]. For each j it is a cubic polynomial The bending moment 8/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolationj jj j jj j h MM h yy A 6 11      j j j j j j j j j jjj h xx h M y h xx h M yBxA ) 6 () 6 (       Now solve for M j : Since S’ is continuous at x j [x j  1, x j ]: S j ’(x) = j jj jj j j j j j j h MM xxf h xx M h xx M 6 ],[ 2 )( 2 )(           ],[ 2 )( 2 )(              j jj jj j j j j j j h MM xxf h xx M h xx M [x j, x j+1 ]: S j+1 ’(x) = From S j ’(x j ) = S j+1 ’(x j ), we can combine the coefficients for M j  1, M j, and M j+1. Define,, and 1 1 jj j j hh h     1 jj  ]),[],[( jjjj jj j xxfxxf hh g      for  j  1 n1n1 That is, we have unknowns but only equations. n1n1 n+1n+1 Extra 2 boundary conditions are needed gMMM jjjjjj    9/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation  S’(a) = y 0 ’ , S’(b) = y n ’ /* Clamped boundary */ [ a, x 1 ]: S 1 ’(x) = ],[ 2 )( 2 )( h MM xxf h ax M h xx M       )],[( 6 2g y0’y0’ xxf h MM  nnn n nn gxxf yn’yn’ h MM     ]),[ ( Similar for S n ’(x) on [ x n  1, b ]  S”(a) = y 0 ” = M 0 , S”(b) = y n ” = M n Then The case when M 0 = M n = 0 is called a free boundary, and when that occurs, the spline is called a Natural Spline.  Periodic boundary: If f is a periodic function, that is, y n = y 0 and S’(a + ) = S’(b  )  M 0 = M n 10/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline InterpolationNote: Cubic Spline can be uniquely determined by its boundary conditions as long as the coefficient matrix is strictly diagonally dominant.  Cubic Spline can be uniquely determined by its boundary conditions as long as the coefficient matrix is strictly diagonally dominant. If f  C[ a, b ] and. Then  If f  C[ a, b ] and. Then as max h i  0. as max h i  0. That is, the accuracy of approximation can be improved by adding more nodes without increasing the degree of the splines. Sketch of the Algorithm: Cubic Spline ① Compute  j, j, g j ; ② Solve for M j ; ③ Find the subinterval which contains x (i.e. find the corresponding j ); ④ Approximate f(x) by S j (x). HW: p #9, 17 11/12

Chapter 3 Interpolation and Polynomial Approximation -- Cubic Spline Interpolation Lab 06. Cubic Spline Time Limit: 1 second; Points: 4 Construct the cubic spline interpolant S for the function f, defined at points x 0 < x 1 < … < x n, satisfying some given boundary conditions. Partition an given interval into m equal- length subintervals, and approximate the function values at the endpoints of these subintervals. 12/12