SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Adv. Engg. Mathematics
MTH-812 Lagrange Interpolation
Dr. Yasir Ali (yali@ceme.nust.edu.pk)
DBS&H, CEME-NUST
November 24, 2017
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Interpolation Problem
Given 1 The (n + 1) nodes: x0, x1, ..., xn
2 The functional values f0, f1, ..., fn at these nodes
3 An Intermediate (nontabulated) point: xI
Predict fI : the value at x = xI.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Lagrange Interpolating Polynomials
The problem of determining a polynomial of degree one that passes
through the distinct points (x0, y0) and (x1, y1) is the same as
approximating a function f for which
f(x0) = y0 and f(x1) = y1
by means of a first-degree polynomial interpolating.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Lagrange Interpolating Polynomials
The problem of determining a polynomial of degree one that passes
through the distinct points (x0, y0) and (x1, y1) is the same as
approximating a function f for which
f(x0) = y0 and f(x1) = y1
by means of a first-degree polynomial interpolating.
We need a polynomial
P(x) = L0(x)f(x0) + L1(x)f(x1)
that satisfies
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Lagrange Interpolating Polynomials
The problem of determining a polynomial of degree one that passes
through the distinct points (x0, y0) and (x1, y1) is the same as
approximating a function f for which
f(x0) = y0 and f(x1) = y1
by means of a first-degree polynomial interpolating.
We need a polynomial
P(x) = L0(x)f(x0) + L1(x)f(x1)
that satisfies
(i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Lagrange Interpolating Polynomials
The problem of determining a polynomial of degree one that passes
through the distinct points (x0, y0) and (x1, y1) is the same as
approximating a function f for which
f(x0) = y0 and f(x1) = y1
by means of a first-degree polynomial interpolating.
We need a polynomial
P(x) = L0(x)f(x0) + L1(x)f(x1)
that satisfies
(i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0
(ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
How can we define such L0(x) and L1(x), using x0 and x1?
We need a polynomial
P(x) = L0(x)f(x0) + L1(x)f(x1)
that satisfies
(i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0
(ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
How can we define such L0(x) and L1(x), using x0 and x1?
We need a polynomial
P(x) = L0(x)f(x0) + L1(x)f(x1)
that satisfies
(i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0
(ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1
We can define
L0(x) =
x − x1
x0 − x1
L1(x) =
x − x0
x1 − x0
The linear Lagrange interpolating polynomial through (x0, y0) and
(x1, y1) is
P(x) = L0(x)f(x0) + L1(x)f(x1) =
x − x1
x0 − x1
f(x0) +
x − x0
x1 − x0
f(x1)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Example (Determine the linear Lagrange interpolating polynomial that
passes through the points (2, 4) and (5, 1).)
We know that Lagrange’s Polynomial is
P(x) = L0(x)f(x0) + L1(x)f(x1),
where
L0(x) =
x − x1
x0 − x1
L1(x) =
x − x0
x1 − x0
In this example x0 = 2, y0 = f(x0) = 4 and x1 = 5, y1 = f(x1) = 1
P(x) =
−(x − 5)
3
(4) +
(x − 2)
3
(1) = −x + 6
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(xi) =
0, when i = k;
1, otherwise.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(xi) =
0, when i = k;
1, otherwise.
To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of
Ln,k(x) contain the term
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
product of all factors except xk
.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(xi) =
0, when i = k;
1, otherwise.
To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of
Ln,k(x) contain the term
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
product of all factors except xk
.
To satisfy Ln,k(xk) = 1, the denominator of Ln,k(x) must be this same
term but evaluated at x = xk. Thus
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(xi) =
0, when i = k;
1, otherwise.
To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of
Ln,k(x) contain the term
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
product of all factors except xk
.
To satisfy Ln,k(xk) = 1, the denominator of Ln,k(x) must be this same
term but evaluated at x = xk. Thus
Ln,k(x) =
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
(xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
If x0, x1, ..., xn are n + 1 distinct numbers and f is a function whose values
are given at these numbers, then a unique polynomial P(x) of degree at
most n exists with
f(xk) = P(xk), for each k = 0, 1, ..., n.
This polynomial is given by
P(x) = Ln,0(x)f(x0) + Ln,1(x)f(x1) + · · · +, Ln,n(x)f(xn)
=
n
k=0
f(xk)Ln,k(x),
where, for each k = 0, 1, ..., n,
Ln,k(x) =
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
(xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn)
=
n
i=0
i=k
x − xi
xk − xi
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(x) =
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
(xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn)
=
n
i=0
i=k
x − xi
xk − xi
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Ln,k(x) =
(x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn)
(xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn)
=
n
i=0
i=k
x − xi
xk − xi
It can easily be seen that
Ln,k(xi) =
0, when i = k;
1, otherwise.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − x1)(x − x2)(x − x3)
(x0 − x1)(x0 − x2)(x0 − x3)
=
(x − 1)(x − 2)(x − 4)
(0 − 1)(0 − 2)(0 − 4)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − x1)(x − x2)(x − x3)
(x0 − x1)(x0 − x2)(x0 − x3)
=
(x − 1)(x − 2)(x − 4)
(0 − 1)(0 − 2)(0 − 4)
L3,1(x) =
(x − x0)(x − x2)(x − x3)
(x1 − x0)(x1 − x2)(x1 − x3)
=
(x)(x − 2)(x − 4)
(1)(1 − 2)(1 − 4)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Explicitly construct the Lagrange Interpolating Polynomial
and interpolate f(3).
.
i xi yi = f(xi) = fi
0 0 7
1 1 13
2 2 21
3 4 43
Nodes: x0 = 0, x1 = 1, x2 = 2,
x3 = 4, n = 3
Functional values: f0 = 7, f1 = 13,
f2 = 21, f3 = 43.
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − x1)(x − x2)(x − x3)
(x0 − x1)(x0 − x2)(x0 − x3)
=
(x − 1)(x − 2)(x − 4)
(0 − 1)(0 − 2)(0 − 4)
L3,1(x) =
(x − x0)(x − x2)(x − x3)
(x1 − x0)(x1 − x2)(x1 − x3)
=
(x)(x − 2)(x − 4)
(1)(1 − 2)(1 − 4)
L3,2(x) =
(x − x0)(x − x1)(x − x3)
(x2 − x0)(x2 − x2)(x2 − x3)
=
(x)(x − 1)(x − 4)
(2)(2 − 1)(2 − 4)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
To find the polynomial we will use the following formula
P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3)
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − x1)(x − x2)(x − x3)
(x0 − x1)(x0 − x2)(x0 − x3)
=
(x − 1)(x − 2)(x − 4)
(0 − 1)(0 − 2)(0 − 4)
L3,1(x) =
(x − x0)(x − x2)(x − x3)
(x1 − x0)(x1 − x2)(x1 − x3)
=
(x)(x − 2)(x − 4)
(1)(1 − 2)(1 − 4)
L3,2(x) =
(x − x0)(x − x1)(x − x3)
(x2 − x0)(x2 − x2)(x2 − x3)
=
(x)(x − 1)(x − 4)
(2)(2 − 1)(2 − 4)
L3,3(x) =
(x − x0)(x − x1)(x − x2)
(x3 − x0)(x3 − x1)(x3 − x2)
=
(x)(x − 1)(x − 2)
(4)(4 − 1)(4 − 2)
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
To find the polynomial we will use the following formula
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − 1)(x − 2)(x − 4)
−8
L3,1(x) =
(x)(x − 2)(x − 4)
3
L3,2(x) =
(x)(x − 1)(x − 4)
−4
L3,3(x) =
(x)(x − 1)(x − 2)
24
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
To find the polynomial we will use the following formula
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − 1)(x − 2)(x − 4)
−8
L3,1(x) =
(x)(x − 2)(x − 4)
3
L3,2(x) =
(x)(x − 1)(x − 4)
−4
L3,3(x) =
(x)(x − 1)(x − 2)
24
For P3(x) at x = 3
L3,0(3) ==
(3 − 1)(3 − 2)(−4)
−8
=
1
4
, L3,1(3) =
(3)(3 − 2)(3 − 4)
3
= −1
L3,2(3) =
(3)(3 − 1)(3 − 4)
−4
=
3
2
, L3,3(3) =
(3)(3 − 1)(3 − 2)
24
=
1
4
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
To find the polynomial we will use the following formula
P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x)
L3,0(x) =
(x − 1)(x − 2)(x − 4)
−8
L3,1(x) =
(x)(x − 2)(x − 4)
3
L3,2(x) =
(x)(x − 1)(x − 4)
−4
L3,3(x) =
(x)(x − 1)(x − 2)
24
For P3(x) at x = 3
L3,0(3) ==
(3 − 1)(3 − 2)(−4)
−8
=
1
4
, L3,1(3) =
(3)(3 − 2)(3 − 4)
3
= −1
L3,2(3) =
(3)(3 − 1)(3 − 4)
−4
=
3
2
, L3,3(3) =
(3)(3 − 1)(3 − 2)
24
=
1
4
Thus P3(3) = 7(1
4) + 13(−1) + 21(3
2) + 43(1
4) = 31.
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
Error in Lagrange Interpolating Polynomial
Error Estimate in Lagrange Interpolating Polynomial is
fn+1(t)
(n + 1)!
(x − x0)(x − x1) · · · (x − xn) t ∈ (x0, xn).
Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics

Contenu connexe

Tendances

lagrange interpolation
lagrange interpolationlagrange interpolation
lagrange interpolationayush raj
 
Numerical integration
Numerical integrationNumerical integration
Numerical integrationMohammed_AQ
 
Application of-differential-equation-in-real-life
Application of-differential-equation-in-real-lifeApplication of-differential-equation-in-real-life
Application of-differential-equation-in-real-lifeRazwanul Ghani
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)anil7nayak
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations University of Windsor
 
Ideals and factor rings
Ideals and factor ringsIdeals and factor rings
Ideals and factor ringsdianageorge27
 
4 stochastic processes
4 stochastic processes4 stochastic processes
4 stochastic processesSolo Hermelin
 
Fourier series and its applications by md nazmul islam
Fourier series and its applications by md nazmul islamFourier series and its applications by md nazmul islam
Fourier series and its applications by md nazmul islamMd Nazmul Islam
 
Applications of analytic functions and vector calculus
Applications of analytic functions and vector calculusApplications of analytic functions and vector calculus
Applications of analytic functions and vector calculusPoojith Chowdhary
 
Fractional Calculus PP
Fractional Calculus PPFractional Calculus PP
Fractional Calculus PPVRRITC
 
Application of Differential Equation
Application of Differential EquationApplication of Differential Equation
Application of Differential EquationSalim Hosen
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its applicationMahmudul Alam
 
Differential Equations
Differential EquationsDifferential Equations
Differential EquationsKrupaSuthar3
 

Tendances (20)

lagrange interpolation
lagrange interpolationlagrange interpolation
lagrange interpolation
 
Calculus of variations
Calculus of variationsCalculus of variations
Calculus of variations
 
Vector Calculus.
Vector Calculus.Vector Calculus.
Vector Calculus.
 
Lagrange’s interpolation formula
Lagrange’s interpolation formulaLagrange’s interpolation formula
Lagrange’s interpolation formula
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Analytic function
Analytic functionAnalytic function
Analytic function
 
Application of-differential-equation-in-real-life
Application of-differential-equation-in-real-lifeApplication of-differential-equation-in-real-life
Application of-differential-equation-in-real-life
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations
 
Interpolation
InterpolationInterpolation
Interpolation
 
Ideals and factor rings
Ideals and factor ringsIdeals and factor rings
Ideals and factor rings
 
4 stochastic processes
4 stochastic processes4 stochastic processes
4 stochastic processes
 
Fourier series and its applications by md nazmul islam
Fourier series and its applications by md nazmul islamFourier series and its applications by md nazmul islam
Fourier series and its applications by md nazmul islam
 
Applications of analytic functions and vector calculus
Applications of analytic functions and vector calculusApplications of analytic functions and vector calculus
Applications of analytic functions and vector calculus
 
Fractional Calculus PP
Fractional Calculus PPFractional Calculus PP
Fractional Calculus PP
 
Application of Differential Equation
Application of Differential EquationApplication of Differential Equation
Application of Differential Equation
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its application
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Linear differential equation of second order
Linear differential equation of second orderLinear differential equation of second order
Linear differential equation of second order
 
Differential Equations
Differential EquationsDifferential Equations
Differential Equations
 

Similaire à Langrange Interpolation Polynomials

Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference FormulationSohaib H. Khan
 
Finance Enginering from Columbia.pdf
Finance Enginering from Columbia.pdfFinance Enginering from Columbia.pdf
Finance Enginering from Columbia.pdfCarlosLazo45
 
Limits and Continuity of Functions
Limits and Continuity of Functions Limits and Continuity of Functions
Limits and Continuity of Functions OlooPundit
 
2nd-year-Math-full-Book-PB.pdf
2nd-year-Math-full-Book-PB.pdf2nd-year-Math-full-Book-PB.pdf
2nd-year-Math-full-Book-PB.pdfproacademyhub
 
Test Problems in Optimization
Test Problems in OptimizationTest Problems in Optimization
Test Problems in OptimizationXin-She Yang
 
Newton divided difference interpolation
Newton divided difference interpolationNewton divided difference interpolation
Newton divided difference interpolationVISHAL DONGA
 
Expectation of Discrete Random Variable.ppt
Expectation of Discrete Random Variable.pptExpectation of Discrete Random Variable.ppt
Expectation of Discrete Random Variable.pptAlyasarJabbarli
 
Actuarial Science Reference Sheet
Actuarial Science Reference SheetActuarial Science Reference Sheet
Actuarial Science Reference SheetDaniel Nolan
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolationHarshad Koshti
 
8517ijaia06
8517ijaia068517ijaia06
8517ijaia06ijaia
 
1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdfFaisalMehmood887349
 
Exponential functions
Exponential functionsExponential functions
Exponential functionskvillave
 
Numarical values
Numarical valuesNumarical values
Numarical valuesAmanSaeed11
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlightedAmanSaeed11
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functionsdionesioable
 
Module II Partition and Generating Function (2).ppt
Module II Partition and Generating Function (2).pptModule II Partition and Generating Function (2).ppt
Module II Partition and Generating Function (2).pptssuser26e219
 

Similaire à Langrange Interpolation Polynomials (20)

Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference Formulation
 
Finance Enginering from Columbia.pdf
Finance Enginering from Columbia.pdfFinance Enginering from Columbia.pdf
Finance Enginering from Columbia.pdf
 
Limits and Continuity of Functions
Limits and Continuity of Functions Limits and Continuity of Functions
Limits and Continuity of Functions
 
Exponential functions (1)
Exponential functions (1)Exponential functions (1)
Exponential functions (1)
 
2nd-year-Math-full-Book-PB.pdf
2nd-year-Math-full-Book-PB.pdf2nd-year-Math-full-Book-PB.pdf
2nd-year-Math-full-Book-PB.pdf
 
2018-G12-Math-E.pdf
2018-G12-Math-E.pdf2018-G12-Math-E.pdf
2018-G12-Math-E.pdf
 
Maths 12
Maths 12Maths 12
Maths 12
 
Lecture notes
Lecture notes Lecture notes
Lecture notes
 
Test Problems in Optimization
Test Problems in OptimizationTest Problems in Optimization
Test Problems in Optimization
 
Newton divided difference interpolation
Newton divided difference interpolationNewton divided difference interpolation
Newton divided difference interpolation
 
Expectation of Discrete Random Variable.ppt
Expectation of Discrete Random Variable.pptExpectation of Discrete Random Variable.ppt
Expectation of Discrete Random Variable.ppt
 
Actuarial Science Reference Sheet
Actuarial Science Reference SheetActuarial Science Reference Sheet
Actuarial Science Reference Sheet
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolation
 
8517ijaia06
8517ijaia068517ijaia06
8517ijaia06
 
1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf
 
Exponential functions
Exponential functionsExponential functions
Exponential functions
 
Numarical values
Numarical valuesNumarical values
Numarical values
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlighted
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functions
 
Module II Partition and Generating Function (2).ppt
Module II Partition and Generating Function (2).pptModule II Partition and Generating Function (2).ppt
Module II Partition and Generating Function (2).ppt
 

Plus de Sohaib H. Khan

Orthogonal Vector Spaces
Orthogonal Vector Spaces Orthogonal Vector Spaces
Orthogonal Vector Spaces Sohaib H. Khan
 
Linear Transformation Vector Matrices and Spaces
Linear Transformation Vector Matrices and SpacesLinear Transformation Vector Matrices and Spaces
Linear Transformation Vector Matrices and SpacesSohaib H. Khan
 
Interpolation of Cubic Splines
Interpolation of Cubic SplinesInterpolation of Cubic Splines
Interpolation of Cubic SplinesSohaib H. Khan
 
Production Planning, Scheduling and Control
Production Planning, Scheduling and ControlProduction Planning, Scheduling and Control
Production Planning, Scheduling and ControlSohaib H. Khan
 
Cfd ch08 continuity equations
Cfd ch08  continuity equationsCfd ch08  continuity equations
Cfd ch08 continuity equationsSohaib H. Khan
 
Cfd ch07 hyperbolic_implicit
Cfd ch07 hyperbolic_implicitCfd ch07 hyperbolic_implicit
Cfd ch07 hyperbolic_implicitSohaib H. Khan
 
Cfd ch06 hyperbolic-explicit_2d
Cfd ch06 hyperbolic-explicit_2dCfd ch06 hyperbolic-explicit_2d
Cfd ch06 hyperbolic-explicit_2dSohaib H. Khan
 
Cfd ch05 hyperbolic-explicit_1d
Cfd ch05 hyperbolic-explicit_1dCfd ch05 hyperbolic-explicit_1d
Cfd ch05 hyperbolic-explicit_1dSohaib H. Khan
 
Cfd ch03 c_linear-algebra
Cfd ch03 c_linear-algebraCfd ch03 c_linear-algebra
Cfd ch03 c_linear-algebraSohaib H. Khan
 
Cfd ch02 b_parabolic-implicit
Cfd ch02 b_parabolic-implicitCfd ch02 b_parabolic-implicit
Cfd ch02 b_parabolic-implicitSohaib H. Khan
 
Cfd ch01 a_parabolic_explicit
Cfd ch01 a_parabolic_explicitCfd ch01 a_parabolic_explicit
Cfd ch01 a_parabolic_explicitSohaib H. Khan
 

Plus de Sohaib H. Khan (12)

Orthogonal Vector Spaces
Orthogonal Vector Spaces Orthogonal Vector Spaces
Orthogonal Vector Spaces
 
Linear Transformation Vector Matrices and Spaces
Linear Transformation Vector Matrices and SpacesLinear Transformation Vector Matrices and Spaces
Linear Transformation Vector Matrices and Spaces
 
Interpolation of Cubic Splines
Interpolation of Cubic SplinesInterpolation of Cubic Splines
Interpolation of Cubic Splines
 
Production Planning, Scheduling and Control
Production Planning, Scheduling and ControlProduction Planning, Scheduling and Control
Production Planning, Scheduling and Control
 
Cfd ch08 continuity equations
Cfd ch08  continuity equationsCfd ch08  continuity equations
Cfd ch08 continuity equations
 
Cfd ch07 hyperbolic_implicit
Cfd ch07 hyperbolic_implicitCfd ch07 hyperbolic_implicit
Cfd ch07 hyperbolic_implicit
 
Cfd ch06 hyperbolic-explicit_2d
Cfd ch06 hyperbolic-explicit_2dCfd ch06 hyperbolic-explicit_2d
Cfd ch06 hyperbolic-explicit_2d
 
Cfd ch05 hyperbolic-explicit_1d
Cfd ch05 hyperbolic-explicit_1dCfd ch05 hyperbolic-explicit_1d
Cfd ch05 hyperbolic-explicit_1d
 
Cfd ch04 d_elliptic
Cfd ch04 d_ellipticCfd ch04 d_elliptic
Cfd ch04 d_elliptic
 
Cfd ch03 c_linear-algebra
Cfd ch03 c_linear-algebraCfd ch03 c_linear-algebra
Cfd ch03 c_linear-algebra
 
Cfd ch02 b_parabolic-implicit
Cfd ch02 b_parabolic-implicitCfd ch02 b_parabolic-implicit
Cfd ch02 b_parabolic-implicit
 
Cfd ch01 a_parabolic_explicit
Cfd ch01 a_parabolic_explicitCfd ch01 a_parabolic_explicit
Cfd ch01 a_parabolic_explicit
 

Dernier

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 

Dernier (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 

Langrange Interpolation Polynomials

  • 1. Adv. Engg. Mathematics MTH-812 Lagrange Interpolation Dr. Yasir Ali (yali@ceme.nust.edu.pk) DBS&H, CEME-NUST November 24, 2017 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 2. Interpolation Problem Given 1 The (n + 1) nodes: x0, x1, ..., xn 2 The functional values f0, f1, ..., fn at these nodes 3 An Intermediate (nontabulated) point: xI Predict fI : the value at x = xI. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 3. Lagrange Interpolating Polynomials The problem of determining a polynomial of degree one that passes through the distinct points (x0, y0) and (x1, y1) is the same as approximating a function f for which f(x0) = y0 and f(x1) = y1 by means of a first-degree polynomial interpolating. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 4. Lagrange Interpolating Polynomials The problem of determining a polynomial of degree one that passes through the distinct points (x0, y0) and (x1, y1) is the same as approximating a function f for which f(x0) = y0 and f(x1) = y1 by means of a first-degree polynomial interpolating. We need a polynomial P(x) = L0(x)f(x0) + L1(x)f(x1) that satisfies Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 5. Lagrange Interpolating Polynomials The problem of determining a polynomial of degree one that passes through the distinct points (x0, y0) and (x1, y1) is the same as approximating a function f for which f(x0) = y0 and f(x1) = y1 by means of a first-degree polynomial interpolating. We need a polynomial P(x) = L0(x)f(x0) + L1(x)f(x1) that satisfies (i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 6. Lagrange Interpolating Polynomials The problem of determining a polynomial of degree one that passes through the distinct points (x0, y0) and (x1, y1) is the same as approximating a function f for which f(x0) = y0 and f(x1) = y1 by means of a first-degree polynomial interpolating. We need a polynomial P(x) = L0(x)f(x0) + L1(x)f(x1) that satisfies (i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0 (ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 7. How can we define such L0(x) and L1(x), using x0 and x1? We need a polynomial P(x) = L0(x)f(x0) + L1(x)f(x1) that satisfies (i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0 (ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 8. How can we define such L0(x) and L1(x), using x0 and x1? We need a polynomial P(x) = L0(x)f(x0) + L1(x)f(x1) that satisfies (i) P(x0) = f(x0), that is, L0(x0) = 1 and L1(x0) = 0 at x0 (ii) P(x1) = f(x1), that is, L0(x1) = 0 and L1(x1) = 1 at x1 We can define L0(x) = x − x1 x0 − x1 L1(x) = x − x0 x1 − x0 The linear Lagrange interpolating polynomial through (x0, y0) and (x1, y1) is P(x) = L0(x)f(x0) + L1(x)f(x1) = x − x1 x0 − x1 f(x0) + x − x0 x1 − x0 f(x1) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 9. Example (Determine the linear Lagrange interpolating polynomial that passes through the points (2, 4) and (5, 1).) We know that Lagrange’s Polynomial is P(x) = L0(x)f(x0) + L1(x)f(x1), where L0(x) = x − x1 x0 − x1 L1(x) = x − x0 x1 − x0 In this example x0 = 2, y0 = f(x0) = 4 and x1 = 5, y1 = f(x1) = 1 P(x) = −(x − 5) 3 (4) + (x − 2) 3 (1) = −x + 6 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 10. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 11. Ln,k(xi) = 0, when i = k; 1, otherwise. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 12. Ln,k(xi) = 0, when i = k; 1, otherwise. To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of Ln,k(x) contain the term (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) product of all factors except xk . Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 13. Ln,k(xi) = 0, when i = k; 1, otherwise. To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of Ln,k(x) contain the term (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) product of all factors except xk . To satisfy Ln,k(xk) = 1, the denominator of Ln,k(x) must be this same term but evaluated at x = xk. Thus Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 14. Ln,k(xi) = 0, when i = k; 1, otherwise. To satisfy Ln,k(xi) = 0 for each i = k requires that the numerator of Ln,k(x) contain the term (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) product of all factors except xk . To satisfy Ln,k(xk) = 1, the denominator of Ln,k(x) must be this same term but evaluated at x = xk. Thus Ln,k(x) = (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) (xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 15. If x0, x1, ..., xn are n + 1 distinct numbers and f is a function whose values are given at these numbers, then a unique polynomial P(x) of degree at most n exists with f(xk) = P(xk), for each k = 0, 1, ..., n. This polynomial is given by P(x) = Ln,0(x)f(x0) + Ln,1(x)f(x1) + · · · +, Ln,n(x)f(xn) = n k=0 f(xk)Ln,k(x), where, for each k = 0, 1, ..., n, Ln,k(x) = (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) (xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn) = n i=0 i=k x − xi xk − xi Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 16. Ln,k(x) = (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) (xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn) = n i=0 i=k x − xi xk − xi Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 17. Ln,k(x) = (x − x0)(x − x1) · · · (x − xk−1)(x − xk+1) · · · (x − xn) (xk − x0)(xk − x1) · · · (xk − xk−1)(xk − xk+1) · · · (xk − xn) = n i=0 i=k x − xi xk − xi It can easily be seen that Ln,k(xi) = 0, when i = k; 1, otherwise. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 18. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 19. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 20. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 21. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 22. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − x1)(x − x2)(x − x3) (x0 − x1)(x0 − x2)(x0 − x3) = (x − 1)(x − 2)(x − 4) (0 − 1)(0 − 2)(0 − 4) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 23. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − x1)(x − x2)(x − x3) (x0 − x1)(x0 − x2)(x0 − x3) = (x − 1)(x − 2)(x − 4) (0 − 1)(0 − 2)(0 − 4) L3,1(x) = (x − x0)(x − x2)(x − x3) (x1 − x0)(x1 − x2)(x1 − x3) = (x)(x − 2)(x − 4) (1)(1 − 2)(1 − 4) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 24. Explicitly construct the Lagrange Interpolating Polynomial and interpolate f(3). . i xi yi = f(xi) = fi 0 0 7 1 1 13 2 2 21 3 4 43 Nodes: x0 = 0, x1 = 1, x2 = 2, x3 = 4, n = 3 Functional values: f0 = 7, f1 = 13, f2 = 21, f3 = 43. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − x1)(x − x2)(x − x3) (x0 − x1)(x0 − x2)(x0 − x3) = (x − 1)(x − 2)(x − 4) (0 − 1)(0 − 2)(0 − 4) L3,1(x) = (x − x0)(x − x2)(x − x3) (x1 − x0)(x1 − x2)(x1 − x3) = (x)(x − 2)(x − 4) (1)(1 − 2)(1 − 4) L3,2(x) = (x − x0)(x − x1)(x − x3) (x2 − x0)(x2 − x2)(x2 − x3) = (x)(x − 1)(x − 4) (2)(2 − 1)(2 − 4) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 25. To find the polynomial we will use the following formula P3(x) = L3,0(x)f(x0) + L3,1(x)f(x1) + L3,2(x)f(x2) + L3,3(x)f(x3) P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − x1)(x − x2)(x − x3) (x0 − x1)(x0 − x2)(x0 − x3) = (x − 1)(x − 2)(x − 4) (0 − 1)(0 − 2)(0 − 4) L3,1(x) = (x − x0)(x − x2)(x − x3) (x1 − x0)(x1 − x2)(x1 − x3) = (x)(x − 2)(x − 4) (1)(1 − 2)(1 − 4) L3,2(x) = (x − x0)(x − x1)(x − x3) (x2 − x0)(x2 − x2)(x2 − x3) = (x)(x − 1)(x − 4) (2)(2 − 1)(2 − 4) L3,3(x) = (x − x0)(x − x1)(x − x2) (x3 − x0)(x3 − x1)(x3 − x2) = (x)(x − 1)(x − 2) (4)(4 − 1)(4 − 2) Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 26. To find the polynomial we will use the following formula P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − 1)(x − 2)(x − 4) −8 L3,1(x) = (x)(x − 2)(x − 4) 3 L3,2(x) = (x)(x − 1)(x − 4) −4 L3,3(x) = (x)(x − 1)(x − 2) 24 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 27. To find the polynomial we will use the following formula P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − 1)(x − 2)(x − 4) −8 L3,1(x) = (x)(x − 2)(x − 4) 3 L3,2(x) = (x)(x − 1)(x − 4) −4 L3,3(x) = (x)(x − 1)(x − 2) 24 For P3(x) at x = 3 L3,0(3) == (3 − 1)(3 − 2)(−4) −8 = 1 4 , L3,1(3) = (3)(3 − 2)(3 − 4) 3 = −1 L3,2(3) = (3)(3 − 1)(3 − 4) −4 = 3 2 , L3,3(3) = (3)(3 − 1)(3 − 2) 24 = 1 4 Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 28. To find the polynomial we will use the following formula P3(x) = 7L3,0(x) + 13L3,1(x) + 21L3,2(x) + 43L3,3(x) L3,0(x) = (x − 1)(x − 2)(x − 4) −8 L3,1(x) = (x)(x − 2)(x − 4) 3 L3,2(x) = (x)(x − 1)(x − 4) −4 L3,3(x) = (x)(x − 1)(x − 2) 24 For P3(x) at x = 3 L3,0(3) == (3 − 1)(3 − 2)(−4) −8 = 1 4 , L3,1(3) = (3)(3 − 2)(3 − 4) 3 = −1 L3,2(3) = (3)(3 − 1)(3 − 4) −4 = 3 2 , L3,3(3) = (3)(3 − 1)(3 − 2) 24 = 1 4 Thus P3(3) = 7(1 4) + 13(−1) + 21(3 2) + 43(1 4) = 31. Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics
  • 29. Error in Lagrange Interpolating Polynomial Error Estimate in Lagrange Interpolating Polynomial is fn+1(t) (n + 1)! (x − x0)(x − x1) · · · (x − xn) t ∈ (x0, xn). Dr. Yasir Ali (yali@ceme.nust.edu.pk) Adv. Engg. Mathematics