Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Linear Interpolation, Newton-Gregory Forward

& Backward Difference Formulae & Gauss


Forward & Backward Interpolation Formulae

1
Group Members

Name USI
Bibi Serafya Shameer 1031596
Jonathon Narine 1013778
Samuel Rafiek 1030773
Yuvraj Ramnath 1032626
Nicholas Sattaur 1031930
Shildon Williams 1031152

2
Task Sheet

Name Assigned Task


Bibi Serafya Shameer Linear Interpolation

Jonathon Narine Gauss Forward Interpolation Formula

Samuel Rafiek Gauss Backward Interpolation Formula

Newton-Gregory Backward Difference


Yuvraj Ramnath
Formula
Newton-Gregory Forward Difference
Nicholas Sattaur
Formula
Linear Interpolation
Shildon Williams
3
Presentation Outline

1.0 Linear Interpolation


2.0 Newton-Gregory Forward Difference Formula
3.0 Newton-Gregory Backward Difference Formula
4.0 Gauss Forward Interpolation Formula
5.0 Gauss Backward Interpolation Formula
References

4
1.0 Linear Interpolation

What is linear interpolation?


Interpolation is a method used for estimating the value of a function
between any two known values.
It is useful to:
• Estimate the function of the un-tabulated points

• Estimate any desired value at some specific known coordinate

point 5
1.0 Linear Interpolation

Graphical Representation of Linear Interpolation


6
1.0 Linear Interpolation

The formula for linear interpolation in its simplest form is given as:

(𝑥 − 𝑥1 )(𝑦2 − 𝑦1 )
𝑦 = 𝑦1 +
(𝑥2 − 𝑥1 )
Where:
 𝑥1 and 𝑦1 are the first coordinates;
 𝑥2 and 𝑦2 are the second coordinates;
 𝑥 is the point to perform the interpolation;
 𝑦 is the interpolated value.
7
1.0 Linear Interpolation

Example:
Consider the following data:

Calculate the estimated height of the plant on the fourth day.


8
1.0 Linear Interpolation
Solution
(𝑥−𝑥1 )(𝑦2 −𝑦1 )
Recall that: 𝑦 = 𝑦1 +
(𝑥2 −𝑥1 )

Where:
𝑥1 and 𝑦1 = 3 and 4
𝑥2 and 𝑦2 = 5 and 8
𝑥 = 4, 𝑦 = ?
Substituting:
4−3 8−4
𝑦 = 4+ =6
5−3
Thus on the fourth day, the height will be 6 units. 9
1.0 Linear Interpolation
Example 2

The population of a city was recorded every ten years, starting in 1980. Use

the following table and interpolate to estimate what the population was in

2009.

10
1.0 Linear Interpolation
Example 2

11
2.0 Newton-Gregory Forward Difference Formula

What is the Gregory–Newton forward difference formula?

The Gregory–Newton forward difference formula is a formula involving


finite differences that gives an approximation for f(x), where x = x 0 + θh,
and 0 < θ <1.

The approximation f(x) ≈ f 0+θΔ f 0 gives the result of linear interpolation.

12
2.0 Newton-Gregory Forward Difference Formula

Consider the table below:

We assume that 𝑥𝑜 , 𝑥1 … are distinct equally spaced apart, ∆𝑓𝑜 = f(x1) - f(𝑥𝑜 )
and 𝑥𝑜 <x1<…
13
2.0 Newton-Gregory Forward Difference Formula

Consider the table below:

14
2.0 Newton-Gregory Forward Difference Formula

From the table:

• For each pair of consecutive function values f (𝑥𝑜 ) and f (𝑥1 ) in the table,
the forward difference ∆fo is calculated by subtracting f(𝑥𝑜 ) from f(x1).

• The difference is written in a third column of the table, midway between


the lines carrying f(𝑥𝑜 ) and f(𝑥1 ) as it can be observed.

• A fourth column, the forward difference of the values of ∆f, denoted by


∆2 f, and again written mid way between the lines of ∆f denote the
second forward difference of f(x)
15
2.0 Newton-Gregory Forward Difference Formula

16
2.0 Newton-Gregory Forward Difference Formula

A further column can be added, giving the third differences, denoted by


∆3 f.
For the table below, The table has been completed. the third differences
are constant and all subsequent differences would be zero.
Generally, more columns are added until the differences reaches 0.

17
2.0 Newton-Gregory Forward Difference Formula

18
2.0 Newton-Gregory Forward Difference Formula

• The Gregory-Newton Forward Difference Formula is given as:

𝑝(𝑝 − 1) 2 𝑝 𝑝 − 1 (𝑝 − 2) 3
𝑓𝑝 = 𝑓𝑜 + 𝑝∆𝑓𝑜 + ∆ 𝑓𝑜 + ∆ 𝑓𝑜 + ⋯
2! 3!

This can sometimes be written in operator form as:

𝑝 𝑝−1 2 𝑝 𝑝−1 𝑝−2 3


𝑓𝑝 = 𝑓𝑜 + 𝑝∆ + ∆ + ∆ +⋯
1∗2 3!
19
2.0 Newton-Gregory Forward Difference Formula

Example:
Use the table below to find f (2.5).

20
2.0 Newton-Gregory Forward Difference Formula

To find f( 2.5), we denote x=2 as 𝑥𝑜 , x = 3 as 𝑥1 and x = 2.5 as 𝑥𝑝 .

Let h= the constant range between successive values of x, i.e. h= x1 - 𝑥𝑜


𝑥𝑝−𝑥𝑜
Express ( 𝑥𝑝 - 𝑥𝑜 ) as a fraction of h, that is p = ,0<p<1

2.5−2.0
Therefore, in this case h = 1 and p = = 0.5
1

We now use the set of values underlined from the table above drawn diagonally
from f (x0). Thus: p= 0.5 f0 = 14 ∆fo = 26 ∆2 fo =22 ∆3 fo = 6
21
2.0 Newton-Gregory Forward Difference Formula

• Substituting into the Gregory-Newton forward difference interpolation formula


we get:

𝑝(𝑝 − 1) 2 𝑝 𝑝 − 1 (𝑝 − 2) 3
𝑓𝑝 = 𝑓𝑜 + 𝑝∆𝑓𝑜 + ∆ 𝑓𝑜 + ∆ 𝑓𝑜 + ⋯
2! 3!

0.5( −0.5) 0.5( −0.5) − (1.5)


𝑓𝑝 = 14 + 0.5( 26) + ( 22) + (6)
1∗2 1∗2∗3

𝑓𝑝 = 14 + 13 - 2.75 + 0.375

𝑓𝑝 = 24.625
22
3.0 Newton-Gregory Backward Difference Formula

This method is applied when the value to be estimated lies towards the end of
the data set. The 𝑥 values of the data set should be equally spaced.

The Newton-Gregory Backward Interpolation Formula is given by:

𝑟 𝑟+1 2
𝑟 𝑟+1 𝑟+2
𝑓 𝑥 = 𝑌𝑛 + 𝑟(𝛻𝑌𝑛 ) + (𝛻 𝑌𝑛 ) + (𝛻 3 𝑌𝑛 ) +
𝑛! 𝑛!

𝑟(𝑟 + 1) ⋯ (𝑟 + (𝑛 − 1) 𝑛
…+ (𝛻 𝑌𝑛 )
𝑛!
23
3.0 Newton-Gregory Backward Difference Formula

Where:
𝑥−𝑥𝑛
• 𝑟=

• 𝑕 is the interval of the 𝑥 values,

• 𝑥𝑛 is the end 𝑥 value,

• 𝑌𝑛 is the end 𝑌 value,

• (𝛻𝑌𝑛 )(𝛻 2 𝑌𝑛 )(𝛻 3 𝑌𝑛 ) ⋯ (𝛻 𝑛 𝑌𝑛 ) are the Backward differences.


24
3.0 Newton-Gregory Backward Difference Formula

To find the Backward differences, the procedure in the table below is followed.

The Highlighted cells are the Backward differences; the process is the same for
any number of values

25
3.0 Newton-Gregory Backward Difference Formula

Example

Estimate 𝑌 for 57 given the following data.

26
3.0 Newton-Gregory Backward Difference Formula

First find the Backward Differences:

Next we compute 𝑟:
57 − 60
𝑟= = −0.6
5 27
3.0 Newton-Gregory Backward Difference Formula

• Finally, Apply the Gregory Newton Backward Difference Formula.

r(r + 1) 2 r(r + 1)(r + 2) 3


f(x) = Yn + r(𝛻Yn ) + (𝛻 Yn ) + (𝛻 Yn )
2! 3!

−0.6 −0.6 + 1
f x = 0.8660 + −0.6 0.0468 + −0.0064
2

(−0.6)(−0.6 + 1)(−0.6 + 2)
+ (−0.0007)
6
f(x) = 0.8387
28
4.0 Gauss Forward Interpolation Formula

• The central difference operator ‘𝛅’

• Similar to the Gregory-Newton’s method for forward


differences

• However, method of navigating the through the ranks of the


table is different.

29
4.0 Gauss Forward Interpolation Formula

• The Gauss’s forward interpolation formula is defined as:


𝒑(𝒑 − 𝟏) 𝟐 𝒑 + 𝟏 𝒑(𝒑 − 𝟏) 𝟑 𝒑 + 𝟏 𝒑(𝒑 − 𝟏)(𝒑 − 𝟐) 𝟒
𝒇𝒑 = 𝒇𝒐 + 𝒑𝜹𝒇𝟎 𝟏+ 𝜹 𝒇𝟎 + 𝒑𝜹 𝒇𝟎 𝟏 + 𝜹 𝒇𝟎 + ⋯
+
𝟐 𝟐! 𝟑! +
𝟐 𝟒!
• Where:
𝑥𝑝 −𝑥0
• 𝑝=

• 𝑥𝑝 − 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥 𝑡𝑕𝑎𝑡 𝑤𝑖𝑙𝑙 𝑏𝑒 𝑖𝑛𝑡𝑒𝑟𝑝𝑜𝑙𝑎𝑡𝑒𝑑 𝑓𝑜𝑟
• 𝑕 − 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑟𝑎𝑛𝑔𝑒 𝑏𝑒𝑡𝑤𝑒𝑒𝑚 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑖𝑣𝑒 𝑣𝑎𝑙𝑢𝑒𝑠 𝑜𝑓 𝑥
𝑕 = 𝑥1 − 𝑥0
• 𝑥0 − 𝑓𝑖𝑟𝑠𝑡 𝑠𝑢𝑐𝑒𝑠𝑠𝑖𝑣𝑒 𝑣𝑎𝑙𝑢𝑒
• 𝑥1 − 𝑠𝑒𝑐𝑜𝑛𝑑 𝑠𝑢𝑐𝑒𝑠𝑠𝑖𝑣𝑒 𝑣𝑎𝑙𝑢𝑒
30
4.0 Gauss Forward Interpolation Formula

• Example
Given the data in the following table, determine the corresponding f(x)
value for x = 5.5.

• x = 5.5 is found between x = 4 and x = 6, therefore, we will be


interpolating between these values.
31
4.0 Gauss Forward Interpolation Formula

For the last column, subtracting would give a value of 0, as such, the
computation comes to an end for the tabular portion.
32
4.0 Gauss Forward Interpolation Formula

Recall that:
𝑝(𝑝−1) 2 𝑝+1 𝑝(𝑝−1)
• 𝑓𝑝 = 𝑓𝑜 + 𝑝𝛿𝑓0 + 1 + 𝛿 𝑓0 + 𝑝𝛿 3 𝑓0 + 1
2 2! 3! 2
• 𝒇𝒐 = 𝟏𝟔𝟓, 𝜹𝒇𝟎 + 𝟏 = 𝟕𝟖, 𝜹𝟐 𝒇𝟎 = 𝟐𝟏, 𝜹𝟑 𝒇𝟎 + 𝟏 = 𝟑, 𝒙𝒑 = 𝟓. 𝟓
𝟐 𝟐
𝑥𝑝 −𝑥0 5.5−4
• 𝑝= = = 𝟎. 𝟕𝟓
ℎ 2
0.75 0.75−1 0.75+1 0.75 0.75−1
• 𝑓𝑝 = 165 + (0.75)(78) + (21) + (3)
2×1 3×2×1
• 𝑓𝑝 = 165 + 58.5 − 1.97 − 0.16
• 𝒇𝒑 = 𝟐𝟐𝟏. 𝟑𝟕
The 𝐟(𝐱) value that corresponds to 𝐱 = 𝟓. 𝟓, was found to be 221.37 after
interpolation
33
5.0 Gauss Backward Interpolation Formula

• Also known as Gauss Backward Central Difference Formula, this is a


method to determine unknown values of a function within the limits of
that function. It is given as:

𝑢(𝑢+1) 2 𝑢(𝑢2 −1) 3 𝑢(𝑢2 −1)(𝑢+2) 4


• 𝑦 𝑥 = 𝑦0 + 𝑢∆𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2 + ∆ 𝑦−2 +⋯
2! 3! 4!
𝑥−𝑥0
• Where 𝑢 =

34
5.0 Gauss Backward Interpolation Formula

• This formula can also be stated as follows (Kumar, 2017):

𝑢 𝑢+1 𝑢+1 𝑢+2


• 𝑦 𝑥 = 𝑦0 + 1
∆𝑦−1 + 2
∆2 𝑦−1 + 3
∆3 𝑦−2 + 4
∆3 𝑦−2 + ⋯

Where:

𝑢 𝑢 𝑢−1 𝑢−2 … 𝑢−𝑟+1


• 𝑟
=
𝑟!

35
5.0 Gauss Backward Interpolation Formula

Example
• Find the value of f(x) when x = 1976.

36
5.0 Gauss Backward Interpolation Formula

First we write the table back in terms of x and y for simplicity:

• And we would find h by: 𝑕 = 1950 − 1940, 𝑕 = 10


• And using 𝑥0 as 1970, we have:
𝑥−𝑥0
• 𝑢=

𝑥−1970
• 𝑢=
10

37
5.0 Gauss Backward Interpolation Formula

This gives the central difference table shown:

38
5.0 Gauss Backward Interpolation Formula

• Given that 𝑥 = 1976, from the table, we see that:


• 𝑦0 = 32 , ∆𝑦−1 = 5, ∆2 𝑦−1 = −1, ∆3 𝑦−2 = 1, ∆4 𝑦−2 = −2, ∆5 𝑦−3 = −9
1976−1970
• 𝑢= , 𝑢 = 0.6
10
• Gauss Backward Interpolation formula is given as:
𝑢(𝑢+1) 2 𝑢(𝑢2 −1) 3 𝑢(𝑢2 −1)(𝑢+2) 4
• 𝑦 𝑥 = 𝑦0 + 𝑢∆𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2 + ∆ 𝑦−2 +
2! 3! 4!
𝑢(𝑢2 −1)(𝑢2 −4) 5
∆ 𝑦−3 …
5!

39
5.0 Gauss Backward Interpolation Formula

• Substituting:
• 𝑦 1976 =
0.6 0.6+1 0.6(0.62 −1) 0.6(0.62 −1)(0.6+2)
32 + 0.6 5 + × −1 + ×1 + × −2 +
2! 3! 4!
0.6(0.62 −4)(0.62 −1)
× −9
5!

• 𝑦 1976 = 32 + 3 − 0.48 − 0.064 + 0.0832 − 0.104832

• 𝑦 1976 = 34.434368

40
References

• Kowsher, M., Moheuddin, M. M., & Uddin, M. J. (2019 ). A New Method of


Central Difference Interpolation . Applied Mathematics and Sciences: An
International Journal (MathSJ), 1-14 .

• Kumar, R. (2017, October 15). Interpolation. Retrieved from CMS website


: http://cms.gcg11.ac.in/attachments/article/202/Interpolation.pdf

• Stroud, K.A. and Booth, D.J. (2003). Advanced engineering mathematics.


Basingstoke: Palgrave Macmillan.
41

You might also like