Download - Lecture 3 - Interpolation
LECTURE 3: INTERPOLATION
Interpolation
technique of estimating the value of a function for any intermediate value of the independent variable
method of computing the value of the function π¦ = π(π₯) for any given value of the independent variable π₯ when a set of values of π¦ = π(π₯)for certain values of π₯ are known or given
i.e. the process of finding the value of π¦ corresponding to any value of π₯ = π₯πbetween π₯0 and π₯π, if π₯π , π¦π , π = 0,1,2,β¦ , π are the set of π + 1 given data points of the function π¦ = π(π₯)
Easy to do if function is explicitly defined..
Interpolating Function
if the function π(π₯) is not known, then it is very hard to find the exact form of π(π₯) with the tabulated values π₯π, π¦π
π π₯ can be replaced by a simpler function π(π₯), which has the same values as π π₯ for π₯0, π₯1, π₯2, β¦ , π₯π
π(π₯) is called the interpolating or smoothing function and any other value can be computed from it
Polynomial Interpolation
If π(π₯) is a polynomial, then π(π₯) is called the interpolating polynomialand the process of computing the intermediate values of y = π(π₯) is called the polynomial interpolation.
In the study of interpolation, we make the following assumptions:
there are no sudden jumps in the values of the dependent variable for the period under consideration
the rate of change of figures from one period to another is uniform.
In this course, interpolation will be based on the calculus of finite differences (forward, backward and central).
Finite Difference Operators
Forward Differences
Backward Differences
Central Differences
Forward Differences
or simply difference operator is denoted by Ξ
defined as Ξπ π₯ = π π₯ + β β π(π₯)
where β = interval of differencing
or, at π₯ = π₯π
Ξπ π₯π = π π₯π + β β π(π₯π)
Ξπ¦π = π¦π+1 β π¦π for π = 0,1,2,β¦ , π β 1
hence,
Second Difference
difference of the first differences
denoted by Ξ2π¦0, Ξ2π¦1, β¦ , Ξ2 π¦π
hence,
generalizing, Ξπ+1π¦π = Ξππ¦π+1 β Ξππ¦π π = 0,1,2, β¦
where Ξ0β‘ identity operator, i.e., Ξ0π π₯ = π(π₯) and Ξ1 = Ξ
Backward Differences
denoted by π»
defined as π»π π₯ = π π₯ β π(π₯ β β)
or, at π₯ = π₯π
π»π¦π = π¦π β π¦πβ1 for π = π, π β 1,β¦ , 1
π»π¦1 = π¦1 β π¦0, π»π¦2 = π¦2 β π¦1, β¦ , π»π¦π = π¦π β π¦πβ1
Second difference
Central Differences
denoted by πΏ
defined by πΏπ π₯ = π π₯ +β
2β π π₯ β
β
2
first central differences
second central differences
INTERPOLATION for EQUAL INTERVALS
Assumption:
β’ for function π¦ = π(π₯), the set of (π + 1) functional values π¦0, π¦1, β¦ , π¦π are given corresponding to the set of (π + 1) equally spaced values of the independent variable, π₯π = π₯0 + πβ, π = 0,1,2,β¦ , π, where β is the spacing
Newtonβs Forward Interpolation Formula
used to interpolate the values of π¦ near the beginning of a set of equally spaced tabular values
formula:
where:
π¦0, π¦1, β¦ , π¦π β π ππ‘ ππ π + 1 ππ’πππ‘πππππ π£πππ’ππ
π₯0, π₯1, β¦ , π₯π β π ππ‘ ππ π + 1 πππ’ππππ¦ π πππππ π£πππ’ππ
π π₯ β π¦ = π π₯ π π’πβ π‘βππ‘ π π₯π = π π₯π πππ π = 0,1,2, β¦ , π
π’ =π₯βπ₯0
β
Ex:
Find the value of sin42Β°.
Since x = 42Β° is near the starting value π₯0 = 40Β°, we use NFIF.
π₯ 40 45 50 55 60
π¦ = π πππ₯ 0.6428 0.7071 0.7660 0.8192 0.8660
i xi yi Ξyi Ξ2yi Ξ3yi Ξ4yi
0 40 0.6428 0.0643 -0.0054 -0.0004 01 45 0.7071 0.0589 -0.0058 -0.00042 50 0.766 0.0531 -0.00623 55 0.8192 0.04694 60 0.866
Seatwork
Newtonβs Backward Interpolation Formula
used to interpolate the values of π¦ near the end of the tabulated values
formula:
π π₯ = π¦π + π£π»π¦π +π£(π£ + 1)
2!π»2π¦π +β―+ π£ π£ + 1 β¦
π£ + π β 1
π!π»ππ¦π
where:
π£ =π₯βπ₯π
β
Ex:
Calculate the value of π(84) for the data given in the table below:
Since x = 84 is near the end value π₯5 = 90, we use NBIF.
i xi yi βyi β2yi β3yi β4yi β5yi
0 40 2041 50 224 202 60 246 22 23 70 270 24 2 04 80 296 26 2 0 05 90 324 28 2 0 0 0
π₯ = 84 π₯5 = 90
β = 10
π£ =84β90
10= β0.6
From
π π₯ = π¦π + π£π»π¦π +π£(π£ + 1)
2!π»2π¦π +β―+ π£ π£ + 1 β¦
π£ + π β 1
π!π»ππ¦π
π 84 = 324 + β0.6 28 +β0.6 β0.6+1
2!2 = πππ. ππ
i xi yi βyi β2yi β3yi β4yi β5yi
0 40 2041 50 224 202 60 246 22 23 70 270 24 2 04 80 296 26 2 0 05 90 324 28 2 0 0 0
Error
NFIF
NBIF
INTERPOLATION for UNEQUAL INTERVALS
Lagrange Formula for Unequal Intervals
Let π¦ = π π₯ be a real values continuous function defined in an interval [π, π]. Let π₯0, π₯1, β¦ , π₯π be (π + 1) distinct points which are not necessarily equally spaced and the corresponding values of the function are π¦0, π¦1, β¦ , π¦π.
Since (π + 1) values of the function are given corresponding to the (π + 1) values of the independent variable x, we can represent the function π¦ = π(π₯) as a polynomial in π₯ of degree π.
Using Lagrangeβs interpolation formula, find the value of y corresponding to x = 10 from the following data.
Apply Lagrangeβs interpolation formula to find a polynomial which passes through the points (0, β20), (1, β12), (3, β20) and (4, β24).
Seatwork
Using Lagrangeβs interpolation formula find a polynomial which passes the points
(0, β12), (1, 0), (3, 6), (4, 12).
Lagrangeβs Formula for Inverse Interpolation
By interchanging x and y in the formula, we can express π₯ as a function of π¦ as follows:
The following table gives the values of y corresponding to certain values of π₯. Find the value of π₯ when π¦ = 167.59789 by applying Lagrangeβs inverse interpolation formula.
CENTRAL DIFFERENCE INTERPOLATION FORMULAEfor EQUAL INTERVALS
Central Difference Tables
Besselβs Formula
*brackets mean that the average has to be taken
Apply Besselβs interpolation formula to obtain y25, given that y20 = 2860, y24 = 3167, y28 = 3555 and y32 = 4112.
From Besselβs Formula,
We get
Stirlingβs Formula
gives the most accurate result for -0.25 β€ u β€ 0.25
hence, x0 should be selected such that u satisfies this inequality
π¦π = π¦0 + π’Ξπ¦β1 + Ξπ¦0
2+π’2
2Ξ2π¦β2 +
)π’(π’2 β 1
3!
Ξ3π¦β2 + Ξ3π¦β12
+)π’2 (π’2 β 1
4!Ξ4π¦β2
+)π’(π’2 β 1)(π’2 β 22
5!
Ξ5π¦β3 + Ξ5π¦β22
+)π’2 (π’2 β 1)(π’2 β 22
6!Ξ6π¦β3 +β―
+)π’ π’2 β 1 π’2 β 22 π’2 β 32 β¦[π’2 β π β 1 2
(2π β 1)!
Ξ2πβ1π¦βπ + Ξ2πβ1π¦ )β(πβ1
2
+]π’2 π’2 β 1 π’2 β 22 π’2 β 32 β¦[π’2 β π β 1 2)
(2π)!Ξ2ππ¦βπ
π¦π = π¦0 + π’Ξπ¦β1 + Ξπ¦0
2+π2
2Ξ2π¦β2 +
)π(π2 β 1
3!
Ξ3π¦β2 + Ξ3π¦β12
+)π2 (π2 β 1
4!Ξ4π¦β2
+)π(π2 β 1)(π2 β 22
5!
Ξ5π¦β3 + Ξ5π¦β22
+)π2 (π2 β 1)(π2 β 22
6!Ξ6π¦β3 +β―
+)π π2 β 1 π2 β 22 π2 β 32 β¦[π2 β π β 1 2
(2π β 1)!
Ξ2πβ1π¦βπ + Ξ2πβ1π¦ )β(πβ1
2
+]π2 π2 β 1 π2 β 22 π2 β 32 β¦[π2 β π β 1 2)
(2π)!Ξ2ππ¦βπ
Apply Stirlingβs interpolation formula to obtain y25, given that y20 = 2860, y24 = 3167, y28 = 3555 and y32 = 4112.
i xi yi Ξyi Ξ2yi Ξ3yi
-1 20 2860 307 81 88
0 24 3167 388 169
1 28 3555 557
2 32 4112
From Stirlingβs Formula
We get
i xi yi Ξyi Ξ2yi Ξ3yi
-1 20 2860 307 81 880 24 3167 388 1691 28 3555 5572 32 4112
Assignment
Use Stirlingβs Formula to find the value of y when x = 1.63 from the following table
Exercises
Use Stirlingβs interpolation formula to find y28, given that y20 = 48234, y25 = 47354, y30
= 46267, y35 = 44978 and y40 = 43389.
π π₯ = π¦π + π£π»π¦π +π£(π£ + 1)
2!π»2π¦π +β―+ π£ π£ + 1 β¦
π£ + π β 1
π!π»ππ¦π
Given that 12600 = 112.24972, 12610 = 112.29426, 12620= 112.33877,
12630 = 112.38327. Find the value of 12616 using Laplace-Everettβs Formula.