SlideShare a Scribd company logo
Interpolation produces a
function that matches the given
data exactly. The function then
can be utilized to approximate
the data values at intermediate
points.
Interpolation may also be used
to produce a smooth graph of a
function for which values are
known only at discrete points,
either from measurements or
calculations.
Given data points
Obtain a function, P(x)
P(x) goes through the data points
Use P(x)
To estimate values at intermediate
points
Given data points:
At x0 = 2, y0 = 3 and at x1 = 5, y1 = 8
Find the following:
At x = 4, y = ?
Interpolation functions
P(x) should satisfy the following conditions:
P(x = 2) = 3 and P(x = 5) = 8

P( x ) = 3 L0 ( x ) + 8 L1 ( x )
P(x) can satisfy the above conditions if
at x = x0 = 2, L0(x) = 1 and L1(x) = 0 and
at x = x1= 5, L0(x) = 0 and L1(x) = 1
At x = x0 = 2, L0(x) = 1 and L1(x) = 0 and
at x = x1= 5, L0(x) = 0 and L1(x) = 1
The conditions can be satisfied if L0(x) and
L1(x) are defined in the following way.

x−5
L0 ( x ) =
and
2−5

x − x1
L0 ( x ) =
x0 − x1

x−2
L1 ( x ) =
5−2

x − x0
and L1 ( x ) =
x1 − x0
P( x ) = 3 L0 ( x ) + 8 L1 ( x )

P( x ) = L0 ( x ) y0 + L1 ( x ) y1
Lagrange Interpolating Polynomial

P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )
P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )
 x−5
 x−2
P( x ) = 
( 3 ) + 
( 8 )
 2−5
5−2
5x − 1
P( x ) =
3
5× 4 −1
P( 4) =
= 6.333
3
The Lagrange interpolating polynomial
passing through three given points; (x0, y0),
(x1, y1) and (x2, y2) is:

P( x ) = L0 ( x ) y0 + L1 ( x ) y1 + L2 ( x ) y2
P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )
+ L2 ( x ) f ( x2 )
( x − x1 )( x − x2 )
L0 ( x ) =
( x0 − x1 )( x0 − x2 )
At x0, L0(x) becomes 1. At all
other given data points L0(x) is 0.
( x − x0 )( x − x2 )
L1 ( x ) =
( x1 − x0 )( x1 − x2 )
At x1, L1(x) becomes 1. At all
other given data points L1(x) is 0.
( x − x0 )( x − x1 )
L2 ( x ) =
( x2 − x0 )( x2 − x1 )
At x2, L2(x) becomes 1. At all
other given data points L2(x) is 0.
General form of the Lagrange Interpolating
Polynomial

P( x ) = L0 ( x ) y0 + L1 ( x ) y1 + L2 ( x ) y2
+ ........... + Ln ( x ) yn

P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )

+ L2 ( x ) f ( x2 ) + ........... + Ln ( x ) f ( xn )
( x − x0 )( x − x1 )...( x − xk −1 )( x − xk +1 )...( x − xn )
Lk ( x ) =
( xk − x0 )( xk − x1 )...( xk − xk −1 )( x k − x k +1 )...( xk − xn )

( x − xi )
Lk ( x ) = ∏
i =0 ( x k − xi )
n

i ≠k
Numerator of

Lk ( x )

( x − x0 ) ( x − x1 ) ( x − x2 ) ×LL
× ( x − xk −1 ) ( x − xk +1 ) × LL
× ( x − xn −1 ) ( x − xn )
Denominator of

Lk ( x )

( xk − x0 ) ( xk − x1 ) ( xk − x2 ) ×LL
× ( xk − xk −1 ) ( xk − xk +1 ) × LL
× ( xk − xn −1 ) ( xk − xn )
Find the Lagrange Interpolating
Polynomial using the three given points.

( x0 , y0 ) = ( 2, 0.5)
( x1 , y1 ) = ( 2.5, 0.4)
( x2 , y2 ) = ( 4, 0.25)
( x − x1 )( x − x2 )
L0 ( x ) =
( x0 − x1 )( x0 − x2 )
( x − 2.5)( x − 4)
L0 ( x ) =
( 2 − 2.5)( 2 − 4)
= x − 6.5 x + 10
2
( x − x0 )( x − x2 )
L1 ( x ) =
( x1 − x0 )( x1 − x2 )
( x − 2)( x − 4)
L1 ( x ) =
( 2.5 − 2)( 2.5 − 4)
− x + 6x − 8
=
0.75
2
( x − x0 )( x − x1 )
L2 ( x ) =
( x2 − x0 )( x2 − x1 )
( x − 2)( x − 2.5)
L2 ( x ) =
( 4 − 2)( 4 − 2.5)
x − 4. 5 x + 5
=
3
2
P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )
+ L2 ( x ) f ( x2 )
(

)

P( x ) = x − 6.5 x + 10 ( 0.5 )
2

 − x + 6x − 8 
( 0.4 )
+


0.75


2

 x − 4 .5 x + 5 
( 0.25 )
+


3


2
P( x ) = 0.05 x − 0.425 x + 1.15
2

The three given points were taken from
the function

1
f ( x) =
x
1
f ( 3) = = 0.333
3
An approximation can be obtained
from the Lagrange Interpolating
Polynomial as:

P( 3) = 0.05( 3) − 0.425( 3) + 1.15
= 0.325
2
Newton’s Interpolating Polynomials
Newton’s equation of a function that
passes through two points

( x0 , y 0 )

and

( x1 , y1 )

is

P( x ) = a 0 + a1 ( x − x0 )
P( x ) = a 0 + a1 ( x − x0 )
Set x = x
0
P ( x0 ) = y0 = a0
Set

x = x1

P ( x1 ) = y1 = a0 + a1 ( x1 − x0 )
y1 − y 0
a1 =
x1 − x0
Newton’s equation of a function that passes
through three points

( x0 , y 0 ) ( x1 , y1 )
is

and

( x2 , y2 )
P ( x ) = a0 + a1 ( x − x0 )

+ a2 ( x − x0 ) ( x − x1 )

a 2 , set x = x 2
P ( x2 ) = a0 + a1 ( x2 − x0 )
+ a2 ( x2 − x0 ) ( x2 − x1 )
To find
y2 − y1 y1 − y0
−
x2 − x1 x1 − x0
a2 =
x2 − x0
Newton’s equation of a function that passes
through four points can be written by adding
a fourth term .

P ( x ) = a0 + a1 ( x − x0 )

+ a2 ( x − x0 ) ( x − x1 )
+ a3 ( x − x0 ) ( x − x1 ) ( x − x2 )
P ( x ) = a0 + a1 ( x − x0 )

+ a2 ( x − x0 ) ( x − x1 )

+ a3 ( x − x0 ) ( x − x1 ) ( x − x2 )
The fourth term will vanish at all three
previous points and, therefore, leaving all
three previous coefficients intact.
Divided differences and the coefficients
The divided difference of a function, f
with respect to

xi

is denoted as

f [ xi ]

It is called as zeroth divided difference and is
simply the value of the function, f
at xi

f [ xi ] = f ( xi )
The divided difference of a function, f
with respect to xi and
i +1
called as the first divided difference, is denoted

x

f [ xi , xi +1 ]
f [ xi , xi +1 ]

f [ xi +1 ] − f [ xi ]
=
xi +1 − xi
The divided difference of a function, f
with respect to xi , i +1 and
i +2
called as the second divided difference, is
denoted as

x

x

f [ xi , xi +1 , xi + 2 ]
f [ xi , xi +1 , xi +2 ]

f [ xi +1 , xi +2 ] − f [ xi , xi +1 ]
=
xi + 2 − xi
The third divided difference with respect to
,
,
xi + 2 and i + 3
i
i +1

x

x

f [ xi , xi +1 , xi +2 , xi +3 ]

x

f [ xi +1 , xi + 2 , xi +3 ] − f [ xi , xi +1 , xi + 2 ]
=
xi +3 − xi
The coefficients of Newton’s interpolating
polynomial are:
a0 = f [ x0 ]

a1 = f [ x0 , x1 ]

a 2 = f [ x0 , x1 , x 2 ]
a3 = f [ x0 , x1 , x 2 , x3 ]
a 4 = f [ x0 , x1 , x 2 , x3 , x 4 ]

and so on.
First
divided differences

Second
divided differences

Third
divided differences
Example
Find Newton’s interpolating polynomial to
approximate a function whose 5 data points are
given below.

x

f ( x)

2.0

0.85467

2.3

0.75682

2.6

0.43126

2.9

0.22364

3.2

0.08567
i
0

xi

f [ xi ]

2.0

f [ xi −1 , xi ] f [ xi − 2 , xi −1 , xi ]

f [ xi −3 , , xi ]

f [ xi −4 , , xi ]

0.85467
-0.32617

1

2.3

0.75682

-1.26505
-1.08520

2

2.6

0.43126

2.13363
0.65522

-0.69207
3

2.9

0.22364

4

3.2

0.08567

-0.29808
0.38695

-0.45990

-2.02642
The 5 coefficients of the Newton’s interpolating
polynomial are:

a0 = f [ x0 ] = 0.85467

a1 = f [ x0 , x1 ] = −0.32617

a2 = f [ x0 , x1 , x2 ] = −1.26505
a3 = f [ x0 , x1 , x2 , x3 ] = 2.13363
a4 = f [ x0 , x1 , x2 , x3 , x4 ] = −2.02642
P ( x ) = a0 + a1 ( x − x0 )

+ a2 ( x − x0 ) ( x − x1 )

+ a3 ( x − x0 ) ( x − x1 ) ( x − x2 )

+ a4 ( x − x0 ) ( x − x1 ) ( x − x2 ) ( x − x3 )
P ( x ) = 0.85467 − 0.32617 ( x − 2.0 )
-1.26505 ( x − 2.0 ) ( x − 2.3 )

+ 2.13363 ( x − 2.0 ) ( x − 2.3) ( x − 2.6 )

−2.02642 ( x − 2.0 ) ( x − 2.3) ( x − 2.6 ) ( x − 2.9 )
P(x) can now be used to estimate the value of the
function f(x) say at x = 2.8.
P ( 2.8 ) = 0.85467 − 0.32617 ( 2.8 − 2.0 )
-1.26505 ( 2.8 − 2.0 ) ( 2.8 − 2.3 )

+ 2.13363 ( 2.8 − 2.0 ) ( 2.8 − 2.3 ) ( 2.8 − 2.6 )

−2.02642 ( 2.8 − 2.0 ) ( 2.8 − 2.3) ( 2.8 − 2.6 ) ( 2.8 − 2.9 )

f ( 2.8 ) ≈ P ( 2.8 ) = 0.275

More Related Content

PPT
Numerical method
PDF
Newton's Forward/Backward Difference Interpolation
PDF
Gaussian quadratures
PDF
2. polynomial interpolation
PDF
Langrange Interpolation Polynomials
PPTX
Newton’s Divided Difference Formula
PPTX
Lagrange’s interpolation formula
PPTX
Newton’s Forward & backward interpolation
Numerical method
Newton's Forward/Backward Difference Interpolation
Gaussian quadratures
2. polynomial interpolation
Langrange Interpolation Polynomials
Newton’s Divided Difference Formula
Lagrange’s interpolation formula
Newton’s Forward & backward interpolation

What's hot (20)

PDF
Cubic Spline Interpolation
PPTX
Newton's Backward Interpolation Formula with Example
PPTX
Interpolation
PPTX
Newton Forward Difference Interpolation Method
PPTX
Runge Kutta Method
PPT
Lu decomposition
PPTX
Interpolation and its applications
PPTX
Euler and improved euler method
PPTX
Ordinary differential equation
PPT
Legendre functions
PPTX
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
PPTX
Interpolation
PPTX
Solving linear equation system
PPTX
Echelon and reduced echelon form & Filters
PDF
Simpson's rule of integration
PDF
Inner product spaces
PPTX
recurrence relations
PPS
Unit vi
PPTX
Lagrange's equation with one application
PPTX
Interpolation In Numerical Methods.
Cubic Spline Interpolation
Newton's Backward Interpolation Formula with Example
Interpolation
Newton Forward Difference Interpolation Method
Runge Kutta Method
Lu decomposition
Interpolation and its applications
Euler and improved euler method
Ordinary differential equation
Legendre functions
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
Interpolation
Solving linear equation system
Echelon and reduced echelon form & Filters
Simpson's rule of integration
Inner product spaces
recurrence relations
Unit vi
Lagrange's equation with one application
Interpolation In Numerical Methods.
Ad

Viewers also liked (20)

PPTX
Computing transformations
PPTX
Dependent v. independent variables
PPTX
Graphing inverse functions
PDF
Finite elements for 2‐d problems
ODP
Numerical Integration
PPT
Numerical integration
PDF
interpolation
PDF
Interpolation with unequal interval
PDF
Mapping the sphere
PPT
Innovation management
PDF
Scientific computing
PDF
Finite difference & interpolation
PPTX
Presentation2
PPT
08 interpolation lagrange
PDF
Applied numerical methods lec9
PPT
Cognitive Views of Learning
PDF
Hmt lab manual (heat and mass transfer lab manual)
PPS
Cognativeism vs behaviorism
PPTX
Numerical conformal mapping of an irregular area
PPTX
Theories of change and logic models
Computing transformations
Dependent v. independent variables
Graphing inverse functions
Finite elements for 2‐d problems
Numerical Integration
Numerical integration
interpolation
Interpolation with unequal interval
Mapping the sphere
Innovation management
Scientific computing
Finite difference & interpolation
Presentation2
08 interpolation lagrange
Applied numerical methods lec9
Cognitive Views of Learning
Hmt lab manual (heat and mass transfer lab manual)
Cognativeism vs behaviorism
Numerical conformal mapping of an irregular area
Theories of change and logic models
Ad

Similar to Interpolation functions (20)

PDF
Modul 3 quadratic function
PPT
Newton divided difference interpolation
PDF
แคลคูลัสสำหรับการเงินระดับมหาวิทยาลัยcalculus_finance
PPT
Quadratic
PDF
Module 2 polynomial functions
PPT
Grph quad fncts
PPT
Exponential functions (1)
PDF
138191 rvsp lecture notes
PPT
Numerical differentiation integration
PPTX
Quantitative Techniques random variables
PPT
functions limits and continuity
PPT
Functions limits and continuity
PPTX
Quadratic function
PDF
Zero Theorem and Rational Roots Presentation
DOCX
Function
PPTX
Function evaluation, termination, vertical line test etc
PDF
Computational methods for engineering...
PPTX
17 integrals of rational functions x
PDF
me310_6_interpolation.pdf for numerical method
PDF
chap 2 Ex#1.1
Modul 3 quadratic function
Newton divided difference interpolation
แคลคูลัสสำหรับการเงินระดับมหาวิทยาลัยcalculus_finance
Quadratic
Module 2 polynomial functions
Grph quad fncts
Exponential functions (1)
138191 rvsp lecture notes
Numerical differentiation integration
Quantitative Techniques random variables
functions limits and continuity
Functions limits and continuity
Quadratic function
Zero Theorem and Rational Roots Presentation
Function
Function evaluation, termination, vertical line test etc
Computational methods for engineering...
17 integrals of rational functions x
me310_6_interpolation.pdf for numerical method
chap 2 Ex#1.1

More from Tarun Gehlot (20)

PDF
Materials 11-01228
PDF
Binary relations
PDF
Continuity and end_behavior
PDF
Continuity of functions by graph (exercises with detailed solutions)
PDF
Factoring by the trial and-error method
PDF
Introduction to finite element analysis
PDF
Finite elements : basis functions
PDF
Error analysis statistics
PDF
Matlab commands
PPT
Introduction to matlab
PDF
Linear approximations and_differentials
PDF
Local linear approximation
PDF
Propeties of-triangles
PDF
Basics of set theory
PPT
Numerical integration
PPT
Applications of set theory
PDF
Miscellneous functions
PDF
Intervals of validity
PDF
Modelling with first order differential equations
PDF
Review taylor series
Materials 11-01228
Binary relations
Continuity and end_behavior
Continuity of functions by graph (exercises with detailed solutions)
Factoring by the trial and-error method
Introduction to finite element analysis
Finite elements : basis functions
Error analysis statistics
Matlab commands
Introduction to matlab
Linear approximations and_differentials
Local linear approximation
Propeties of-triangles
Basics of set theory
Numerical integration
Applications of set theory
Miscellneous functions
Intervals of validity
Modelling with first order differential equations
Review taylor series

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Lesson notes of climatology university.
PDF
Basic Mud Logging Guide for educational purpose
PPTX
master seminar digital applications in india
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Complications of Minimal Access Surgery at WLH
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Anesthesia in Laparoscopic Surgery in India
VCE English Exam - Section C Student Revision Booklet
Microbial diseases, their pathogenesis and prophylaxis
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Lesson notes of climatology university.
Basic Mud Logging Guide for educational purpose
master seminar digital applications in india
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
O7-L3 Supply Chain Operations - ICLT Program
Complications of Minimal Access Surgery at WLH
STATICS OF THE RIGID BODIES Hibbelers.pdf
Final Presentation General Medicine 03-08-2024.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Insiders guide to clinical Medicine.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
human mycosis Human fungal infections are called human mycosis..pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Anesthesia in Laparoscopic Surgery in India

Interpolation functions

  • 1. Interpolation produces a function that matches the given data exactly. The function then can be utilized to approximate the data values at intermediate points.
  • 2. Interpolation may also be used to produce a smooth graph of a function for which values are known only at discrete points, either from measurements or calculations.
  • 3. Given data points Obtain a function, P(x) P(x) goes through the data points Use P(x) To estimate values at intermediate points
  • 4. Given data points: At x0 = 2, y0 = 3 and at x1 = 5, y1 = 8 Find the following: At x = 4, y = ?
  • 6. P(x) should satisfy the following conditions: P(x = 2) = 3 and P(x = 5) = 8 P( x ) = 3 L0 ( x ) + 8 L1 ( x ) P(x) can satisfy the above conditions if at x = x0 = 2, L0(x) = 1 and L1(x) = 0 and at x = x1= 5, L0(x) = 0 and L1(x) = 1
  • 7. At x = x0 = 2, L0(x) = 1 and L1(x) = 0 and at x = x1= 5, L0(x) = 0 and L1(x) = 1 The conditions can be satisfied if L0(x) and L1(x) are defined in the following way. x−5 L0 ( x ) = and 2−5 x − x1 L0 ( x ) = x0 − x1 x−2 L1 ( x ) = 5−2 x − x0 and L1 ( x ) = x1 − x0
  • 8. P( x ) = 3 L0 ( x ) + 8 L1 ( x ) P( x ) = L0 ( x ) y0 + L1 ( x ) y1 Lagrange Interpolating Polynomial P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )
  • 9. P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 )  x−5  x−2 P( x ) =  ( 3 ) +  ( 8 )  2−5 5−2 5x − 1 P( x ) = 3 5× 4 −1 P( 4) = = 6.333 3
  • 10. The Lagrange interpolating polynomial passing through three given points; (x0, y0), (x1, y1) and (x2, y2) is: P( x ) = L0 ( x ) y0 + L1 ( x ) y1 + L2 ( x ) y2 P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x2 )
  • 11. ( x − x1 )( x − x2 ) L0 ( x ) = ( x0 − x1 )( x0 − x2 ) At x0, L0(x) becomes 1. At all other given data points L0(x) is 0.
  • 12. ( x − x0 )( x − x2 ) L1 ( x ) = ( x1 − x0 )( x1 − x2 ) At x1, L1(x) becomes 1. At all other given data points L1(x) is 0.
  • 13. ( x − x0 )( x − x1 ) L2 ( x ) = ( x2 − x0 )( x2 − x1 ) At x2, L2(x) becomes 1. At all other given data points L2(x) is 0.
  • 14. General form of the Lagrange Interpolating Polynomial P( x ) = L0 ( x ) y0 + L1 ( x ) y1 + L2 ( x ) y2 + ........... + Ln ( x ) yn P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x2 ) + ........... + Ln ( x ) f ( xn )
  • 15. ( x − x0 )( x − x1 )...( x − xk −1 )( x − xk +1 )...( x − xn ) Lk ( x ) = ( xk − x0 )( xk − x1 )...( xk − xk −1 )( x k − x k +1 )...( xk − xn ) ( x − xi ) Lk ( x ) = ∏ i =0 ( x k − xi ) n i ≠k
  • 16. Numerator of Lk ( x ) ( x − x0 ) ( x − x1 ) ( x − x2 ) ×LL × ( x − xk −1 ) ( x − xk +1 ) × LL × ( x − xn −1 ) ( x − xn )
  • 17. Denominator of Lk ( x ) ( xk − x0 ) ( xk − x1 ) ( xk − x2 ) ×LL × ( xk − xk −1 ) ( xk − xk +1 ) × LL × ( xk − xn −1 ) ( xk − xn )
  • 18. Find the Lagrange Interpolating Polynomial using the three given points. ( x0 , y0 ) = ( 2, 0.5) ( x1 , y1 ) = ( 2.5, 0.4) ( x2 , y2 ) = ( 4, 0.25)
  • 19. ( x − x1 )( x − x2 ) L0 ( x ) = ( x0 − x1 )( x0 − x2 ) ( x − 2.5)( x − 4) L0 ( x ) = ( 2 − 2.5)( 2 − 4) = x − 6.5 x + 10 2
  • 20. ( x − x0 )( x − x2 ) L1 ( x ) = ( x1 − x0 )( x1 − x2 ) ( x − 2)( x − 4) L1 ( x ) = ( 2.5 − 2)( 2.5 − 4) − x + 6x − 8 = 0.75 2
  • 21. ( x − x0 )( x − x1 ) L2 ( x ) = ( x2 − x0 )( x2 − x1 ) ( x − 2)( x − 2.5) L2 ( x ) = ( 4 − 2)( 4 − 2.5) x − 4. 5 x + 5 = 3 2
  • 22. P( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x2 )
  • 23. ( ) P( x ) = x − 6.5 x + 10 ( 0.5 ) 2  − x + 6x − 8  ( 0.4 ) +   0.75   2  x − 4 .5 x + 5  ( 0.25 ) +   3   2
  • 24. P( x ) = 0.05 x − 0.425 x + 1.15 2 The three given points were taken from the function 1 f ( x) = x
  • 25. 1 f ( 3) = = 0.333 3 An approximation can be obtained from the Lagrange Interpolating Polynomial as: P( 3) = 0.05( 3) − 0.425( 3) + 1.15 = 0.325 2
  • 26. Newton’s Interpolating Polynomials Newton’s equation of a function that passes through two points ( x0 , y 0 ) and ( x1 , y1 ) is P( x ) = a 0 + a1 ( x − x0 )
  • 27. P( x ) = a 0 + a1 ( x − x0 ) Set x = x 0 P ( x0 ) = y0 = a0 Set x = x1 P ( x1 ) = y1 = a0 + a1 ( x1 − x0 )
  • 28. y1 − y 0 a1 = x1 − x0 Newton’s equation of a function that passes through three points ( x0 , y 0 ) ( x1 , y1 ) is and ( x2 , y2 )
  • 29. P ( x ) = a0 + a1 ( x − x0 ) + a2 ( x − x0 ) ( x − x1 ) a 2 , set x = x 2 P ( x2 ) = a0 + a1 ( x2 − x0 ) + a2 ( x2 − x0 ) ( x2 − x1 ) To find
  • 30. y2 − y1 y1 − y0 − x2 − x1 x1 − x0 a2 = x2 − x0
  • 31. Newton’s equation of a function that passes through four points can be written by adding a fourth term . P ( x ) = a0 + a1 ( x − x0 ) + a2 ( x − x0 ) ( x − x1 ) + a3 ( x − x0 ) ( x − x1 ) ( x − x2 )
  • 32. P ( x ) = a0 + a1 ( x − x0 ) + a2 ( x − x0 ) ( x − x1 ) + a3 ( x − x0 ) ( x − x1 ) ( x − x2 ) The fourth term will vanish at all three previous points and, therefore, leaving all three previous coefficients intact.
  • 33. Divided differences and the coefficients The divided difference of a function, f with respect to xi is denoted as f [ xi ] It is called as zeroth divided difference and is simply the value of the function, f at xi f [ xi ] = f ( xi )
  • 34. The divided difference of a function, f with respect to xi and i +1 called as the first divided difference, is denoted x f [ xi , xi +1 ] f [ xi , xi +1 ] f [ xi +1 ] − f [ xi ] = xi +1 − xi
  • 35. The divided difference of a function, f with respect to xi , i +1 and i +2 called as the second divided difference, is denoted as x x f [ xi , xi +1 , xi + 2 ] f [ xi , xi +1 , xi +2 ] f [ xi +1 , xi +2 ] − f [ xi , xi +1 ] = xi + 2 − xi
  • 36. The third divided difference with respect to , , xi + 2 and i + 3 i i +1 x x f [ xi , xi +1 , xi +2 , xi +3 ] x f [ xi +1 , xi + 2 , xi +3 ] − f [ xi , xi +1 , xi + 2 ] = xi +3 − xi
  • 37. The coefficients of Newton’s interpolating polynomial are: a0 = f [ x0 ] a1 = f [ x0 , x1 ] a 2 = f [ x0 , x1 , x 2 ] a3 = f [ x0 , x1 , x 2 , x3 ] a 4 = f [ x0 , x1 , x 2 , x3 , x 4 ] and so on.
  • 39. Example Find Newton’s interpolating polynomial to approximate a function whose 5 data points are given below. x f ( x) 2.0 0.85467 2.3 0.75682 2.6 0.43126 2.9 0.22364 3.2 0.08567
  • 40. i 0 xi f [ xi ] 2.0 f [ xi −1 , xi ] f [ xi − 2 , xi −1 , xi ] f [ xi −3 , , xi ] f [ xi −4 , , xi ] 0.85467 -0.32617 1 2.3 0.75682 -1.26505 -1.08520 2 2.6 0.43126 2.13363 0.65522 -0.69207 3 2.9 0.22364 4 3.2 0.08567 -0.29808 0.38695 -0.45990 -2.02642
  • 41. The 5 coefficients of the Newton’s interpolating polynomial are: a0 = f [ x0 ] = 0.85467 a1 = f [ x0 , x1 ] = −0.32617 a2 = f [ x0 , x1 , x2 ] = −1.26505 a3 = f [ x0 , x1 , x2 , x3 ] = 2.13363 a4 = f [ x0 , x1 , x2 , x3 , x4 ] = −2.02642
  • 42. P ( x ) = a0 + a1 ( x − x0 ) + a2 ( x − x0 ) ( x − x1 ) + a3 ( x − x0 ) ( x − x1 ) ( x − x2 ) + a4 ( x − x0 ) ( x − x1 ) ( x − x2 ) ( x − x3 )
  • 43. P ( x ) = 0.85467 − 0.32617 ( x − 2.0 ) -1.26505 ( x − 2.0 ) ( x − 2.3 ) + 2.13363 ( x − 2.0 ) ( x − 2.3) ( x − 2.6 ) −2.02642 ( x − 2.0 ) ( x − 2.3) ( x − 2.6 ) ( x − 2.9 ) P(x) can now be used to estimate the value of the function f(x) say at x = 2.8.
  • 44. P ( 2.8 ) = 0.85467 − 0.32617 ( 2.8 − 2.0 ) -1.26505 ( 2.8 − 2.0 ) ( 2.8 − 2.3 ) + 2.13363 ( 2.8 − 2.0 ) ( 2.8 − 2.3 ) ( 2.8 − 2.6 ) −2.02642 ( 2.8 − 2.0 ) ( 2.8 − 2.3) ( 2.8 − 2.6 ) ( 2.8 − 2.9 ) f ( 2.8 ) ≈ P ( 2.8 ) = 0.275