Professional Documents
Culture Documents
Lagrange Interpolation
In Lagrange interpolation, the interpolating polynomial is written in the form
Example:
Use Lagrange interpolation to find the unique polynomial p3(x), of degree 3 or less, that agrees
with the following data:
1
In other words, we must have P3(-1) = 3, P3(0) = -4, P3(1) = 5, and p3(2) = -6: First, we
construct the Lagrange polynomials
2
Lagrange interpolating polynomial P3(x) is given by
Example:
The upward velocity of a rocket is given as a function of time in Table below
a) Determine the value of the velocity at t =16 seconds using third order Lagrangian polynomial
interpolation.
b) Find the absolute relative approximate error for the third order polynomial approximation.
Since we want to find the velocity at t = 16, and we are using a third order polynomial,
we need to choose the four data points closest to t = 16 that also bracket t = 16 to evaluate it.
The four points are to=10, t1=15, t2=20 and t3=22.5.
3
4
b) The absolute percentage relative approximate error, |∈𝑎 |for the value obtained for v(16) can
be obtained by comparing the result with that obtained using the second order polynomial
which is equal to 392.19 ….(try it)
Divided Differences
Divided Differences
A new algebraic representation for (x)
Suppose that Pn(x) is the nth Lagrange polynomial that agrees with the function f at the
distinct numbers xo, x1, . . . , xn. Although this polynomial is unique, there are alternate algebraic
representations that are useful in certain situations. The divided differences of f with respect to
xo, x1, . . . , xn are used to express Pn(x) in the form
We now introduce the divided-difference notation .The zeroth divided difference of the function
f with respect to xi , denoted f [xi ], is simply the value of f at xi :
f [xi ] = f (xi )
The remaining divided differences are defined recursively. The first divided difference of f with
respect to xi and xi+1 is denoted f [xi , xi+1] and defined as:
Numeri
cal
Similarly, after the (k − 1)st divided differences, f [xi , xi+1, xi+2, . . . , xi+k−1] ,and f [xi+1, xi+2, . . .
, xi+k−1, xi+k ] have been determined, the kth divided difference relative to xi , xi+1, xi+2, . . . , xi+k
is , f [xi , xi+1, . . . , xi+k−1, xi+k ]
5
The process ends with the single nth divided difference
Example:
Torque-speed data for an electric motor is given in the first two columns of the table below. Find
the equation of the Newton divided-difference interpolating polynomial that passes through each
data point and use it to estimate the torque at 1800 rpm.
6
T(w) = ao+a1(w−wo)+a2(w−wo)(w−w1)+a3(w-wo)(w-w1)(w-w2)
+ a4(w-wo)(w-w1)(w-w2)(w-w3)
T(w) = 31+(-6)(w−0.5)+(-2)(w−0.5)(w−1)+(-6.667)(w-0.5)(w-1)(w-1.5)
+ (6)(w-0.5)(w-1)(w-1.5)(w-2)
Example:
From the divide difference table shown below, estimate the third order interpolating polynomial.
H.W.:
Use divided difference method to determine y at x=1.5. The data points are:
7
H.W.
Find the equation of polynomial matching the following data points by using divided difference
method:
Ans.
H.W.