Lagrange interpolation Gives the same results as Newton, but different method.

Slides:



Advertisements
Similar presentations
Chapter 18 Interpolation The Islamic University of Gaza
Advertisements

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.
LU method 1) factor (decompose) A into L and U 2) given b, determine d 3) using Ux=d and backsubstitution, solve for x Advantage: Once you have L and U,
Curve-Fitting Polynomial Interpolation
Revision.
Interpolation Used to estimate values between data points difference from regression - goes through data points no error in data points.
Polynomial Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Algorithm for Gauss elimination 1) first eliminate for each eq. j, j=1 to n-1 for all eq.s k greater than j a) multiply eq. j by a kj /a jj b) subtract.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 32.
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
Using Inverse Matrices Solving Systems. You can use the inverse of the coefficient matrix to find the solution. 3x + 2y = 7 4x - 5y = 11 Solve the system.
3.7 Graphs of Rational Functions
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Efficiant polynomial interpolation algorithms
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
Curve Fitting and Interpolation: Lecture (I)
Inverses and Systems Section Warm – up:
Review Taylor Series and Error Analysis Roots of Equations
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
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.
Chapter 14 Curve Fitting : Polynomial Interpolation Gab Byung Chae.
Numerical Methods For Slides Thanks to Lecture 6 Interpolation
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Solving Quadratic Equations by Factoring. Solution by factoring Example 1 Find the roots of each quadratic by factoring. factoring a) x² − 3x + 2 b) x².
The Quadratic Formula. What does the Quadratic Formula Do ? The Quadratic formula allows you to find the roots of a quadratic equation (if they exist)
The Rational Root Theorem The Rational Root Theorem gives us a tool to predict the Values of Rational Roots:
Polynomial Interpolation Lagrange Interpolation. Interpolation An Interpolating Function for a set of data: {( x 1, y 1 ),( x 2, y 2 ),( x 3, y 3 )…(
Karatsuba’s Algorithm for Integer Multiplication
By Adam Mallen.  What is it?  How is it different from regression?  When would you use it?  What can go wrong?  How do we find the interpolating.
Solving Quadratic Equations – Part 1 Methods for solving quadratic equations : 1. Taking the square root of both sides ( simple equations ) 2. Factoring.
Applied Symbolic Computation1 Applied Symbolic Computation (CS 300) Karatsuba’s Algorithm for Integer Multiplication Jeremy R. Johnson.
Calculus 3.4 Manipulate real and complex numbers and solve equations AS
Scientific Computing General Least Squares. Polynomial Least Squares Polynomial Least Squares: We assume that the class of functions is the class of all.
Function Inverse Quick review. {(2, 3), (5, 0), (-2, 4), (3, 3)} Domain & Range = ? Inverse = ? D = {2, 5, -2, 3} R = {3, 0, 4}
Theorems About Roots of Polynomial Equations. Find all zeros: f(x)= x +x –x Synthetic Division one zero…need 2 more use (x – k), where.
Solving equations with polynomials – part 2. n² -7n -30 = 0 ( )( )n n 1 · 30 2 · 15 3 · 10 5 · n + 3 = 0 n – 10 = n = -3n = 10 =
Solve by factoring. x² = - 4 – 5x 2,. Solve by factoring. n² = -30 – 11n -4 and -1.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
The Quadratic Formula The Quadratic Formula can be used to solve any quadratic equation that is in the form ax2 ax2 + bx bx + c = 0 I’ll have to write.
Section 2.6 – Other Types of Equations
Polynomial Interpolation
Chapter 18.
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Chapter 18.
Numerical Analysis Lecture 45.
Today’s class Multiple Variable Linear Regression
MATH 2140 Numerical Methods
Chemical Engineering Majors Authors: Autar Kaw
Evaluate Polynomial Functions
Numerical differentiation
Inverse & Identity MATRICES Last Updated: October 12, 2005.
Matrix Solutions to Linear Systems
Numerical Computation and Optimization
To find the inverse of a function
To find the inverse of a function
Solving Special Cases.
Integrated Math Three – Quarter 1 Benchmark Review
Interpolation with unequal intervals
Numerical Integration
Presentation transcript:

Lagrange interpolation Gives the same results as Newton, but different method

Formal definition for nth order interpolating polynomial L is defined as

Example: interpolate exp(2) using exp(1), exp(1.5) and exp(2.5)

Same as with Newton interpolation Matlab code for it

How to get the coefficients of the interpolating polynomial (not just single points)? i.e. what are the a’s in Use second order example with data points

Substitute the data points into the equation or a Vandermonde matrix

Can solve with any matrix method - but- matrix is often ill-conditioned, esp. for large n not fastest means of getting a’s (special methods for Vandermonde matrices) Getting coefficients is generally not a good idea

Inverse interpolation Given x’s, f(x)’s - interpolation lets us get new f(x) for new x. What about new x from new f(x)?

A number of methods 1) Switch x and f(x) and do new interpolation I.e. f(x)=1/x Instead of usinguse

This may not be best way ill conditioned problem Another method - fit low-order polynomial to a few points and use root finding Still beware of ill-conditioning!

Example: Given f(x)=1.4, what is x? Find interpolating polynomial (quadratic) Gauss elimination

After backsubstitution Use a root finding method for f(x)=1.4

Actually, in this case can’t use quadratic formula

Equally spaced data There are special algorithms for equally spaced data If then

So If

then Why bother? Useful later for numerical integration Just use Newton or Lagrange interpolation now

Extrapolation Basically don’t Example:

Use x=2,4,6 and estimate f(3) by interpolatio n and f(8) by extrapolation Interpolating function