MATH 2140 Numerical Methods
Interpolation using a single polynomial in numerical methods gives insights into constructing a function passing through a set of data points. Various polynomial orders are utilized to connect data points efficiently, showcasing the importance of polynomial interpolation and extrapolation in mathematical analysis.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Faculty of Engineering Mechanical Engineering Department MATH 2140 Numerical Methods Instructor: Dr. Mohamed El-Shazly Associate Prof. of Mechanical Design and Tribology melshazly@ksu.edu.sa Office: F072 1
INTERPOLATION USING A SINGLE POLYNOMIAL 2
INTERPOLATION USING A SINGLE POLYNOMIAL Interpolation is a procedure in which a mathematical formula is used to represent a given set of data points, such that the formula gives the exact value at all the data points and an estimated value between the points. This section shows how this is done by using a single polynomial, regardless of the number of points. As was mentioned in the previous section, for any number of points n there is a polynomial of order n - 1 that passes through all of the points. For two points the polynomial is of first order (a straight line connecting the points). For three points the polynomial is of second order (a parabola that connects the points), and so on. This is illustrated in Fig. 6-11 which shows how first, second, third, and fourth-order polynomials connect two, three, four, and five points, respectively. 3
Interpolation Given a sequence of n unique points, (xi, yi) Want to construct a function f(x) that passes through all the given points so that We can use f(x) to estimate the value of y for any x inside the range of the known base points 5
Extrapolation Extrapolation is the process of estimating a value of f(x) that lies outside the range of the known base points. Extreme care should be exercised where one must extrapolate. 6
Polynomial Interpolation Objective: Given n+1 points, we want to find the polynomial of order n x a a x p + = 1 0 ) ( + + + 2 n a x a x 2 n n that passes through all the points. 7
Polynomial Interpolation The nth-order polynomial that passes through n+1 points is unique, but it can be written in different mathematical formats: The conventional form The Newton Form The Lagrange Form Useful characteristics of polynomials Infinitely differentiable Can be easily integrated Easy to evaluate 8
Lagrange Interpolating Polynomials Lagrange interpolating polynomials are a particular form of polynomials that can be written to fit a given set of data points by using the values at the points. The polynomials can be written right away and do not require any preliminary calculations for determining coefficients. 9
Equation (6.40) is a linear function of x (an equation of a straight line that connects the two points). It is easy to see that if x = x1is substituted in Eq. (6.40), the value of the polynomial is y1, and if x = x2is substituted, the value of the polynomial is Yi Substituting a value of x between the points gives an interpolated value of y. Equation (6.40) can also be rewritten in the standard form f(x ) = a1x + a0: 12
Example Construct a 4thorder polynomial in Lagrange form that passes through the following points: 0 0 -5 1 1 -3 2 -1 -15 3 2 39 4 -2 -9 i xi f(xi) We can construct the polynomial as = + ( ) 5 ( ) 3 ( ) 15 ( ) 39 ( ) 9 ( ) p x L x L x L x L x L x 4 0 1 2 3 4 where Li(x) can be constructed separately as (see next page) 18
0 0 -5 1 1 -3 2 -1 -15 3 2 39 4 -2 -9 i xi f(xi) Example ( )( )( + )( )( )( )( + ) ( )( )( 4 )( ) + + + + 1 1 2 2 1 1 2 2 x x x x x x x x = = ( ) L x 0 + + 0 ( 1 x 0 1 x 0 2 x 0 ) 2 ( )( + x )( 2 ) ) 2 + ( )( )( ) + + 1 2 x 2 + x 1 2 2 x x x x x = = ( ) L x 1 1 ( 0 )( x 1 1 )( 1 )( 1 6 ( )( )( x )( ) 1 ( )( )( ) + 1 2 2 1 2 2 x x x x = = ( ) L x 2 + x ( 1 x 0 x 1 1 + )( 1 x 2 )( ) 2 x 6 + ( 0 )( )( + ) ( )( )( ) + + 1 1 2 1 1 2 x x = = ( ) L x 3 + 2 ( )( x 2 x 1 )( 2 x 1 )( 2 x ) 2 24 x ( )( )( )( 2 ) ( )( )( ) + + 1 1 2 1 1 2 x x x = = ( ) L x 4 + ( 2 0 2 1 )( 1 )( 2 ) 2 24 19