Curve-Fitting Interpolation

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
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.
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
MATH 685/ CSI 700/ OR 682 Lecture Notes
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
EARS1160 – Numerical Methods notes by G. Houseman
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Numerical Analysis –Interpolation
CURVE FITTING ENGR 351 Numerical Methods for Engineers
Curve-Fitting Regression
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
Polynomial Interpolation
Curve Fitting and Interpolation: Lecture (II)
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 22 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
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.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
CSE Interpolation Roger Crawfis.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Differential Equations and Boundary Value Problems
NUMERICAL DIFFERENTIATION The derivative of f (x) at x 0 is: An approximation to this is: for small values of h. Forward Difference Formula.
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.
V. Space Curves Types of curves Explicit Implicit Parametric.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Part 4 Chapter 17 Polynomial Interpolation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 8 Curve Fitting.
Chapter 14 Curve Fitting : Polynomial Interpolation Gab Byung Chae.
Curve-Fitting Regression
Interpolation produces a function that matches the given data exactly. The function then can be utilized to approximate the data values at intermediate.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Principles of Extrapolation
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.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Interpolation - Introduction
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
NUMERICAL DIFFERENTIATION Forward Difference Formula
Polynomial Interpolation
Curve-Fitting Spline Interpolation
Numerical Analysis Lecture 25.
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.
Reading Between the Lines
Interpolation.
Chapter 18.
INTERPOLATION Prof. Samuel Okolie, Prof. Yinka Adekunle & Dr
Today’s class Multiple Variable Linear Regression
Chapter 27.
MATH 2140 Numerical Methods
Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik
Lesson 5.7 Predict with Linear Models The Zeros of a Function
Splines and Piecewise Interpolation
POLYNOMIAL INTERPOLATION
Splines There are cases where polynomial interpolation is bad
SKTN 2393 Numerical Methods for Nuclear Engineers
Theory of Approximation: Interpolation
Presentation transcript:

Curve-Fitting Interpolation

Curve Fitting Regression Interpolation Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression Interpolation Newton's Divided-Difference Interpolation Lagrange Interpolating Polynomials Spline Interpolation

Polynomial Interpolation Objective: Given n+1 points, we want to find the polynomial of order n that passes through all the points.

Polynomial Interpolation The nth-order polynomial that passes through n+1 points is unique, but it can be written in different mathematical formats: The Newton's Form The Lagrange Form The conventional form

Linear Interpolation (Newton's Form) Objective: Connecting two points with a straight line. f1(x) represents the first-order interpolating polynomial.

Two linear interpolations of f(x)=ln(x) on two different intervals.

Quadratic Interpolation (Newton's Form) Connecting three points with a second-order polynomial or parabola. One way to form a 2nd-order polynomial is The advantage is that b0, b1, and b2 can be calculated conveniently. Only the format is different. There is till only one unique 2nd-order polynomial that passes through three points. Can be rewritten in the conventional form. i.e., as

Quadratic Interpolation – Finding b0, b1, b2 Given three points (x0, f(x0)), (x1, f(x1)), and (x2, f(x2)), we can create three equations with three unknowns b0, b1, and b2 as which can be solved for b0, b1, and b2

Quadratic Interpolation – Finding b0, b1, b2 Alternatively, we can also calculate b0, b1, and b2 as b1: Finite-divided difference for f'(x) b2: Finite-divided difference for f"(x)

Comparing Linear and Quadratic Interpolation The quadratic interpolation formula includes an additional term which represents the 2nd-order curvature.

Fig 18.4 Linear vs. quadratic interpolation of ln(x)

General Form of Newton's Interpolating Polynomials

Graphical depiction of the recursive nature of finite divided differences.

Cubic interpolation of ln(x)

Lagrange Interpolating Polynomials Simply a reformulation of the Newton’s polynomial that avoids the computation of divided differences: e.g.: 1st and 2nd-order polynomials in Lagrange form:

Second order case of Lagrange polynomial. Each of the three terms is a 2nd-order polynomial that passes through one of the data points and is zero at the other two. The summation of three terms must, therefore, be the unique 2nd-order polynomial that passes exactly through three points.

Coefficients of an Interpolating Polynomial Newton and Lagrange polynomials are well suited for determining intermediate values between points. However, they do not provide a polynomial in the conventional form: To calculate a0, a1, …, an, we can use simultaneous linear systems of equations.

Coefficients of an Interpolating Polynomial Given n+1 points, (x0, f(x0)), (x1, f(x1)), …, (xn, f(xn)), we have n+1 equations which can be solved for n+1 unknowns: Solve this system of linear equations for a0, a1, …, an.

Coefficients of an Interpolating Polynomial Solving the system of linear equations directly is not the most efficient method. This system is typically ill-conditioned. The resulting coefficients can be highly inaccurate when n is large.

Extrapolation Extrapolation is the process of estimating a value of f(x) that lies outside the range of the known base points, x0, x1, …, xn. Extreme care should be exercised where one must extrapolate.

Spline Interpolation For some cases, polynomials can lead to erroneous results because of round off error and overshoot. Alternative approach is to apply lower-order polynomials to subsets of data points. Such connecting polynomials are called spline functions.

Linear spline (b) Quadratic spline (c) Cubic spline Derivatives are not continuous Not smooth (b) Quadratic spline Continuous 1st derivatives (c) Cubic spline Continuous 1st & 2nd derivatives Smoother

Quadratic Spline

Quadratic Interpolation Observations n+1 points n intervals Each interval is connected by a 2nd-order polynomial fi(x) = aix2+bix+ci, i=1, …, n. Each polynomial has 3 unknowns Altogether there are 3n unknowns Need 3n equations (or conditions) to solve for 3n unknowns

Quadratic Interpolation (3n conditions) The function values of adjacent polynomials must be equal at the interior knots. This condition can be represented as Since there are n-1 interior knots, this condition yields 2n-2 equations.

Quadratic Interpolation (3n conditions) The first and last functions must pass through the end points. This adds 2 more equations: The first derivatives at the interior knots must be equal. This adds n-1 more equations: We now have 2n - 2 + 2 + n - 1 = 3n - 1 equations. We need one more equation.

Quadratic Interpolation (3n conditions) Assume the 2nd derivatives is zero at the first point. This gives us the last condition as With this condition selected, the first two points are connected by a straight line. Note: This is not the only possible choice or assumption we can make.

Cubic Spline The function values must be equal at the interrior knots (2n-2 conditoins). The 1st and last functions must pass through the end points (2 conditions). The 1st derivatives at the interior knots must be equals (n-1 conditions). The 2nd derivatives at the interior knots must be equals (n-1 conditions). Assume the 2nd derivatives at the end points are zero (2 conditions). This condition makes the spline a "natural" spline.

Efficient way to derive cubic spline The cubic equation on each interval can be expressed as There are only two unknowns in each equations – the 2nd derivatives at the end of each interval:

Efficient way to derive cubic spline The unknowns can be evaluated using the following equation: If this equation is written for all the interior knots, n-1 simultaneous equations result with n-1 unknowns.

Summary Polynomial interpolation for approximate complicated functions. (Data are exact) Newton's or Lagrange Polynomial interpolation are suitable for evaluating intermediate points. Cubic spline Overcome the problem of "overshoot" Easier to derive Smooth (continuous 2nd-order derivatives)