0% found this document useful (0 votes)
6 views

CH#3 Interpolation-19-01-2025

Chapter 3 of 'Advanced Mathematical Techniques' focuses on interpolation, specifically the approximation of functions using polynomials based on known values at distinct points. It covers both interpolation and extrapolation processes, along with Newton's Forward and Backward Interpolation Polynomial formulas, providing theorems and examples for practical application. The chapter emphasizes the uniqueness of interpolating polynomials and includes transformations between forward and backward formulas for ease of use.

Uploaded by

ALIYAN ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CH#3 Interpolation-19-01-2025

Chapter 3 of 'Advanced Mathematical Techniques' focuses on interpolation, specifically the approximation of functions using polynomials based on known values at distinct points. It covers both interpolation and extrapolation processes, along with Newton's Forward and Backward Interpolation Polynomial formulas, providing theorems and examples for practical application. The chapter emphasizes the uniqueness of interpolating polynomials and includes transformations between forward and backward formulas for ease of use.

Uploaded by

ALIYAN ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Advanced Mathematical Techniques Chapter# 3 Interpolation

CHAPTER # 3

INTERPOLATION

Dr. Jamil Book Series 2 Page 73


Advanced Mathematical Techniques Chapter# 3 Interpolation

CHAPTER # 3
INTERPOLATION
Introduction:-
In this chapter we will discuss the problem of approximating a given function by a class of
simpler function especially polynomial. Let us suppose a function 𝒚 = 𝒚(𝒙) = 𝒇(𝒙) is not
known explicitly and only the values of 𝒇(𝒙) at a set of points are known.
Let 𝒇(𝒙) is known at the distinct points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ,...., 𝒙𝒏 i.e.
“Table of values”

Interpolation:-
Interpolation is the process of finding the value of a function for any value of argument or
independent variable in an interval (𝒙𝟎 , 𝒙𝒏 ).
Thus interpolation is the art of reading between the lines in a given table.

Extrapolation:-
Extrapolation is the process of finding the value of a function outside an interval
(𝒙𝟎 , 𝒙𝒏 ).

Polynomial Interpolation 𝑷(𝒙):-


Approximation by the polynomial of least degree satisfying the given data is called
Polynomial Interpolation and the corresponding polynomial is called the interpolating
polynomial.
The following theorem guarantees the existence and uniqueness of such a polynomial.

Dr. Jamil Book Series 2 Page 74


Advanced Mathematical Techniques Chapter# 3 Interpolation

Theorem:-
Let 𝒚(𝒙) = 𝒇(𝒙) be known at the distinct points 𝒙𝟎 , 𝒙𝟏 , … 𝒙𝒏 . Then there exists a Unique
polynomial 𝑷(𝒙) of Degree less than or equals to 𝒏 and Satisfying the condition:

𝑷(𝒙𝒊 ) = 𝒚(𝒙𝒊 ) = 𝒚𝒊 = 𝒇𝒊 , 𝒊 = 𝟎, 𝟏, 𝟐, … . , 𝒏

1): Newton’s Forward Interpolation Polynomial Formula:-


Consider

𝑷(𝒙) = 𝒇(𝒙) = 𝒚(𝒙) = 𝒚(𝒙𝟎 + 𝒑𝒉) = 𝑬𝒑 𝒚(𝒙𝟎 ) = 𝑬𝒑 𝒚𝟎 ⸪𝒙 = 𝒙𝟎 + 𝒑𝒉

𝑷(𝒙) = (𝟏 + 𝜟)𝒑 𝒚𝟎 ⸪𝑬 = 𝟏 + 𝜟

Using binomial formula, we have


𝒑(𝒑−𝟏) 𝒑(𝒑−𝟏)(𝒑−𝟐) 𝒑(𝒑−𝟏)(𝒑−𝟐)…(𝒑−𝒏+𝟏)
𝒚(𝒙) = 𝑷(𝒙) = 𝒚𝟎 + 𝒑𝜟𝒚𝟎 + 𝚫𝟐 𝒚𝟎 + 𝚫𝟑 𝒚𝟎 +. . . + 𝜟𝒏 𝒚𝟎
𝟐! 𝟑! 𝒏!

𝒙−𝒙𝟎
where 𝒑=
𝒉

This is called Newton’s or Newton’s-Gregory forward interpolation formula.

2): Newton’s Backward Interpolation Polynomial Formula:-


Consider

𝑷(𝒙) = 𝒇(𝒙) = 𝒚(𝒙) = 𝒚(𝒙𝒏 + 𝒑𝒉) = 𝑬𝒑 𝒚(𝒙𝒏 ) = 𝑬𝒑 𝒚𝒏 ⸪𝒙 = 𝒙𝒏 + 𝒑𝒉

𝑷(𝒙) = (𝟏 − 𝛁)−𝒑 𝒚𝒏 ⸪𝑬 = (𝟏 − 𝛁)−𝟏

Again using binomial formula for negative power, we have


𝒑(𝒑+𝟏) 𝒑(𝒑+𝟏)(𝒑+𝟐) 𝒑(𝒑+𝟏)(𝒑+𝟐)…(𝒑+𝒏−𝟏)
𝒚(𝒙) = 𝑷(𝒙) = 𝒚𝒏 + 𝒑𝛁𝒚𝒏 + 𝛁𝟐 𝒚𝒏 + 𝛁𝟑 𝒚𝒏 +. . . + 𝛁𝒏 𝒚𝒏
𝟐! 𝟑! 𝒏!

𝒙−𝒙𝒏
where 𝒑 =
𝒉

This is called Newton’s or Newton’s-Gregory backward interpolation formula.

Dr. Jamil Book Series 2 Page 75


Advanced Mathematical Techniques Chapter# 3 Interpolation

Transformation From Forward to Backward Formulae:-


You have to only remember the Newton’s Forward Formula and for Newton’s Backward
Formula, use the following transformation:

S.N. Symbol Replace

1 𝒚𝟎 𝒚𝒏

2 𝜟 𝛁

3 +− ++

Important note:-
a): Newton’s forward interpolation formula is used for interpolating the values of the
function near the beginning/initial/start of the table.

b): Newton’s backward interpolation formula is used for interpolating the values of the
function near the end/final of the table.

Example # 1:-
Estimate 𝒚(𝟑. 𝟏𝟕) from the following data using Newton’s forward interpolation formula:

𝒙 3.1 3.2 3.3 3.4 3.5

𝒚 = 𝒇(𝒙) 0 0.6 1.0 1.2 1.3

Solution:-
“Forward Difference Table”
𝒙 𝒚 𝚫𝐲 𝚫2y 𝚫3y 𝚫4y
3.1 0
0.6
3.2 0.6 -0.2
0.4 0
3.3 1.0 -0.2 0.1
0.2 0.1
3.4 1.2 -0.1
0.1
3.5 1.3

From the above table, we have

Dr. Jamil Book Series 2 Page 76


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒚𝟎 = 𝟎, 𝜟𝒚𝟎 = 𝟎. 𝟔, 𝚫𝟐 𝒚𝟎 = −𝟎. 𝟐, 𝚫𝟑 𝒚𝟎 = 𝟎, 𝚫𝟒 𝒚𝟎 = 𝟎. 𝟏
Here 𝒙𝟎 = 𝟑. 𝟏, 𝒙 = 𝟑. 𝟏𝟕 and 𝒉 = 𝟎. 𝟏

𝒙−𝒙𝟎 𝟑.𝟏𝟕−𝟑.𝟏 𝟎.𝟎𝟕


⸫𝒑= = = = 𝟎. 𝟕
𝒉 𝟎.𝟏 𝟎.𝟏

As the point 𝒙 = 𝟑. 𝟏𝟕 is near the beginning of the table


we use the Newton’s forward interpolation formula.

𝒑(𝒑−𝟏) 𝒑(𝒑−𝟏)(𝒑−𝟐) 𝒑(𝒑−𝟏)(𝒑−𝟐)(𝒑−𝟑)


𝑷(𝒙) = 𝒚𝟎 + 𝒑𝜟𝒚𝟎 + 𝚫𝟐 𝒚𝟎 + 𝚫𝟑 𝒚𝟎 + 𝚫𝟒 𝒚𝟎
𝟐! 𝟑! 𝟒!

Substituting values, we get


𝟎. 𝟕(𝟎. 𝟕 − 𝟏)
⇒ 𝑷(𝟑. 𝟏𝟕) = 𝟎 + (𝟎. 𝟕)(𝟎. 𝟔) + (−𝟎. 𝟐)
𝟐
𝟎.𝟕(𝟎.𝟕−𝟏)(𝟎.𝟕−𝟐) 𝟎.𝟕(𝟎.𝟕−𝟏)(𝟎.𝟕−𝟐)(𝟎.𝟕−𝟑)
+ (𝟎) + (𝟎. 𝟏)
𝟔 𝟐𝟒

⇒ 𝒚(𝟑. 𝟏𝟕) = 𝒇(𝟑. 𝟏𝟕) = 𝑷(𝟑. 𝟏𝟕) = 𝟎. 𝟒𝟑𝟖𝟒

Thus

𝒚(𝟑. 𝟏𝟕) = 𝒇(𝟑. 𝟏𝟕) = 𝑷(𝟑. 𝟏𝟕) = 𝟎. 𝟒𝟑𝟖𝟒

Example # 2:-
Find the Newton’s forward interpolation polynomial for the data:

𝒙 -1 0 1 2
𝒚(𝒙) = 𝒇(𝒙) 4 2 2 4

and estimate 𝒚(−𝟎. 𝟓) .


Solution:-
“Forward Difference Table”
𝒙 𝒚 𝚫𝐲 ∆𝟐 𝒚 ∆𝟑 𝒚
-1 4
-2
0 2 2
0 0
1 2 2
2
2 4

Dr. Jamil Book Series 2 Page 77


Advanced Mathematical Techniques Chapter# 3 Interpolation

From the above table, we have


𝒚𝟎 = 𝟒, 𝜟𝒚𝟎 = −𝟐, 𝚫𝟐 𝒚𝟎 = 𝟐, 𝚫𝟑 𝒚𝟎 = 𝟎

Here 𝒙𝟎 = −𝟏, 𝒙 = 𝒙, 𝒉 = 𝟏, then

𝒙 − 𝒙𝟎 𝒙 + 𝟏
𝒑= = =𝒙+𝟏
𝒉 𝟏

The Newton’s forward interpolation polynomial formula is given as

𝒑(𝒑 − 𝟏) 𝟐 𝒑(𝒑 − 𝟏)(𝒑 − 𝟐) 𝟑


𝑷(𝒙) = 𝒚𝟎 + 𝒑𝜟𝒚𝟎 + 𝜟 𝒚𝟎 + 𝜟 𝒚𝟎
𝟐! 𝟑!
(𝒙 + 𝟏)𝒙
⇒ 𝑷(𝒙) = 𝟒 + (𝒙 + 𝟏)(−𝟐) + (𝟐) + 𝟎
𝟐

⇒ 𝒚 = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝒙𝟐 − 𝒙 + 𝟐

Hence

𝒚 = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝒙𝟐 − 𝒙 + 𝟐

is the required Newton’s forward interpolation polynomial and

𝒚(−𝟎. 𝟓) = 𝒇(−𝟎. 𝟓) ≅ 𝑷(−𝟎. 𝟓) = (−𝟎. 𝟓)𝟐 − (−𝟎. 𝟓) + 𝟐 = 𝟐. 𝟕𝟓

Example # 3:-
Estimate 𝒚(𝟒𝟐) from the following data using Newton’s backward interpolation formula

𝒙 20 25 30 35 40 45
𝒚(𝒙) = 𝒇(𝒙) 354 332 291 260 231 204

Solution:-

Dr. Jamil Book Series 2 Page 78


Advanced Mathematical Techniques Chapter# 3 Interpolation

“Backward Difference Table”

𝒙 𝒚 𝛁𝒚 𝛁𝟐 𝒚 𝛁𝟑 𝒚 𝛁𝟒 𝒚 𝛁𝟓 𝒚
𝟐𝟎 𝟑𝟓𝟒

𝟐𝟓 𝟑𝟑𝟐 −𝟐𝟐
−𝟏𝟗
𝟐𝟗
−𝟒𝟏
𝟑𝟎 𝟐𝟗𝟏 𝟏𝟎 −𝟑𝟕
𝟒𝟓
−𝟖
𝟑𝟓 𝟐𝟔𝟎 −𝟑𝟏 𝟐 𝟖

−𝟐𝟗 𝟎
𝟒𝟎 𝟐𝟑𝟏 𝟐
−𝟐𝟕
𝟒𝟓 204

From the table above, we have

𝒚𝒏 = 𝟐𝟎𝟒, 𝛁𝒚𝒏 = −𝟐𝟕, 𝛁𝟐 𝒚𝒏 = 𝟐, 𝛁𝟑 𝒚𝒏 = 𝟎, 𝛁𝟒 𝒚𝒏 = 𝟖, 𝛁𝟓 𝒚𝒏 = 𝟒𝟓


Here 𝒙𝒏 = 𝟒𝟓, 𝒙 = 𝟒𝟐, and 𝒉 = 𝟓, then

𝒙 − 𝒙𝒏 𝟒𝟐 − 𝟒𝟓 −𝟑
⟹𝒑= = = = −𝟎. 𝟔
𝒉 𝟓 𝟓

As the point 𝒙 = 𝟒𝟐 is near the end of the table. We use Newton’s backward interpolation
formula

𝒑(𝒑 + 𝟏) 𝟐 𝒑(𝒑 + 𝟏)(𝒑 + 𝟐) 𝟑


𝑷(𝒙) = 𝒚𝒏 + 𝒑𝜵𝒚𝒏 + 𝜵 𝒚𝒏 + 𝜵 𝒚𝒏 +
𝟐! 𝟑!

𝒑(𝒑 + 𝟏)(𝒑 + 𝟐)(𝒑 + 𝟑) 𝟒 𝒑(𝒑 + 𝟏)(𝒑 + 𝟐)(𝒑 + 𝟑)(𝒑 + 𝟒) 𝟓


𝜵 𝒚𝒏 + 𝜵 𝒚𝒏
𝟒! 𝟓!

Substituting values, we get

(−𝟎. 𝟔)(𝟎. 𝟒) (−𝟎. 𝟔)(𝟎. 𝟒)(𝟏. 𝟒)


⇒ 𝑷(𝟒𝟐) = 𝟐𝟎𝟒 + (−𝟎. 𝟔)(−𝟐𝟕) + (𝟐) + (𝟎) +
𝟐 𝟔

(−𝟎. 𝟔)(𝟎. 𝟒)(𝟏. 𝟒)(𝟐. 𝟒) (−𝟎. 𝟔)(𝟎. 𝟒)(𝟏. 𝟒)(𝟐. 𝟒)(𝟑. 𝟒)


(𝟖) + (𝟒𝟓)
𝟐𝟒 𝟏𝟐𝟎

Dr. Jamil Book Series 2 Page 79


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒚(𝟒𝟐) = 𝒇(𝟒𝟐) ≅ 𝑷(𝟒𝟐) = 𝟐𝟏𝟖. 𝟔𝟔𝟑𝟎

Example # 4:-
Given the following table

𝒙 1 2 3 4 5 6 7 8

𝒚 = 𝒇(𝒙) 1 8 27 64 125 216 343 512

Find a): 𝒇(𝟏. 𝟓) b): 𝒇(𝟕. 𝟓)

Solution:-
“Forward/Backward Difference Table”

𝒙 𝒚 ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚 ∆𝟓 𝒚 ∆𝟔 𝒚 ∆𝟕 𝒚

𝟏 𝟏
𝟕
𝟐 𝟖
𝟏𝟐
𝟏𝟗
𝟔
𝟑 𝟐𝟕 𝟏𝟖 𝟎
𝟎
𝟑𝟕 𝟔
𝟐𝟒 𝟎
𝟎
𝟒 𝟔𝟒 𝟎 𝟎
𝟔𝟏 𝟔
𝟑𝟎 𝟎
𝟎
𝟎
𝟓 𝟏𝟐𝟓 𝟔
𝟗𝟏
𝟑𝟔 𝟎
𝟔 𝟐𝟏𝟔
𝟏𝟐𝟕 𝟔

𝟒𝟐
7 𝟑𝟒𝟑
𝟏𝟔𝟗

8 𝟓𝟏𝟐

a): For 𝒇(𝟏. 𝟓):-


To compute 𝒇(𝟏. 𝟓), we use Newton’s-forward interpolation formula, as the point 𝒙 = 𝟏. 𝟓
is near the beginning of the table, therefore we have

𝒑(𝒑 − 𝟏) 𝟐 𝒑(𝒑 − 𝟏)(𝒑 − 𝟐) 𝟑


𝑷(𝒙) = 𝒚𝟎 + 𝒑𝜟𝒚𝟎 + 𝜟 𝒚𝟎 + 𝜟 𝒚𝟎 + 𝟎 + 𝟎 + 𝟎 + 𝟎
𝟐! 𝟑!
Here 𝒙𝟎 = 𝟏, 𝒙 = 𝟏. 𝟓 and 𝒉 = 𝟏, then

Dr. Jamil Book Series 2 Page 80


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒙 − 𝒙𝟎 𝟏. 𝟓 − 𝟏
⟹𝒑= = = 𝟎. 𝟓
𝒉 𝟏

Substituting these values in above formula, we get

(𝟎. 𝟓)(−𝟎. 𝟓) (𝟎. 𝟓)(−𝟎. 𝟓)(−𝟏. 𝟓)


⇒ 𝑷(𝟏. 𝟓) = 𝟏 + (𝟎. 𝟓)(𝟕) + (𝟏𝟐) + (𝟔)
𝟐 𝟔

⇒ 𝑷(𝟏. 𝟓) = 𝟏 + 𝟑. 𝟓 − 𝟏. 𝟓 + 𝟎. 𝟑𝟕𝟓 = 𝟑. 𝟑𝟕𝟓


Hence

𝒚(𝟏. 𝟓) = 𝒇(𝟏. 𝟓) ≅ 𝑷(𝟏. 𝟓) = 𝟑. 𝟑𝟕𝟓

b): For 𝒇(𝟕. 𝟓):-


To compute 𝒇(𝟕. 𝟓), we use Newton’s-backward interpolation formula, as the point 𝒙 = 𝟕. 𝟓
is near the end of the table, therefore we have

𝒑(𝒑 + 𝟏) 𝟐 𝒑(𝒑 + 𝟏)(𝒑 + 𝟐) 𝟑


𝑷(𝒙) = 𝒚𝒏 + 𝒑𝜵𝒚𝒏 + 𝜵 𝒚𝒏 + 𝜵 𝒚𝒏 + 𝟎 + 𝟎 + 𝟎 + 𝟎
𝟐! 𝟑!

Here 𝒙𝒏 = 𝟖, 𝒙 = 𝟕. 𝟓 and 𝒉 = 𝟏, then

𝒙 − 𝒙𝒏 𝟕. 𝟓 − 𝟖
⟹𝒑= = = −𝟎. 𝟓
𝒉 𝟏

Substituting these values,we get

(−𝟎. 𝟓)(𝟎. 𝟓) (−𝟎. 𝟓)(𝟎. 𝟓)(𝟏. 𝟓)


𝑷(𝟕. 𝟓) = 𝟓𝟏𝟐 + (−𝟎. 𝟓)(𝟏𝟔𝟗) + (𝟒𝟐) + (𝟔)
𝟐 𝟔

𝑷(𝟕. 𝟓) = 𝟓𝟏𝟐 – 𝟖𝟒. 𝟓 – 𝟓. 𝟐𝟓 − 𝟎. 𝟑𝟕𝟓 = 𝟒𝟐𝟏. 𝟖𝟕𝟓


Hence

𝒚(𝟕. 𝟓) = 𝒇(𝟕. 𝟓) ≅ 𝑷(𝟕. 𝟓) = 𝟒𝟐𝟏. 𝟖𝟕𝟓

Dr. Jamil Book Series 2 Page 81


Advanced Mathematical Techniques Chapter# 3 Interpolation

Drill Excercise # 1:-


Evaluate 𝒚(𝟏. 𝟏) and 𝒚(𝟒. 𝟓) from the table:
𝒙 0 1 2 3 4 5
𝒚(𝒙) = 𝒇(𝒙) 0 3 8 15 24 35

Answer:-
𝒇(𝟏. 𝟏) = 𝟑. 𝟒𝟏, 𝒇(𝟒. 𝟓) = 𝟐𝟗. 𝟐𝟓

Drill Excercise # 2:-


Compute 𝒚(𝟎. 𝟓) and 𝒚(𝟔. 𝟕) from the table:
𝒙 0 1 2 3 4 5 6 7
𝒚(𝒙) = 𝒇(𝒙) 0 7 26 63 124 215 342 511

Answer:-
𝒇(𝟎. 𝟓) = 𝟐. 𝟑𝟕𝟓, 𝒇(𝟔. 𝟕) = 𝟒𝟓𝟓. 𝟓𝟑𝟑

Dr. Jamil Book Series 2 Page 82


Advanced Mathematical Techniques Chapter# 3 Interpolation

The DIVIDED DIFFRENCES


Let the values of 𝒚(𝒙) = 𝒇(𝒙) be given at (𝒏 + 𝟏) distinct points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 … . 𝒙𝒏 . We
define the Newton’s divided differences as:

𝒇(𝒙𝟏 ) − 𝒇(𝒙𝟎 )
𝒇[ 𝒙 𝟎 , 𝒙 𝟏 ] =
𝒙𝟏 − 𝒙 𝟎

𝒇(𝒙𝟐 ) − 𝒇(𝒙𝟏 )
𝒇[ 𝒙 𝟏 , 𝒙 𝟐 ] =
𝒙𝟐 − 𝒙 𝟏
. . .
. . .
. . .

𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 )
𝒇[𝒙𝒏−𝟏 , 𝒙𝒏 ] =
𝒙𝒏 − 𝒙𝒏−𝟏

These are called first divided differences and is devoted by 𝚫𝒇. Higher divided differences
operators are defined as:

𝒇[ 𝒙 𝟏 , 𝒙 𝟐 ] − 𝒇[ 𝒙 𝟎 , 𝒙 𝟏 ]
𝒇[ 𝒙 𝟎 , 𝒙 𝟏 , 𝒙 𝟐 ] =
𝒙𝟐 − 𝒙𝟎
𝒇[ 𝒙 𝟐 , 𝒙 𝟑 ] − 𝒇[ 𝒙 𝟏 , 𝒙 𝟐 ]
𝒇[ 𝒙 𝟏 , 𝒙 𝟐 , 𝒙 𝟑 ] =
𝒙𝟑 − 𝒙𝟏

𝒇[ 𝒙 𝟏 , 𝒙 𝟐 , 𝒙 𝟑 ] − 𝒇[ 𝒙 𝟎 , 𝒙 𝟏 , 𝒙 𝟐 ]
𝒇[ 𝒙 𝟎 , 𝒙 𝟏 , 𝒙 𝟐 , 𝒙 𝟑 ] =
𝒙𝟑 − 𝒙𝟎

. . . . .
. . . . .
. . . . .

𝒇[𝒙𝟏 ,𝒙𝟐 ,…,𝒙𝒌 ]−𝒇[𝒙𝟎 ,…,𝒙𝒌−𝟏 ]


𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒌−𝟏 , 𝒙𝒌, ] = for 𝒌 = 𝟑, 𝟒, 𝟓, . . . , 𝒏
𝒙𝒌 −𝒙𝟎

These differences are denoted by 𝚫𝟐 𝒇, 𝚫𝟑 𝒇 … … . 𝚫𝒌 𝒇.

Dr. Jamil Book Series 2 Page 83


Advanced Mathematical Techniques Chapter# 3 Interpolation

“Divided Difference Table”

𝒙 𝒇 ∆𝒇 ∆𝟐 𝒇 ∆𝟑 𝒇

𝒙𝟎 𝒇( 𝒙 𝟎 )
𝒇(𝒙𝟏 )−𝒇(𝒙𝟎 )
𝒇[𝒙𝟎 , 𝒙𝟏 ] =
𝒙𝟏 −𝒙𝟎

𝒇[𝒙𝟏 ,𝒙𝟐 ]−𝒇[𝒙𝟎 ,𝒙𝟏 ]


𝒙𝟏 𝒇( 𝒙 𝟏 ) 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ] = 𝒙𝟐 −𝒙𝟎

𝒇(𝒙𝟐 )−𝒇(𝒙𝟏 ) 𝒇[𝒙𝟏 ,𝒙𝟐 ,𝒙𝟑 ]−𝒇[𝒙𝟎 ,𝒙𝟏 ,𝒙𝟐 ]


𝒇[𝒙𝟏 , 𝒙𝟐 ] = 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] =
𝒙𝟐 −𝒙𝟏 𝒙𝟑 −𝒙𝟎

𝒇[𝒙𝟐 ,𝒙𝟑 ]−𝒇[𝒙𝟏 ,𝒙𝟐 ]


𝒙𝟐 𝒇( 𝒙 𝟐 ) 𝒇[𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] =
𝒙𝟑 −𝒙𝟏

𝒇(𝒙𝟑 )−𝒇(𝒙𝟐 )
𝒇[𝒙𝟐 , 𝒙𝟑 ] =
𝒙𝟑 −𝒙𝟐

𝒙𝟑 𝒇( 𝒙 𝟑 )

Example # 5:-
Make divided difference table for the data:

𝒙 -1 0 1 3
𝒚(𝒙) = 𝒇(𝒙) 2 1 0 -1

Solution:-
“Divided Difference Table”

𝒙 𝒇 𝚫𝐟 ∆𝟐 𝒇 ∆𝟑 𝒇

−𝟏𝒙𝟎 𝟐𝒇(𝒙𝟎)
𝟏−𝟐
= −𝟏𝒇[𝒙𝟎,𝒙𝟏]
𝟎−(−𝟏)
−𝟏−(−𝟏)
𝟎𝒙𝟏 𝟏𝒇(𝒙𝟏) = 𝟎𝒇[𝒙𝟎,𝒙𝟏 ,𝒙𝟐]
𝟏−(−𝟏)
𝟏
𝟎−𝟏 𝟔
−𝟎 𝟏
= −𝟏𝒇[𝒙𝟏,𝒙𝟐] =
𝟏−𝟎 𝟑−(−𝟏) 𝟐𝟒𝒇[𝒙 ,𝒙 ,𝒙 ,𝒙 ]
𝟎 𝟏 𝟐 𝟑
𝟏
−𝟐−(−𝟏) 𝟏
𝟏𝒙𝟐 𝟎𝒇(𝒙𝟐) =
𝟑−𝟎 𝟔𝒇[𝒙𝟏 ,𝒙𝟐 ,𝒙𝟑 ]

−𝟏−𝟎 𝟏
=−
𝟑−𝟏 𝟐𝒇[𝒙𝟐 ,𝒙𝟑 ]

𝟑𝒙𝟑 −𝟏𝒇(𝒙𝟑)

Dr. Jamil Book Series 2 Page 84


Advanced Mathematical Techniques Chapter# 3 Interpolation

3): Newton’s Divided Difference Interpolation Formula:-


The Newton’s divided difference interpolation polynominal formula is give by (without
proof):

𝒚 = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝒇(𝒙𝟎 ) + (𝒙 − 𝒙𝟎 )𝒇[𝒙𝟎 , 𝒙𝟏 ] + (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ]


+(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] + ⋯
+ (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) … (𝒙 − 𝒙𝒏−𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , … , 𝒙𝒏 ]

Example # 6:-
For the data:

𝒙 -1 0 2 5
𝒚(𝒙) = 𝒇(𝒙) 7 10 22 235

Find the divided difference polynominal and estimate 𝒚(𝟏).


Solution:-
“Divided difference table”

𝒙 𝒇 𝜟𝒇 ∆𝟐 𝒇 ∆𝟑 𝒇
-1 7
3
0 10 1
6 2
2 22 13
71
5 235

From the above table, we have


𝒇(𝒙𝟎 ) = 𝟕, 𝒇[𝒙𝟎 , 𝒙𝟏 ] = 𝟑, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ] = 𝟏, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] = 𝟐

The Newton’s divided difference interpolation polynominal formula is given by

𝑷(𝒙) = 𝒇(𝒙𝟎 ) + (𝒙 − 𝒙𝟎 )𝒇[𝒙𝟎 , 𝒙𝟏 ] + (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ]

+(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ]

Substituting values, we get

𝑷(𝒙) = 𝟕 + (𝒙 + 𝟏) (𝟑) + (𝒙 + 𝟏) (𝒙 − 𝟎) (𝟏) + (𝒙 + 𝟏) (𝒙 + 𝟎) (𝒙 − 𝟐)(𝟐)

Dr. Jamil Book Series 2 Page 85


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒚(𝒙) = 𝒇(𝒙) = 𝑷(𝒙) = 𝟐𝒙𝟑 − 𝒙𝟐 + 𝟏𝟎

Hence

𝒚(𝟏) = 𝒇(𝟏) ≅ 𝑷(𝟏) = 𝟐(𝟏)𝟑 − (𝟏)𝟐 + 𝟏𝟎 = 𝟏𝟏

Example # 7:-
Using Newton’s divided difference formula find the value of 𝒚(𝟐), 𝒚(𝟖) and 𝒚(𝟏𝟓) given the
following table:

𝒙 4 5 7 10 11 13
𝒚(𝒙) = 𝒇(𝒙) 48 100 294 900 1210 2028

Solution:-
“Divided difference table”

𝒙 𝒇 ∆𝒇 ∆𝟐 𝒇 ∆𝟑 𝒇 ∆𝟒 𝒇 ∆𝟓 𝒇

4 48

52

5 100 15

97 1

7 294 21 0

202 1 0

10 900 27 0

310 1

11 1210 33

409

13 2028

From the above table, we have

⇒ 𝒇(𝒙𝟎 ) = 𝟒𝟖, 𝒇[𝒙𝟎 , 𝒙𝟏 ] = 𝟓𝟐, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ] = 𝟏𝟓, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] = 𝟏,


𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 ] = 𝟎, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 , 𝒙𝟓 ] = 𝟎

The Newton’s divided difference interpolation polynomial formula is given by:


Dr. Jamil Book Series 2 Page 86
Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒇(𝒙𝟎 ) + (𝒙 − 𝒙𝟎 )𝒇[𝒙𝟎 , 𝒙𝟏 ] + (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ] +

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] + 𝟎 + 𝟎


Substituting values we get

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝟒𝟖 + (𝒙 − 𝟒)(𝟓𝟐) + ((𝒙 − 𝟒)(𝒙 − 𝟓)(𝟏𝟓) + (𝒙 − 𝟒)(𝒙 − 𝟓)(𝒙 − 𝟕)(𝟏)

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝟒𝟖 + 𝟓𝟐 (𝒙 − 𝟒) + 𝟏𝟓(𝒙 − 𝟒)(𝒙 − 𝟓) + (𝒙 − 𝟒)(𝒙 − 𝟓)(𝒙 − 𝟕)

Then
𝒚(𝟐) ≅ 𝑷(𝟐) = 𝟒𝟖 − 𝟏𝟎𝟒 + 𝟗𝟎 − 𝟑𝟎 = 𝟒

𝒚(𝟖) ≅ 𝑷(𝟖) = 𝟒𝟖 + 𝟓𝟐(𝟒) + 𝟏𝟓(𝟒)(𝟑) + (𝟒)(𝟑)(𝟏) = 𝟒𝟒𝟖

𝒚(𝟏𝟓) ≅ 𝑷(𝟏𝟓) = 𝟒𝟖 + 𝟓𝟐(𝟏𝟏) + 𝟏𝟓(𝟏𝟏)(𝟏𝟎) + (𝟏𝟏)(𝟏𝟎)(𝟖) = 𝟑𝟏𝟓𝟎

Drill Excercise # 3:-


Find the Newton’s divided difference polynominal of the following data, and find 𝒚(𝟐. 𝟓)

𝒙 0 1 3 4

𝒚(𝒙) = 𝒇(𝒙) 1 4 40 85

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝒙𝟑 + 𝒙𝟐 + 𝒙 + 𝟏

Drill Excercise # 4:-


Find the missing values in the following data using Newton’s divided difference
formula:

𝒙 3 6 7 8 9 10

𝒚(𝒙) = 𝒇(𝒙) 168 - 120 - 72 63

Answer:-
𝒇(𝟔) = 𝟏𝟒𝟕 , 𝒇(𝟖) = 𝟗𝟑

Dr. Jamil Book Series 2 Page 87


Advanced Mathematical Techniques Chapter# 3 Interpolation

Drill Excercise # 5:-


The Pressure drop that occurs when water flows through an orifice meter is measured using a
differential Pressure transmitter. The output current is converted to voltage drop by a resister.
The objective is to correlate the flow rate 𝑭 (𝒈 𝒎𝒊𝒏−𝟏 ) with the voltage drop 𝑷 (𝒎 𝑽). The
following data were collected from an experiment:

𝑭 (𝒈 𝒎𝒊𝒏−𝟏 ) 3 5 6 9

𝑷 (𝒎 𝑽) 293 508 585 764

(i): Derive a polynomial passing through these data points using Newton’s Divided
interpolation method
(ii): Write Polynomial in simplest form.
(iii): Use this Polynomial to estimate 𝑷 at 𝟕 (𝒈 𝒎𝒊𝒏−𝟏 ) flow rate.
(iv): Interpret and conclude your results.
Answer:-
𝑷(𝑭) = 𝒇 (𝑭) ≈ 𝑷 (𝑭) =

Dr. Jamil Book Series 2 Page 88


Advanced Mathematical Techniques Chapter# 3 Interpolation

4): Lagrange’s Interpolation Polynomial Formula


Let 𝒇(𝒙) are known at the distinct points 𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒏 i.e. there are (𝒏 + 𝟏) points are
given as in the following table:
“Table of values”

𝒙 𝒙𝟎 𝒙𝟏 𝒙𝟐 . .. 𝒙𝒏
𝒚(𝒙) = 𝒇(𝒙) 𝒚𝟎 = 𝒇(𝒙𝟎 ) = 𝒇𝟎 𝒚𝟏 = 𝒇(𝒙𝟏 ) = 𝒇𝟏 𝒚𝟐 = 𝒇(𝒙𝟐 ) = 𝒇𝟐 … 𝒚𝒏 = 𝒇(𝒙𝒏 ) = 𝒇𝒏

The Lagrange’s interpolation polynomial formula of degree at most (𝒏 + 𝟏) is given by


(without proof):
𝒏

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊 = 𝑳𝟎 (𝒙)𝒚𝟎 + 𝑳𝟏 (𝒙)𝒚𝟏 + 𝑳𝟐 (𝒙)𝒚𝟐 + ⋯ + 𝑳𝒏 (𝒙)𝒚𝒏


𝒊=𝟎

where 𝑳𝒊 (𝒙) are called Lagrange’s interpolation coefficients and defined as:

(𝒙−𝒙𝟎 ) (𝒙−𝒙𝟏 ) …(𝒙−𝒙𝒊−𝟏 ) (𝒙−𝒙𝒊+𝟏 )… (𝒙−𝒙𝒏 )


𝑳 𝒊 (𝒙 ) = ( [ 𝑫𝒆𝒍𝒆𝒕𝒆 𝒊𝒕𝒉 𝒇𝒂𝒄𝒕𝒐𝒓 (𝒙𝒊 − 𝒙𝒊 ) ]
𝒙𝒊 −𝒙𝟎 )(𝒙𝒊 −𝒙𝟏 )…(𝒙𝒊 −𝒙𝒊−𝟏 )(𝒙𝒊 −𝒙𝒊+𝟏 )…(𝒙𝒊 −𝒙𝒏 )

Example # 8:-
Determine the Lagrange’s interpolation polynomial for the data:

𝒙 𝟎 𝟏 𝟑
𝒙𝟎 𝒙𝟏 𝒙𝟐
𝒚 = 𝒇(𝒙) 𝟏 𝟑 𝟓5
𝒚𝟎 𝒚𝟏 𝒚𝟐

and estimate the value of 𝒚 = 𝒚(𝒙) at 𝒙 = 𝟐 and 𝒙 = 𝟒.

Solution :-
The Lagrange’s interpolation polynomial formula of degree at most 2 is given by (here 𝒏 =
𝟐) :
𝟐

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊


𝒊=𝟎

⟹ 𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝑳𝟎 (𝒙)𝒚𝟎 + 𝑳𝟏 (𝒙)𝒚𝟏 + 𝑳𝟐 (𝒙)𝒚𝟐 (𝟏)

Now
(𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 ) (𝒙−𝟏)(𝒙−𝟑) 𝟏
𝑳𝟎 (𝒙) = (𝒙 = = 𝟑 (𝒙𝟐 − 𝟒𝒙 + 𝟑)
𝟎 −𝒙𝟏 )(𝒙𝟎 −𝒙𝟐 ) (𝟎−𝟏)(𝟎−𝟑)

Dr. Jamil Book Series 2 Page 89


Advanced Mathematical Techniques Chapter# 3 Interpolation

(𝒙−𝒙𝟎 )(𝒙−𝒙𝟐 ) (𝒙−𝟎)(𝒙−𝟑) −𝟏


𝑳𝟏 (𝒙) = (𝒙𝟏 −𝒙𝟎 )(𝒙𝟏 −𝒙𝟐
=
) (𝟏−𝟎)(𝟏−𝟑)
= (𝒙𝟐 − 𝟑𝒙)
𝟐

(𝒙−𝒙𝟎 )(𝒙−𝒙𝟏 ) (𝒙−𝟎)(𝒙−𝟏) 𝟏


𝑳𝟐 (𝒙) = (𝒙 = (𝟑−𝟎)(𝟑−𝟏) = 𝟔 (𝒙𝟐 − 𝒙)
𝟐 −𝒙𝟎 )(𝒙𝟐 −𝒙𝟏 )

Substituting values in Eq. (1), we get


𝟏 𝟐 𝟏 𝟏
𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = (𝒙 − 𝟒𝒙 + 𝟑)(𝟏) − (𝒙𝟐 − 𝟑𝒙)(𝟑) + (𝒙𝟐 − 𝒙)(𝟓𝟓)
𝟑 𝟐 𝟔

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝟖𝒙𝟐 − 𝟔𝒙 + 𝟏

is the required Lagrange’s interpolation polynomial. Also

𝒚(𝟐) = 𝒇(𝟐) ≅ 𝑷(𝟐) = 𝟖(𝟐)𝟐 − 𝟔(𝟐) + 𝟏 = 𝟐𝟏

and

𝒚(𝟒) = 𝒇(𝟒) ≅ 𝑷(𝟒) = 𝟖(𝟒)𝟐 − 𝟔(𝟒) + 𝟏 = 𝟏𝟎𝟓

Example # 9:-
Determine Lagrange’s interpolation polynomial formula and then find the missing value
from the following data:

𝒙 𝟎 𝟏 𝟐 𝟑 𝟒
𝒚(𝒙) = 𝒇(𝒙) −𝟏𝟐 𝟎 − 𝟔 𝟏𝟐

Solution:-
Consider the following data:

𝒙 𝟎 𝟏 𝟑 𝟒
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑
𝒚(𝒙) = 𝒇(𝒙) −𝟏𝟐 𝟎 𝟔 𝟏𝟐
𝒚𝟎 𝒚𝟏 𝒚𝟐 𝒚𝟑

The Lagrange’s interpolation polynomial formula of degree at most 3 is given by (here 𝒏 =


𝟑):
𝟑

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊


𝒊=𝟎

Dr. Jamil Book Series 2 Page 90


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝑳𝟎 (𝒙)𝒚𝟎 + 𝑳𝟏 (𝒙)𝒚𝟏 + 𝑳𝟐 (𝒙)𝒚𝟐 + 𝑳𝟑 (𝒙)𝒚𝟑 (1)

Now
(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟏)(𝒙 − 𝟑)(𝒙 − 𝟒)
𝑳𝟎 (𝒙) = =
(𝒙𝟎 − 𝒙𝟏 )(𝒙𝟎 − 𝒙𝟐 )(𝒙𝟎 − 𝒙𝟑 ) (𝟎 − 𝟏)(𝟎 − 𝟑)(𝟎 − 𝟒)

−𝟏 𝟑
𝑳𝟎 (𝒙) = (𝒙 − 𝟖𝒙𝟐 + 𝟏𝟗𝒙 − 𝟏𝟐)
𝟏𝟐

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟎)(𝒙 − 𝟑)(𝒙 − 𝟒) 𝟏 𝟑


𝑳𝟏 (𝒙) = = = (𝒙 − 𝟕𝒙𝟐 + 𝟏𝟐𝒙)
(𝒙𝟏 − 𝒙𝟎 )(𝒙𝟏 − 𝒙𝟐 )(𝒙𝟏 − 𝒙𝟑 ) (𝟏 − 𝟎)(𝟏 − 𝟑)(𝟏 − 𝟒) 𝟔

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟎)(𝒙 − 𝟏)(𝒙 − 𝟒) −𝟏 𝟑


𝑳𝟐 (𝒙) = = = (𝒙 − 𝟓𝒙𝟐 + 𝟒𝒙)
(𝒙𝟐 − 𝒙𝟎 )(𝒙𝟐 − 𝒙𝟏 )(𝒙𝟐 − 𝒙𝟑 ) (𝟑 − 𝟎)(𝟑 − 𝟏)(𝟑 − 𝟒) 𝟔

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 ) (𝒙 − 𝟎)(𝒙 − 𝟏)(𝒙 − 𝟑) 𝟏 𝟑


𝑳𝟑 (𝒙) = = = (𝒙 − 𝟒𝒙𝟐 + 𝟑𝒙)
(𝒙𝟑 − 𝒙𝟎 )(𝒙𝟑 − 𝒙𝟏 )(𝒙𝟑 − 𝒙𝟐 ) (𝟒 − 𝟎)(𝟒 − 𝟏)(𝟒 − 𝟑) 𝟏𝟐

Substituting these values in Eq. (1), we get

𝟏 𝟑 𝟏
𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = − (𝒙 − 𝟖𝒙𝟐 + 𝟏𝟗𝒙 − 𝟐)(−𝟏𝟐) + (𝒙𝟑 − 𝟕𝒙𝟐 + 𝟏𝟐𝒙)(𝟎)
𝟏𝟐 𝟔
𝟏 𝟏 𝟑
− (𝒙𝟑 − 𝟓𝒙𝟐 + 𝟒𝒙)(𝟔) + (𝒙 − 𝟒𝒙𝟐 + 𝟑𝒙)(𝟏𝟐)
𝟔 𝟏𝟐

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒙𝟑 − 𝟕𝒙𝟐 + 𝟏𝟖𝒙 − 𝟏𝟐

Hence

𝒚(𝟐) = 𝒇(𝟐) ≅ 𝑷(𝟐) = (𝟐)𝟑 − 𝟕(𝟐)𝟐 + 𝟏𝟖(𝟐) − 𝟏𝟐 = 𝟒

Example # 10:-
Find 𝒚(𝟏) using Lagrange’s interpolation polynomial:

𝒙 −𝟏 𝟎 𝟐 𝟑
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑
𝒚 = 𝒇(𝒙) 𝟓 𝟐 𝟎 𝟏
𝒚𝟎 𝒚𝟏 𝒚𝟐 𝒚𝟑

Dr. Jamil Book Series 2 Page 91


Advanced Mathematical Techniques Chapter# 3 Interpolation

Solution:-
The Lagrange’s interpolation polynomial formula of degree at most 3 is given by (here
𝒏 = 𝟑):
𝟑

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊


𝒊=𝟎

Here = 𝟏 , therefore we have

⟹ 𝒚(𝟏) = 𝒇(𝟏) ≅ 𝑷(𝟏) = ∑𝟑𝒊=𝟎 𝑳𝒊 (𝟏)𝒚𝒊 = 𝑳𝟎 (𝟏)𝒚𝟎 + 𝑳𝟏 (𝟏)𝒚𝟏 + 𝑳𝟐 (𝟏)𝒚𝟐 + 𝑳𝟑 (𝟏)𝒚𝟑 (1)
Now
(𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 )(𝒙−𝒙𝟑 ) (𝟏−𝟎)(𝟏−𝟐)(𝟏−𝟑) 𝟐 −𝟏
𝑳𝟎 (𝟏) = (𝒙 = (−𝟏−𝟎)(−𝟏−𝟐)(−𝟏−𝟑) = −𝟏𝟐 =
𝟎 −𝒙𝟏 )(𝒙𝟎 −𝒙𝟐 )(𝒙𝟎 −𝒙𝟑 ) 𝟔

(𝒙−𝒙𝟎 )(𝒙−𝒙𝟐 )(𝒙−𝒙𝟑 ) [𝟏—(−𝟏)](𝟏−𝟐)(𝟏−𝟑) 𝟒 𝟐


𝑳𝟏 (𝟏) = (𝒙 = =𝟔=𝟑
𝟏 −𝒙𝟎 )(𝒙𝟏 −𝒙𝟐 )(𝒙𝟏 −𝒙𝟑 ) [𝟎−(−𝟏)](𝟎−𝟐)(𝟎−𝟑)

(𝒙−𝒙𝟎 )(𝒙−𝒙𝟏 )(𝒙−𝒙𝟑 ) [𝟏—(−𝟏)](𝟏−𝟎)(𝟏−𝟑) −𝟒 𝟐


𝑳𝟐 (𝟏) = (𝒙 = = −𝟔 = 𝟑
𝟐 −𝒙𝟎 )(𝒙𝟐 −𝒙𝟏 )(𝒙𝟐 −𝒙𝟑 ) [𝟐−(−𝟏)](𝟐−𝟎)(𝟐−𝟑)

(𝒙−𝒙𝟎 )(𝒙−𝒙𝟏 )(𝒙−𝒙𝟐 ) [𝟏—(−𝟏)](𝟏−𝟎)(𝟏−𝟐) −𝟐 −𝟏


𝑳𝟑 (𝟏) = (𝒙 = = 𝟏𝟐 =
𝟑 −𝒙𝟎 )(𝒙𝟑 −𝒙𝟏 )(𝒙𝟑 −𝒙𝟐 ) [𝟑−(−𝟏)](𝟑−𝟎)(𝟑−𝟐) 𝟔

Substituting these values in Eq. (1), we get

𝟏 𝟐 𝟐 𝟏 𝟏
𝒚(𝟏) = 𝒇(𝟏) ≅ 𝑷(𝟏) = (− ) (𝟓) + ( ) (𝟐) + ( ) (𝟎) + (− ) (𝟏) =
𝟔 𝟑 𝟑 𝟔 𝟑

Drill Excercise # 6:-


The following table are the measurement 𝑻 made on a curve record by oscilograph
representing a change of current 𝑰 due to a change in the conditions of an electric current:
1): Construct a Mathematical Model by Lagrange interpolation polynomial,
2): Write Polynomial in uncomplicated form.
3): Find the current 𝑰 for a 𝑻 = 𝟑.
4): Interpret and conclude your results.

𝑻 0 1 4 5

Current 𝑰 8 11 68 123

Answer:-
𝑰(𝑻) =≈ 𝑷(𝑻) = 𝑻𝟑 − 𝑻𝟐 + 𝟑𝑻 + 𝟖

Dr. Jamil Book Series 2 Page 92


Advanced Mathematical Techniques Chapter# 3 Interpolation

5): Hermite’s Interpolation Polynomial Formula

Let 𝒇(𝒙) and 𝒇′(𝒙) are known at the distinct points 𝒙𝟎 , 𝒙𝟏 , … , 𝒙𝒏 i.e there are (𝟐𝒏 + 𝟐) points
are given as in the following table:
“Table of values”

𝒙 𝒙𝟎 𝒙𝟏 𝒙𝟐 … 𝒙𝒏

𝒚(𝒙) = 𝒇(𝒙) 𝒚𝟎 𝒚𝟏 𝒚𝟐 … 𝒚𝒏

𝒚’(𝒙) = 𝒇’(𝒙) 𝒚’𝟎 𝒚’𝟏 𝒚’𝟐 … 𝒚’𝒏

The Hermite’s interpolation polynomial formula of degree at most (𝟐𝒏 + 𝟏) is given by


(without proof):
𝒏 𝒏

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑨𝒊 (𝒙)𝒚𝒊 + ∑ 𝑩𝒊 (𝒙)𝒚′𝒊


𝒊=𝟎 𝒊=𝟎

where

𝑨𝒊 (𝒙) = [𝟏 − 𝟐𝑳′ 𝒊 (𝒙𝒊 )(𝒙 − 𝒙𝒊 )][𝑳𝒊 (𝒙)]𝟐

𝑩𝒊 (𝒙) = (𝒙 − 𝒙𝒊 )[𝑳𝒊 (𝒙)]𝟐

where 𝒚′𝒊 and 𝐋′𝒊 (𝒙) are derivatives of 𝒚(𝒙) and 𝑳𝒊 (𝒙) respectively.
Example # 11:-
Using Hermite’s interpolation formula find Hermite polynomial 𝒚 = 𝒇(𝒙) ≅ 𝑷(𝒙), and
obtain 𝒚(𝟎. 𝟓) and 𝒚(−𝟎. 𝟓) from the following table:

𝒙 −𝟏 𝟎 𝟏
𝒙𝟎 𝒙𝟏 𝒙𝟐

𝒚 = 𝒇(𝒙) 𝟏 𝟏 𝟑
𝒚𝟎 𝒚𝟏 𝒚𝟐

𝒚′ = 𝒇′(𝒙) −𝟓 𝟏 𝟕
𝒚′ 𝟎 𝒚′ 𝟏 𝒚′ 𝟐

Solution:-
The Hermite’s interpolation polynomial formula of degree at most 5 is given by(here 𝒏 = 𝟐)

𝟐 𝟐

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑨𝒊 (𝒙)𝒚𝒊 + ∑ 𝑩𝒊 (𝒙)𝒚′𝒊


𝒊=𝟎 𝒊=𝟎

Dr. Jamil Book Series 2 Page 93


Advanced Mathematical Techniques Chapter# 3 Interpolation

where
𝑨𝒊 (𝒙) = [𝟏 − 𝟐𝑳′𝒊 (𝒙𝒊 )(𝒙 − 𝒙𝒊 )][𝑳𝒊 (𝒙)]𝟐

𝑩𝒊 (𝒙) = (𝒙 − 𝒙𝒊 )[𝑳𝒊 (𝒙)]𝟐

we have:
𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝑨𝟎 (𝒙)𝒚𝟎 + 𝑨𝟏 (𝒙)𝒚𝟏 + 𝑨𝟐 (𝒙)𝒚𝟐 + 𝑩𝟎 (𝒙)𝒚′ 𝟎 + 𝑩𝟏 (𝒙)𝒚′ 𝟏
+𝑩𝟐 (𝒙)𝒚′𝟐 (1)

𝑨𝟎 (𝒙) = [𝟏 − 𝟐𝑳′𝟎 (𝒙𝟎 )(𝒙 − 𝒙𝟎 )][𝑳𝟎 (𝒙)]𝟐

𝑨𝟏 (𝒙) = [𝟏 − 𝟐𝑳′𝟏 (𝒙𝟏 )(𝒙 − 𝒙𝟏 )][𝑳𝟏 (𝒙)]𝟐

𝑨𝟐 (𝒙) = [𝟏 − 𝟐𝑳′𝟐 (𝒙𝟐 )(𝒙 − 𝒙𝟐 )][𝑳𝟐 (𝒙)]𝟐

𝑩𝟎 (𝒙) = (𝒙 − 𝒙𝟎 )[𝑳𝟎 (𝒙)]𝟐

𝑩𝟏 (𝒙) = (𝒙 − 𝒙𝟏 )[𝑳𝟏 (𝒙)]𝟐

𝑩𝟐 (𝒙) = (𝒙 − 𝒙𝟐 )[𝑳𝟐 (𝒙)]𝟐

Now we calculate 𝑳𝒊 (𝒙) and 𝑳′𝒊 (𝒙), 𝒊 = 𝟎, 𝟏, 𝟐

(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 ) (𝒙 − 𝟎)(𝒙 − 𝟏) 𝟏
𝑳𝟎 (𝒙) = = = 𝒙(𝒙 − 𝟏)
(𝒙𝟎 − 𝒙𝟏 )(𝒙𝟎 − 𝒙𝟐 ) (−𝟏 − 𝟎)(−𝟏 − 𝟏) 𝟐

𝟏 −𝟑
⟹ 𝑳′𝟎 (𝒙) = (𝟐𝒙 − 𝟏) ⟹ 𝑳′𝟎 (𝒙𝟎 ) = 𝑳′𝟎 (−𝟏) =
𝟐 𝟐

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟐 ) (𝒙 + 𝟏)(𝒙 − 𝟏)
𝑳𝟏 (𝒙) = = = 𝟏 − 𝒙𝟐
(𝒙𝟏 − 𝒙𝟎 )(𝒙𝟏 − 𝒙𝟐 ) (𝟎 + 𝟏)(𝟎 − 𝟏)

⟹ 𝑳′𝟏 (𝒙) = −𝟐𝒙 ⟹ 𝑳′𝟏 (𝒙𝟏 ) = 𝑳′𝟏 (𝟎) = 𝟎

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) (𝒙 + 𝟏)(𝒙 − 𝟎) 𝟏
𝑳𝟐 (𝒙) = = = 𝒙(𝒙 + 𝟏)
(𝒙𝟐 − 𝒙𝟎 )(𝒙𝟐 − 𝒙𝟏 ) (𝟏 + 𝟏)(𝟏 − 𝟎) 𝟐

𝟏 𝟑
⟹ 𝑳′𝟐 (𝒙) = (𝟐𝒙 + 𝟏) ⟹ 𝑳′𝟐 (𝒙𝟐 ) = 𝑳′𝟐 (𝟏) =
𝟐 𝟐

Dr. Jamil Book Series 2 Page 94


Advanced Mathematical Techniques Chapter# 3 Interpolation

Substituting these values in 𝑨′𝒊 𝒔 𝐚𝐧𝐝 𝑩′𝒊 𝒔, 𝒊 = 𝟎, 𝟏, 𝟐. We have

−𝟑 𝒙𝟐 (𝒙 − 𝟏)𝟐 𝒙𝟐 (𝒙 − 𝟏)𝟐
𝑨𝟎 (𝒙) = [𝟏 − 𝟐 ( ) (𝒙 + 𝟏)] = (𝟒 + 𝟑𝒙)
𝟐 𝟒 𝟒

𝟏
𝑨𝟎 (𝒙) = (𝟑𝒙𝟓 − 𝟐𝒙𝟒 + 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )
𝟒

𝑨𝟏 (𝒙) = [𝟏 − 𝟐(𝟎)(𝒙 − 𝟎)](𝟏 − 𝒙𝟐 )𝟐 = 𝟏 − 𝟐𝒙𝟐 + 𝒙𝟒

𝟑 𝒙𝟐 (𝒙 + 𝟏)𝟐 𝒙𝟐 (𝒙 + 𝟏)𝟐
𝑨𝟐 (𝒙) = [𝟏 − 𝟐 ( ) (𝒙 − 𝟏)] = (𝟒 − 𝟑𝒙)
𝟐 𝟒 𝟒

𝟏
𝑨𝟐 (𝒙) = (−𝟑𝒙𝟓 − 𝟐𝒙𝟒 + 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )
𝟒

𝒙𝟐 (𝒙 − 𝟏)𝟐 𝟏 𝟓
𝑩𝟎 (𝒙) = (𝒙 + 𝟏) = (𝒙 − 𝒙𝟒 − 𝒙𝟑 + 𝒙𝟐 )
𝟒 𝟒

𝑩𝟏 (𝒙) = (𝒙 − 𝟎)(𝟏 − 𝒙𝟐 )𝟐 = 𝒙𝟓 − 𝟐𝒙𝟑 + 𝒙

𝒙𝟐 (𝒙 + 𝟏)𝟐 𝟏 𝟓
𝑩𝟐 (𝒙) = (𝒙 − 𝟏) = (𝒙 + 𝒙𝟒 − 𝒙𝟑 − 𝒙𝟐 )
𝟒 𝟒

Using above values in Eq. (1), we get

𝟏
𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = (𝟑𝒙𝟓 − 𝟐𝒙𝟒 − 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )(𝟏) + (𝟏 − 𝟐𝒙𝟐 + 𝒙𝟒 )(𝟏)
𝟒
𝟏 𝟏
+ (−𝟑𝒙𝟓 − 𝟐𝒙𝟒 + 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )(𝟑) + (𝒙𝟓 − 𝒙𝟒 − 𝒙𝟑 + 𝒙𝟐 )(−𝟓)
𝟒 𝟒

𝟏
+( 𝒙𝟓 − 𝟐𝒙𝟑 + 𝒙)(𝟏) + (𝒙𝟓 + 𝒙𝟒 − 𝒙𝟑 − 𝒙𝟐 )(𝟕)
𝟒

⟹ 𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝟐𝒙𝟒 − 𝒙𝟐 + 𝒙 + 𝟏

Hence

𝟏 𝟒 𝟏 𝟐 𝟏 𝟏𝟏
𝒚(𝟎. 𝟓) = 𝒇(𝟎. 𝟓) ≅ 𝑷(𝟎. 𝟓) = 𝟐 ( ) − ( ) + + 𝟏 =
𝟐 𝟐 𝟐 𝟖

Dr. Jamil Book Series 2 Page 95


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟏 𝟒 𝟏 𝟐 𝟏 𝟑
𝒚(−𝟎. 𝟓) = 𝒇(−𝟎. 𝟓) ≅ 𝑷(−𝟎. 𝟓) = 𝟐 (− ) − (− ) − + 𝟏 =
𝟐 𝟐 𝟐 𝟖

Example # 12:-
From the following data find 𝑷𝟓 (𝒙) using Hermite’s interpolation formula and hence
determine 𝒚(𝟎. 𝟓) = 𝑷𝟓 (𝟎. 𝟓).

𝒙 𝒚 = 𝒇(𝒙) 𝒚′ = 𝒇′(𝒙)

−𝟏 𝒙𝟎 𝟏 𝒚𝟎 −𝟏 𝒚′𝟎

𝟎 𝒙𝟏 𝟎 𝒚𝟏 𝟏 𝒚′𝟏

𝟏 𝒙𝟐 𝟏 𝒚𝟐 𝟎 𝒚′𝟐

Solution:-
The Hermite’s interpolation polynomial formula of degree at most 5 is given by (here
𝒏 = 𝟐)
𝟐 𝟐

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷𝟓 (𝒙) = ∑ 𝑨𝒊 (𝒙)𝒚𝒊 + ∑ 𝑩𝒊 (𝒙)𝒚′𝒊


𝒊=𝟎 𝒊=𝟎
where
𝑨𝒊 (𝒙) = [𝟏 − 𝟐𝑳′𝒊 (𝒙𝒊 )(𝒙 − 𝒙𝒊 )][𝑳𝒊 (𝒙)]𝟐

𝑩𝒊 (𝒙) = (𝒙 − 𝒙𝒊 )[𝑳𝒊 (𝒙)]𝟐

we have:
𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷𝟓 (𝒙) = 𝑨𝟎 (𝒙)𝒚𝟎 + 𝑨𝟏 (𝒙)𝒚𝟏 + 𝑨𝟐 (𝒙)𝒚𝟐 + 𝑩𝟎 (𝒙)𝒚′ 𝟎 + 𝑩𝟏 (𝒙)𝒚′ 𝟏
+𝑩𝟐 (𝒙)𝒚′𝟐 (1)

Since the values of 𝒙 given are same as in the (Example#11) there is no change in
𝑨𝟎 , 𝑨𝟏 , 𝑨𝟐 , 𝑩𝟎 , 𝑩𝟏 and 𝑩𝟐 . Hence
𝟏
𝒚 = 𝒇(𝒙) = 𝑷𝟓 (𝒙) = (𝟑𝒙𝟓 − 𝟐𝒙𝟒 − 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )(𝟏) + (𝟏 − 𝟐𝒙𝟐 + 𝒙𝟒 )(𝟎)
𝟒
𝟏 𝟏
+ (−𝟑𝒙𝟓 − 𝟐𝒙𝟒 + 𝟓𝒙𝟑 + 𝟒𝒙𝟐 )(𝟏) + (𝒙𝟓 − 𝒙𝟒 − 𝒙𝟑 + 𝒙𝟐 )(−𝟏)
𝟒 𝟒

𝟏
+( 𝒙𝟓 − 𝟐𝒙𝟑 + 𝒙)(𝟏) + (𝒙𝟓 + 𝒙𝟒 − 𝒙𝟑 − 𝒙𝟐 )(𝟎)
𝟒

𝟏
𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷𝟓 (𝒙) = (𝟑𝒙𝟓 − 𝟑𝒙𝟒 − 𝟕𝒙𝟑 + 𝟕𝒙𝟐 + 𝟒𝒙)
𝟒

Therefore

Dr. Jamil Book Series 2 Page 96


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟏
𝒚(𝟎. 𝟓) = 𝒇(𝟎. 𝟓) ≅ 𝑷𝟓 (𝟎. 𝟓) = [𝟑(𝟎. 𝟓)𝟓 − 𝟑(𝟎. 𝟓)𝟒 − 𝟕(𝟎. 𝟓)𝟑 + 𝟕(𝟎. 𝟓)𝟐 + 𝟒(𝟎. 𝟓)]
𝟒

𝒚(𝟎. 𝟓) = 𝒇(𝟎. 𝟓) ≅ 𝑷𝟓 (𝟎. 𝟓) = 𝟎. 𝟔𝟗𝟓𝟑𝟏𝟐𝟓

Drill Excercise # 7:-


Using Hermite’s interpolation, find a cubic polynomial from the data below, also find 𝒚(𝟎. 𝟓) =
𝒇(𝟎. 𝟓).

𝒙 𝟎 𝟏

𝒚 = 𝒇(𝒙) 𝟎 𝟏

𝒚′ = 𝒇′(𝒙) 𝟎 𝟏

Answer:-
𝟑
𝒚 = 𝒚(𝒙) = 𝒇(𝒙) = 𝟐𝒙𝟐 − 𝒙𝟑 , 𝒇(𝟎. 𝟓) =
𝟖

Drill Excercise # 8:-


Using Hermite’s interpolation, find 𝒚 = 𝒇(𝒙) given in the table below and obtain 𝒚(𝟎. 𝟓) =
𝒇(𝟎. 𝟓).

𝒙 0 1

𝒚 = 𝒇(𝒙) 1 1

𝒚′ = 𝒇′(𝒙) 0 1

Answer:-
𝟕
𝒇(𝟎. 𝟓) =
𝟖

Dr. Jamil Book Series 2 Page 97


Advanced Mathematical Techniques Chapter# 3 Interpolation

Lines, Parabolas & Cubic Curves

S.N. Linear, First Degree Parabolic, Second Cubic Equation, 3rd Degree
Equation Degree, Quadratic Equation
Equation

𝒂𝒙 + 𝒃 = 𝟎 𝒂𝒙𝟐 + 𝒃𝒙 + 𝒄 = 𝟎 𝒂𝒙𝟑 + 𝒃𝒙𝟐 + 𝒄𝒙 + 𝒅 = 𝟎

Dr. Jamil Book Series 2 Page 98


Advanced Mathematical Techniques Chapter# 3 Interpolation

6): Cubic Spline Interpolation Polynomial Method


Introduction:-
We are given the (𝒏 + 𝟏) data points (𝒙𝒊 , 𝒚𝒊 ), 𝒊 = 𝟎, 𝟏, 𝟐, … … , 𝒏

Our aim is to find the value of 𝒚 corresponding to 𝒙, where 𝒙𝒊−𝟏 < 𝒙 < 𝒙𝒊 , 𝒊 = 𝟎, 𝟏, 𝟐, … . . 𝒏,
by using a smooth polynomial curve. We have already seen many methods. A recent one
which is becoming important is the spline-fitting.

Dr. Jamil Book Series 2 Page 99


Advanced Mathematical Techniques Chapter# 3 Interpolation

Assumption for Cubic Spline Polynomial 𝑺(𝒙):-


1): 𝑺(𝒙) is a polynomial of degree one for 𝒙 < 𝒙𝟎 and 𝒙 > 𝒙𝒏 .

2): 𝑺(𝒙) is at most a cubic polynomial in each interval (𝒙𝒊−𝟏 , 𝒙𝒊 ), 𝒊 = 𝟏, 𝟐, … . , 𝒏.

3): 𝑺(𝒙), 𝑺′(𝒙) and 𝑺"(𝒙)are continuous at each point (𝒙𝒊 , 𝒚𝒊 ), 𝒊 = 𝟎, 𝟏, 𝟐, … . 𝒏.

4): 𝑺(𝒙𝒊 ) = 𝒚𝒊 , 𝒊 = 𝟎, 𝟏, 𝟐, … . , 𝒏.

Cubic Spline Interpolation Polynomial Method:-


The cubic spline interpolation polynomial 𝑺(𝒏) in the 𝒊𝒕𝒉 interval (𝒙𝒊−𝟏 , 𝒙𝒊 ) is given by

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐, 𝟑, … , 𝒏 (1)
𝟔

𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = 𝒉𝟐 [𝒚𝒊−𝟏 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ], 𝒊 = 𝟏, 𝟐, 𝟑, … , 𝒏 − 𝟏 (2)

and

𝑴𝟎 = 𝑴𝒏 = 𝟎 (3)

Equations (2) and (3) give (𝒏 + 𝟏) equations in (𝒏 + 𝟏) unknowns, 𝑴𝟎 , 𝑴𝟏 , 𝑴𝟐 , … . , 𝑴𝒏 .


Hence, we can solve for 𝑴𝟎 , 𝑴𝟏 , 𝑴𝟐 , … . , 𝑴𝒏 , substituting in (1), we get the cubic spline in
each interval.
Note:-
Some authors do not assume linearity of 𝑺(𝒙) for 𝒙 < 𝒙𝟎 and 𝒙 > 𝒙𝒏 .In that case 𝑴𝟎 , 𝑴𝒏
will not be zero.
Examples

Points Range of Eq. (1) 𝑴 𝟎 = 𝑴𝒏 = 𝟎 Range of Eq. (2)

9 𝒊 = 𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔, 𝟕, 𝟖 𝑴 𝟎 = 𝑴𝟖 = 𝟎 𝒊 = 𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔, 𝟕
𝑴𝟏 , 𝑴𝟐 , 𝑴𝟑 , 𝑴𝟒 , 𝑴𝟓 , 𝑴𝟔 , 𝑴𝟕
7 𝒊 = 𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔 𝑴 𝟎 = 𝑴𝟔 = 𝟎 𝒊 = 𝟏, 𝟐, 𝟑, 𝟒, 𝟓
𝑴𝟏 , 𝑴𝟐 , 𝑴𝟑 , 𝑴𝟒 , 𝑴𝟓
5 𝒊 = 𝟏, 𝟐, 𝟑, 𝟒 𝑴 𝟎 = 𝑴𝟒 = 𝟎 𝒊 = 𝟏, 𝟐, 𝟑
𝑴𝟏 , 𝑴𝟐 , 𝑴𝟑
3 𝒊 = 𝟏, 𝟐 𝑴 𝟎 = 𝑴𝟐 = 𝟎 𝒊=𝟏
𝑴𝟏

Dr. Jamil Book Series 2 Page 100


Advanced Mathematical Techniques Chapter# 3 Interpolation

Example # 13:-
From the following table:

𝒙 1 2 3
𝒙𝟎 𝒙𝟏 𝒙𝟐

𝒚(𝒙) -8 -1 18
𝒚𝟎 𝒚𝟏 𝒚𝟐

Compute 𝒚(𝟏. 𝟓)and 𝒚′(𝟏),using Cubic Spline.


Solution:-
Here 𝒉 = 𝟏 , (𝐧𝐨. 𝐨𝐟 𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥)𝒏 = 𝟐, then 𝑴𝟎 = 𝑴𝟐 = 𝟎. We have
𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = 𝟐 [𝒚𝒊−𝟏 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ], 𝒊=𝟏
𝒉

For 𝒊 = 𝟏, we get:-
𝟔
⟹ 𝑴𝟎 + 𝟒𝑴𝟏 + 𝑴𝟐 = [𝒚 − 𝟐𝒚𝟏 + 𝒚𝟐 ]
𝟏𝟐 𝟎

⟹ 𝟒𝑴𝟏 = 𝟔[−𝟖 − 𝟐(−𝟏) + 𝟏𝟖] = 𝟕𝟐

⟹ 𝑴𝟏 = 𝟏𝟖

The cubic spline interpolation polynomial is given by

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐 (1)
𝟔

For 𝟏 ≤ 𝒙 ≤ 𝟐, Putting 𝒊 = 𝟏, in Eq. (1), we get:-


𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝟏 − 𝒙) 𝑴𝟎 + (𝒙 − 𝒙𝟎 ) 𝑴𝟏 ] + (𝒙𝟏 − 𝒙) [𝒚𝟎 − 𝑴𝟎 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟎 ) [𝒚𝟏 − 𝑴𝟏 ]
𝒉 𝟔
Substituting the values, we get

𝟏 𝟏 𝟏 𝟏
𝑺(𝒙) = [𝟎 + (𝟐 − 𝒙)(−𝟖 − 𝟎) + (𝒙 − 𝟏)[−𝟏 − (𝟏𝟖)]
𝟔 𝟏 𝟏 𝟔

Dr. Jamil Book Series 2 Page 101


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟏
𝑺(𝒙) = [𝟏𝟖(𝒙 − 𝟏)𝟑 ] + (𝟐 − 𝒙)(−𝟖) + (𝒙 − 𝟏)(−𝟒)
𝟔𝒉

𝑺(𝒙) = 𝟑(𝒙 − 𝟏)𝟑 + 𝟒𝒙 − 𝟏, For 𝟏 ≤ 𝒙 ≤ 𝟐

𝑺(𝒙) = 𝟑𝒙𝟑 − 𝟗𝒙𝟐 + 𝟏𝟑𝒙 − 𝟏𝟓 , For 𝟏 ≤ 𝒙 ≤ 𝟐

Hence
−𝟒𝟓
𝒚(𝟏. 𝟓) ≅ 𝑺(𝟏. 𝟓) = 𝟑(𝟏. 𝟓)𝟑 − 𝟗(𝟏. 𝟓)𝟐 + 𝟏𝟑(𝟏. 𝟓) − 𝟏𝟓 =
𝟖
𝟒𝟓
𝒚(𝟏. 𝟓) = −
𝟖
and

𝒚′ (𝒙) ≅ 𝑺′ (𝒙) = 𝟗𝒙𝟐 − 𝟏𝟖𝒙 + 𝟏𝟑

Therefore

𝒚′ (𝟏) = 𝑺′ (𝟏) = 𝟗(𝟏)𝟐 − 𝟏𝟖(𝟏) + 𝟏𝟑 = 𝟒

Note:-
We can also find 𝑺(𝒙) in the interval (𝟐, 𝟑)using equation (1) for 𝒊 = 𝟐. Since 𝒚(𝟏. 𝟓) is
required, we have not cared to find 𝑺(𝒙) in (𝟐, 𝟑).

Example # 14:-
Using Cubic Spline, find 𝒚(𝟎. 𝟓) and 𝒚′(𝟏) given that 𝑴𝟎 = 𝑴𝟐 = 𝟎 and the table:

𝒙 0 1 2
𝒙𝟎 𝒙𝟏 𝒙𝟐

𝒚(𝒙) -5 -4 3
𝒚𝟎 𝒚𝟏 𝒚𝟐

Solution:-
Here 𝒉 = 𝟏 and (𝐧𝐨. 𝐨𝐟 𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥)𝒏 = 𝟐 and 𝑴𝟎 = 𝑴𝟐 = 𝟎. We have
𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = [𝒚 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ], 𝒊=𝟏
𝒉𝟐 𝒊−𝟏

For 𝒊 = 𝟏, we get:-
𝟔
𝑴𝟎 + 𝟒𝑴𝟏 + 𝑴𝟐 = [𝒚 − 𝟐𝒚𝟏 + 𝒚𝟐 ]
𝟏𝟐 𝟎

Dr. Jamil Book Series 2 Page 102


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟒𝑴𝟏 = 𝟔[−𝟓 − 𝟐(−𝟒) + 𝟑] = 𝟑𝟔

⟹ 𝟒𝑴𝟏 = 𝟑𝟔

⟹ 𝑴𝟏 = 𝟗

The cubic spline interpolation polynomial is given by

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐 (1)
𝟔

For 𝟎 ≤ 𝒙 ≤ 𝟏, Putting 𝒊 = 𝟏, in Eq. (1), we get:-


𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝟏 − 𝒙) 𝑴𝟎 + (𝒙 − 𝒙𝟎 ) 𝑴𝟏 ] + (𝒙𝟏 − 𝒙) [𝒚𝟎 − 𝑴𝟎 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟎 ) [𝒚𝟏 − 𝑴 ]
𝒉 𝟔 𝟏
Substituting the values, we get

𝟏 𝟗
⟹ 𝑺(𝒙) = [𝟎 + (𝒙 − 𝟎)𝟑 (𝟗)] + (𝟏 − 𝒙)(−𝟓 − 𝟎) + (𝒙 − 𝟎) (−𝟒 − )
𝟔 𝟔

𝟑 𝟑𝟑
⟹ 𝑺(𝒙) = (𝒙)𝟑 − 𝟓(𝟏 − 𝒙) − 𝒙
𝟐 𝟔

𝟑 𝒙
⟹ 𝑺(𝒙) = (𝒙)𝟑 − − 𝟓 , For 𝟎 ≤ 𝒙 ≤ 𝟏
𝟐 𝟐

𝟑 𝟏 𝟑 𝟏 𝟏 𝟖𝟏
⟹ 𝒚(𝟎. 𝟓) ≅ 𝑺(𝟎. 𝟓) = ( ) − ( ) ( ) − 𝟓 = −
𝟐 𝟐 𝟐 𝟐 𝟏𝟔
and
𝟗 𝟏
𝒚′ (𝒙) ≅ 𝑺′ (𝒙) = (𝒙)𝟐 − ( )
𝟐 𝟐
Therefore
𝟗 𝟏
𝒚′(𝟏) ≅ 𝑺′(𝟏) = (𝟏)𝟐 − ( ) = 𝟒
𝟐 𝟐

Dr. Jamil Book Series 2 Page 103


Advanced Mathematical Techniques Chapter# 3 Interpolation

Example # 15:-
Find the Cubic Spline Interpolation Polynomial for the data given below under the conditions
𝑴(𝟎) = 𝑴(𝟑) = 𝟎 and valid in the sub-interval [𝟏, 𝟐]. Hence find 𝒇(𝟏. 𝟓):

𝒙 𝟎 𝟏 𝟐 𝟑
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑
𝒚 = 𝒇(𝒙) 𝟏 𝟒 𝟏𝟎 𝟖
𝒚𝟎 𝒚𝟏 𝒚𝟐 𝒚𝟑

Answer:-
Here 𝒉 = 𝟏, (𝐧𝐨. 𝐨𝐟 𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥)𝒏 = 𝟑 and 𝑴𝟎 = 𝑴𝟑 = 𝟎. We have

𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = [𝒚𝒊−𝟏 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ] , 𝒊 = 𝟏, 𝟐
𝒉𝟐

For 𝒊 = 𝟏, 𝟐 in above equation, we get:-

𝟔
𝑴𝒐 + 𝟒𝑴𝟏 + 𝑴𝟐 = [𝒚𝟎 − 𝟐𝒚𝟏 + 𝒚𝟐 ]
𝒉𝟐

𝟔
𝑴𝟏 + 𝟒𝑴𝟐 + 𝑴𝟑 = [𝒚𝟏 − 𝟐𝒚𝟐 + 𝒚𝟑 ]
𝒉𝟐

Since 𝑴𝟎 = 𝑴𝟑 = 𝟎 𝒂𝒏𝒅 𝒉 = 𝟏, and substituting values, we get

⇒ 𝟒𝑴𝟏 + 𝑴𝟐 = 𝟔(𝟏 − 𝟐(𝟒) + 𝟏𝟎) = 𝟏𝟖 ⇒ 𝟒𝑴𝟏 + 𝑴𝟐 = 𝟏𝟖

⇒ 𝑴𝟏 + 𝟒𝑴𝟐 = 𝟔(𝟐 − 𝟐(𝟏𝟎) + 𝟖) = −𝟒𝟖 ⇒ 𝑴𝟏 + 𝟒𝑴𝟐 = −𝟒𝟖

Solving simultaneously, we get 𝑴𝟏 = 𝟖 , 𝑴𝟐 = −𝟏𝟒. The cubic Spline interpolation


Polynomial is given by:

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐,3 (1)
𝟔

For 𝟏 ≤ 𝒙 ≤ 𝟐 , Putting 𝒊 = 𝟐 in Eq. (1), we get:-

𝟏 𝟑 𝟑 𝟏 𝒉𝟐
𝑺(𝒙) = 𝟔𝒉 [(𝒙𝟐 − 𝒙) 𝑴𝟏 + (𝒙 − 𝒙𝟏 ) 𝑴𝟐 ] + 𝒉 (𝒙𝟐 − 𝒙) [𝒚𝟏 − 𝑴𝟏 ]
𝟔

𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟐 ) [𝒚𝟐 − 𝑴 ]
𝒉 𝟔 𝟐
Dr. Jamil Book Series 2 Page 104
Advanced Mathematical Techniques Chapter# 3 Interpolation

Substituting values, we have

𝟏 𝟏 𝟏 𝟏 𝟏𝟒
𝑺(𝒙) = [(𝟐 − 𝒙)𝟑 . 𝟖 + (𝒙 − 𝟏)𝟑 (−𝟏𝟒)] + (𝟐 − 𝒙) [𝟒 − 𝟖] + (𝒙 − 𝟐) [𝟏𝟎 + ]
𝟔 𝟏 𝟔 𝟏 𝟔

𝟏
𝒚(𝒙) = 𝒇(𝒙) = 𝑺(𝒙) = (−𝟏𝟏𝒙𝟑 + 𝟒𝟓𝒙𝟐 − 𝟒𝟎𝒙 + 𝟏𝟖), 𝐅𝐨𝐫 𝟏 ≤ 𝒙 ≤ 𝟐 → (𝟐)
𝟑

For 𝒚(𝟏. 𝟓) we use Eq. (2), therefore

𝟏
𝒚(𝟏. 𝟓) = 𝑺(𝟏. 𝟓) = {−𝟏𝟏(𝟏. 𝟓)𝟑 + 𝟒𝟓(𝟏. 𝟓)𝟐 − 𝟒𝟎(𝟏. 𝟓) + 𝟏𝟖} = 𝟕. 𝟑𝟕𝟓
𝟑

Example # 16:-
Find the Cubic Spline Polynomial in each interval for the function given below:

𝒙 0 1 2 3
𝒙𝟎 𝒙𝟏 𝒙𝟐 𝒙𝟑

𝒚 = 𝒇(𝒙) 1 2 33 244
𝒚𝟎 𝒚𝟏 𝒚𝟐 𝒚𝟑

Assume 𝑴(𝟎) = 𝑴(𝟑) = 𝟎, 𝐀𝐥𝐬𝐨 𝐟𝐢𝐧𝐝 𝐟(𝟐. 𝟓)


Solution:-
Here 𝒉 = 𝟏, (𝐧𝐨. 𝐨𝐟 𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥)𝒏 = 𝟑 and 𝑴𝟎 = 𝑴𝟑 = 𝟎. We have

𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = [𝒚𝒊−𝟏 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ] , 𝒊 = 𝟏, 𝟐
𝒉𝟐

For 𝒊 = 𝟏, 𝟐 in above equation, we get:-


𝟔
𝑴𝒐 + 𝟒𝑴𝟏 + 𝑴𝟐 = [𝒚𝟎 − 𝟐𝒚𝟏 + 𝒚𝟐 ]
𝒉𝟐

𝟔
𝑴𝟏 + 𝟒𝑴𝟐 + 𝑴𝟑 = [𝒚𝟏 − 𝟐𝒚𝟐 + 𝒚𝟑 ]
𝒉𝟐

Since 𝑴𝟎 = 𝑴𝟑 = 𝟎, and substituting values, we get

⇒ 𝟒𝑴𝟏 + 𝑴𝟐 = 𝟔(𝟏 − 𝟒 + 𝟑𝟑) = 𝟏𝟖𝟎

⇒ 𝑴𝟏 + 𝟒𝑴𝟐 = 𝟔(𝟐 − 𝟔𝟔 + 𝟐𝟒𝟒) = 𝟏𝟎𝟖𝟎

Dr. Jamil Book Series 2 Page 105


Advanced Mathematical Techniques Chapter# 3 Interpolation

Solving simultaneously, we get 𝑴𝟏 = −𝟐𝟒 , 𝑴𝟐 = 𝟐𝟕𝟔. The cubic Spline interpolation


Polynomial is given by:

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐, 𝟑 (1)
𝟔

1): For 𝟎 ≤ 𝒙 ≤ 𝟏 , Putting 𝒊 = 𝟏 in Eq. (1), we get:-

We get
𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝟏 − 𝒙) 𝑴𝟎 + (𝒙 − 𝒙𝟎 ) 𝑴𝟏 ] + (𝒙𝟏 − 𝒙) [𝒚𝟎 − 𝑴𝟎 ]
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟎 ) [𝒚𝟏 − 𝑴𝟏 ]
𝒉 𝟔

Substituting values we have,

𝟏 𝟏 (−𝟐𝟒)
⇒ 𝑺(𝒙) = [(𝟏 − 𝒙)𝟑 (𝟎) + (𝒙 − 𝟎)𝟑 (−𝟐𝟒) + (𝟏 − 𝒙) [𝟏 − (𝟎)] + (𝒙 − 𝟎)[𝟐 − ]
𝟔 𝟔 𝟔

⇒ 𝑺(𝒙) = −𝟒𝒙𝟑 + (𝟏 − 𝒙) + 𝟔𝒙

⇒ 𝑺(𝒙) = −𝟒𝒙𝟑 + 𝟓𝒙 + 𝟏 , 𝑭𝒐𝒓 𝟎 ≤ 𝒙 ≤ 𝟏 (2)

2): For 𝟏 ≤ 𝒙 ≤ 𝟐 , Putting 𝒊 = 𝟐 in Eq. (1), we get:-


𝟏 𝟑 𝟑 𝟏 𝒉𝟐
𝑺(𝒙) = 𝟔𝒉 [(𝒙𝟐 − 𝒙) 𝑴𝟏 + (𝒙 − 𝒙𝟏 ) 𝑴𝟐 ] + 𝒉 (𝒙𝟐 − 𝒙) [𝒚𝟏 − 𝑴𝟏 ]
𝟔

𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟐 ) [𝒚𝟐 − 𝑴 ]
𝒉 𝟔 𝟐
Substituting values, we have

𝑺(𝒙) = 𝟏/𝟔[(𝟐 − 𝒙)𝟑 (−𝟐𝟒) + (𝒙 − 𝟏) (𝟐𝟕𝟔)] + (𝟐 − 𝒙)[𝟐 − (−𝟐𝟒/𝟔)]


+ (𝒙 − 𝟏)[𝟑𝟑 − 𝟐𝟕𝟔/𝟔]

⇒ 𝑺(𝒙) = 𝟓𝟎𝒙𝟑 − 𝟏𝟔𝟐𝒙𝟐 + 𝟏𝟔𝟕𝒙 − 𝟓𝟑, 𝑭𝒐𝒓 𝟏 ≤ 𝒙 ≤ 𝟐 (3)

3): For 𝟐 ≤ 𝒙 ≤ 𝟑 , Putting 𝒊 = 𝟑 in Eq. (1), we get:-


We get

Dr. Jamil Book Series 2 Page 106


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟏 𝟑 𝟑 𝟑 𝟏 𝒉𝟐
𝑺(𝒙) = 𝟔𝒉 [(𝒙 − 𝒙) 𝑴𝟐 + (𝒙 − 𝒙𝟐 ) 𝑴𝟑 ] + 𝒉 (𝒙𝟑 − 𝒙) [𝒚𝟐 − 𝑴𝟐 ]
𝟔

𝟏 𝒉𝟐
+ (𝒙 − 𝒙𝟐 ) [𝒚𝟑 − 𝑴 ]
𝒉 𝟔 𝟑

Substituting values, we have

𝟏 𝟏 𝟏
⇒ 𝑺(𝒙) = [(𝟑 − 𝒙)𝟑 (𝟐𝟕𝟔) + (𝒙 − 𝟐)𝟑 (𝟎)] +(𝟑 − 𝒙) [𝟑𝟑 − (𝟐𝟕𝟔)] + (𝒙 − 𝟐)[𝟐𝟒𝟒 − (𝟎)]
𝟔 𝟔 𝟔

⇒ 𝑺(𝒙) = 𝟒𝟔(𝟑 − 𝒙)𝟑 − 𝟏𝟑(𝟑 − 𝒙) + 𝟐𝟒𝟒(𝒙 − 𝟐)

⇒ 𝑺(𝒙) = 𝟒𝟔[𝟐𝟕 − 𝟐𝟕𝒙 + 𝟗𝒙𝟐 − 𝒙𝟑 ] − 𝟑𝟗 + 𝟏𝟑𝒙 + 𝟐𝟒𝟒𝒙 − 𝟒𝟖𝟖

⇒ 𝑺(𝒙) = −𝟒𝟔𝒙𝟑 + 𝟒𝟏𝟒𝒙𝟐 − 𝟗𝟖𝟓𝒙 + 𝟕𝟏𝟓 , 𝑭𝒐𝒓 𝟐 ≤ 𝒙 ≤ 𝟑 (4)

Equations (2), (3) and (4) give the cubic Spline Polynomial in each sub-interval.
For 𝒚(𝟐. 𝟓) we use eq (4), therefore

𝒚(𝟐. 𝟓) = 𝑺(𝟐. 𝟓) = −𝟒𝟔(𝟐. 𝟓)𝟑 + 𝟒𝟏𝟒(𝟐. 𝟓)𝟐 − 𝟗𝟖𝟓(𝟐. 𝟓) + 𝟕𝟏𝟓

⇒ 𝒚(𝟐. 𝟓) ≅ 𝑺(𝟐. 𝟓) = 𝟏𝟐𝟏. 𝟐𝟓

Drill Excercise # 9:-


Find the cubic spline polynomial in [𝟎, 𝟏] for the following data:
𝒙 𝟎 𝟏 𝟐
𝒚 = 𝒇(𝒙) 𝟎 𝟐 𝟔

Also find 𝒚(𝟎. 𝟓) and 𝒚′(𝟏)

Answer:-
𝟏
𝑴𝟏 = 𝟑 , 𝑰𝒏 [𝟎, 𝟏] , 𝑺(𝒙) = (𝟑𝒙 + 𝒙𝟑 )
𝟐
𝟏𝟑
𝒚(𝟎. 𝟓) = , 𝒚′ (𝟏) = 𝟑
𝟏𝟔

Dr. Jamil Book Series 2 Page 107


Advanced Mathematical Techniques Chapter# 3 Interpolation

Drill Excercise # 10:-


Find the cubic spline polynomial for the data:
𝒙 𝟎 𝟏 𝟐

𝒚 = 𝒇(𝒙) 𝟎 𝟏 𝟎

Also find 𝒚(𝟎. 𝟓) and 𝒚′ (𝟏).


Answer:-
𝟏
𝑰𝒏 [𝟎, 𝟏] , 𝑴𝟏= − 𝟑 , 𝑺(𝒙) = (𝟑𝒙 − 𝒙𝟑 )
𝟐
𝟏𝟏
𝒚(𝟎. 𝟓) = , 𝒚′ (𝟏) = 𝟎
𝟔

Drill Excercise # 11:-


Make a Mathematical model through Cubic Spline Polynomial 𝑺(𝒙), 𝟐 ≤ 𝒙 ≤ 𝟒 for the given
table. Also find 𝒇(𝟑):(assume that 𝑴𝟎 = 𝟎, 𝑴𝟑 = −𝟏𝟐)

𝒙 0 2 4 6

𝒚(𝒙) 1 9 41 41

At the end put down your conclusions and express suitable interpretation either
physical/geometrical/technical or Mechanical on your method or results. What is your
understanding! Is 𝒇(𝟑) determination form Cubic Spline procedure in your thinking is the best
? Why ?

Dr. Jamil Book Series 2 Page 108


Advanced Mathematical Techniques Chapter# 3 Interpolation

Important Example# 17(Uniquness of Polynomial Proof):-


From the following data:

𝒙 𝟎 𝒙𝟎 𝟏 𝒙𝟏 𝟑 𝒙𝟐 4 𝒙𝟑

𝒚 = 𝒇(𝒙) −𝟏𝟐 𝒚𝟎 𝟎 𝒚𝟏 𝟏𝟐 𝒚𝟐 12 𝒚𝟑

Use any two different method to find the polynomial passing through the data and prove
that the Polynomial is unique form any two different methods.
Solution:-
1): From Newton’s Divided Interpolation Plynomial Method:-
“Divided difference table”

𝒙 𝒇 𝜟𝒇 ∆𝟐 𝒇 ∆𝟑 𝒇

0 -12

12
1 0 -2

6 1
3 12 2

12
4 24

From the above table, we have


𝒇(𝒙𝟎 ) = −𝟏𝟐, 𝒇[𝒙𝟎 , 𝒙𝟏 ] = 𝟏𝟐, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ] = −𝟐, 𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] = 𝟏

The Newton’s divided difference interpolation polynominal formula is given by

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒇(𝒙𝟎 ) + (𝒙 − 𝒙𝟎 )𝒇[𝒙𝟎 , 𝒙𝟏 ] + (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ]

+(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ]

Substituting values, we get

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = −𝟏𝟐 + (𝒙 − 𝟎) (𝟏𝟐) + (𝒙 − 𝟎) (𝒙 − 𝟏) (−𝟐)


+ (𝒙 − 𝟎) (𝒙 − 𝟏) (𝒙 − 𝟑)(𝟏)

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = −𝟏𝟐 + 𝟏𝟐𝒙 − 𝟐𝒙𝟐 + 𝟐𝒙 + 𝒙𝟑 − 𝟒𝒙𝟐 + 𝟑𝒙

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒙𝟑 − 𝟔𝒙𝟐 + 𝟏𝟕𝒙 − 𝟏𝟐


(1)

Dr. Jamil Book Series 2 Page 109


Advanced Mathematical Techniques Chapter# 3 Interpolation

This is the required Newton’s divided interpolation polynomial. Also

2): From Lagrange’s Interplation Plynomial Method:-

The Lagrange’s interpolation polynomial formula of degree at most 3 is given by (here 𝒏 =


𝟑):
𝟑

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊


𝒊=𝟎

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = 𝑳𝟎 (𝒙)𝒚𝟎 + 𝑳𝟏 (𝒙)𝒚𝟏 + 𝑳𝟐 (𝒙)𝒚𝟐 + 𝑳𝟑 (𝒙)𝒚𝟑 (2)

Now
(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟏)(𝒙 − 𝟑)(𝒙 − 𝟒)
𝑳𝟎 (𝒙) = =
(𝒙𝟎 − 𝒙𝟏 )(𝒙𝟎 − 𝒙𝟐 )(𝒙𝟎 − 𝒙𝟑 ) (𝟎 − 𝟏)(𝟎 − 𝟑)(𝟎 − 𝟒)

−𝟏 𝟑
𝑳𝟎 (𝒙) = (𝒙 − 𝟖𝒙𝟐 + 𝟏𝟗𝒙 − 𝟏𝟐)
𝟏𝟐

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟎)(𝒙 − 𝟑)(𝒙 − 𝟒) 𝟏 𝟑


𝑳𝟏 (𝒙) = = = (𝒙 − 𝟕𝒙𝟐 + 𝟏𝟐𝒙)
(𝒙𝟏 − 𝒙𝟎 )(𝒙𝟏 − 𝒙𝟐 )(𝒙𝟏 − 𝒙𝟑 ) (𝟏 − 𝟎)(𝟏 − 𝟑)(𝟏 − 𝟒) 𝟔

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟑 ) (𝒙 − 𝟎)(𝒙 − 𝟏)(𝒙 − 𝟒) −𝟏 𝟑


𝑳𝟐 (𝒙) = = = (𝒙 − 𝟓𝒙𝟐 + 𝟒𝒙)
(𝒙𝟐 − 𝒙𝟎 )(𝒙𝟐 − 𝒙𝟏 )(𝒙𝟐 − 𝒙𝟑 ) (𝟑 − 𝟎)(𝟑 − 𝟏)(𝟑 − 𝟒) 𝟔

(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 ) (𝒙 − 𝟎)(𝒙 − 𝟏)(𝒙 − 𝟑) 𝟏 𝟑


𝑳𝟑 (𝒙) = = = (𝒙 − 𝟒𝒙𝟐 + 𝟑𝒙)
(𝒙𝟑 − 𝒙𝟎 )(𝒙𝟑 − 𝒙𝟏 )(𝒙𝟑 − 𝒙𝟐 ) (𝟒 − 𝟎)(𝟒 − 𝟏)(𝟒 − 𝟑) 𝟏𝟐

Substituting these values in Eq. (1), we get

𝟏 𝟑 𝟏
𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = − (𝒙 − 𝟖𝒙𝟐 + 𝟏𝟗𝒙 − 𝟐)(−𝟏𝟐) + (𝒙𝟑 − 𝟕𝒙𝟐 + 𝟏𝟐𝒙)(𝟎)
𝟏𝟐 𝟔
𝟏 𝟏 𝟑
− (𝒙𝟑 − 𝟓𝒙𝟐 + 𝟒𝒙)(𝟏𝟐) + (𝒙 − 𝟒𝒙𝟐 + 𝟑𝒙)(𝟐𝟒)
𝟔 𝟏𝟐

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒙𝟑 − 𝟖𝒙𝟐 + 𝟏𝟗𝒙 − 𝟏𝟐 − 𝟐𝒙𝟑 + 𝟏𝟎𝒙𝟐 − 𝟖𝒙 + 𝟐𝒙𝟑 − 𝟖𝒙𝟐 + 𝟔𝒙

𝒚 = 𝒇(𝒙) = 𝑷(𝒙) = 𝒙𝟑 − 𝟔𝒙𝟐 + 𝟏𝟕𝒙 − 𝟏𝟐


(3)

This is the required Lagrange’s interpolation polynomial.

Dr. Jamil Book Series 2 Page 110


Advanced Mathematical Techniques Chapter# 3 Interpolation

Conculusion:-
From Eqs.(2) and (3), it is clear that from two different methods the interpolation polynomial
passes through same data is same that is Unique. This prove the first segment of the theorem
that Polynomial is Unique.

Comparison of Interpolation Methods


S.N. Methods General Equal Derivative Accuracy type Evaluation Preference
OR Spaced values Process
Unequal 𝒉 Required
Spaced

1 Newton’s Forward NO YES NO High near Easy First


Initial of table

2 Newton’s Backward NO YES NO High near End Easy First


of table

3 Newton’s Divided YES YES NO Normal Less Difficult First

4 Lagrange’s YES YES NO Normal Difficult 2nd

5 Hermite’s YES YES YES High Highly Difficult 3rd

6 Cubic Spline NO YES NO High Highly Difficult 2nd

Drill Excercise # 12:-


The turbidity 𝑸 of an aqueous dispersion of silica changes over time 𝒕. The following data
represent some of the values when the concentration of solid have some particular value is

𝑻𝒊𝒎𝒆 𝒕 (𝑫𝒂𝒚𝒔) 1 3 4 6

𝑻𝒖𝒓𝒃𝒊𝒅𝒊𝒕𝒚 𝑸 (𝒄𝒎 −𝟏 ) -3 9 30 132

(i): Estimate the polynomial 𝑸 (𝒕) using best interpolation method (why) that you think.
(ii): Write Polynomial 𝑸 (𝒕) in simplest form.
(iii): Use this Polynomial to estimate 𝑸 at 𝟓 (𝑫𝒂𝒚𝒔) time.
(iv): Interpret, conclude and compose final remarks on your method & results.

Drill Excercise # 13:-


The following table gives corresponding values of velocity of a Particle at a given distance.

Distance: 𝒙 0 2 3 6 9 10

Velocity: 𝒚(𝒙) 3 7 24 207 714 983

1): Make a Mathematical Model using suitable interpolation polynomial method.


2): Write polynomial in in powers of (𝒙 − 𝟐).
3): Find the velocity for a distance of 8 kilometer.
4): Interpret and conclude your results.

Dr. Jamil Book Series 2 Page 111


Advanced Mathematical Techniques Chapter# 3 Interpolation

EXERCISE-3
Newton’s Interpolation Polynomial Methods

Question # 1:-
Estimate 𝒇(𝟑. 𝟏𝟕) from the following data using newton’s forward interpolation formula:

𝒙 3.1 3.2 3.3 3.4 3.5

𝒚 = 𝒇(𝒙) 0 0.6 1.0 1.2 1.3

Answer:-
𝒇 (𝟑. 𝟏𝟕) = 𝟎. 𝟒𝟑𝟖𝟒

Question # 2:-
Find the forward interpolation polynomial for the data:

𝒙 -1 0 1 2

𝒚 = 𝒇(𝒙) 4 2 2 4

Answer:-
𝒇 (𝒙) = 𝒙𝟐 − 𝒙 + 𝟐

Question # 3:- Assignment

Express 𝒇(𝟒𝟐) from the following data using newton’s backward interpolation formula:

𝒙 20 25 30 35 40 45

𝒚 = 𝒇(𝒙) 354 332 291 260 231 204

Answer:-
𝒇 (𝟒𝟐) = 𝟐𝟏𝟖. 𝟔𝟔𝟑𝟎

Question # 4:-
Given:

𝒙 1 2 3 4 5 6 7 8

𝒚 = 𝒇(𝒙) 1 8 27 64 125 216 343 512

Find
a): 𝒇(𝟏. 𝟓) b): 𝒇(𝟕. 𝟓)

Dr. Jamil Book Series 2 Page 112


Advanced Mathematical Techniques Chapter# 3 Interpolation

Answer:-
𝒇 (𝟏. 𝟓) = 𝟑. 𝟑𝟕𝟓 , 𝒇 (𝟕. 𝟓) = 𝟒𝟐𝟏. 𝟖𝟕𝟓

Question # 5:-
Evaluate 𝒇(𝟏. 𝟏) and 𝒇(𝟒. 𝟓) from the table:

𝒙 0 1 2 3 4 5

𝒚 = 𝒇(𝒙) 0 3 8 15 24 35

Answer:-
𝒇 (𝟏. 𝟏) = 𝟑. 𝟒𝟏, 𝒇 (𝟒. 𝟓) = 𝟐𝟗. 𝟐𝟓

Question # 6:-
Compute 𝒇(𝟎. 𝟐𝟑) and 𝒇(𝟎. 𝟐𝟗) using the following data:

𝒙 0 1 2 3 4 5 6 7

𝒚 = 𝒇(𝒙) 0 7 26 63 124 215 342 511

Answer:-
𝒇 (𝟎. 𝟓) = 𝟐. 𝟑𝟕𝟓, 𝒇(𝟕. 𝟓) = 𝟒𝟓𝟓. 𝟓𝟑𝟑

Question # 7:-
Compute 𝒇(𝟎. 𝟐𝟑) and 𝒇(𝟎. 𝟐𝟗) using the data:

𝒙 0.20 0.22 0.24 0.26 0.28 0.30

y=𝒇(𝒙) 1.6596 1.6698 1.6804 1.6912 1.7024 1.7139

Answer:-
𝒇(𝟎. 𝟐𝟑) = 𝟏. 𝟔𝟕𝟓𝟏, 𝒇(𝟎. 𝟐𝟗) = 𝟏. 𝟕𝟎𝟖𝟏
Question # 8:- Assignment

For the data find the divided difference polynomial and estimate 𝒇(𝟏).

𝒙 -1 0 2 5

𝒚 = 𝒇(𝒙) 7 10 22 235

Answer:-
𝒚 (𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) = 𝟐𝒙𝟑 − 𝒙𝟐 + 𝟏𝟎 , 𝒇 (𝟏) = 𝟏𝟏

Dr. Jamil Book Series 2 Page 113


Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 9:-
Using Newton’s divided difference formula, find the value of 𝒇(𝟐), 𝒇(𝟖) and 𝒇(𝟏𝟓) given
the following table:

𝒙 4 5 7 10 11 13

𝒚 = 𝒇(𝒙) 48 100 294 900 1210 2028

Answer:-
𝒇(𝒙) ≈ 𝑷 (𝒙) = 𝟒𝟖 + 𝟓𝟐 (𝒙 − 𝟒) + 𝟏𝟓(𝒙 − 𝟒) (𝒙 − 𝟓) + (𝒙 − 𝟒) (𝒙 − 𝟓) (𝒙 − 𝟔)
𝒇(𝟐) = 𝟒 , 𝒇 (𝟖) = 𝟒𝟒𝟖, 𝒇 (𝟏𝟓) = 𝟑𝟏𝟓𝟎

Question # 10:-
Use Newton’ s divided difference formula to find 𝒇(𝟖) and 𝒇(𝟏𝟐) from the table:

𝒙 4 5 7 10 11 13

𝒚 = 𝒇(𝒙) 48 100 294 900 1210 2028

Answer:-
𝒇(𝟖) = 𝟒𝟒𝟖 , 𝒇 (𝟏𝟓) = 𝟑𝟏𝟓𝟎

Question # 11:-
Find the Newton’s divided difference polynomial of the following data: and find 𝒇(𝟐. 𝟓):

𝒙 0 1 3 4

𝒚 = 𝒇(𝒙) 1 4 40 85

Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) = 𝒙𝟑 + 𝒙𝟐 + 𝒙 + 𝟏

Question # 12:-
For the following data, find the cubic polynomial using Newton’s divided difference
formula:

𝒙 0 1 2 5

𝒚 = 𝒇(𝒙) 2 3 12 147

Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) = 𝒙𝟑 + 𝒙𝟐 – 𝒙 – 𝟐

Dr. Jamil Book Series 2 Page 114


Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 13:- Assignment


From the following data, find the Newton’s divided difference polynomial:

𝒙 0 2 3 4 7 9

𝒚 = 𝒇(𝒙) 4 26 58 112 466 922

Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) =

Question # 14:-
The rocket is launched from the ground and its velocity during first 10 seconds.
1): Study the system using Newton’s interpolation polynomial,
2): Explain your interpolation polynomial physically
3): Find the velocity at 𝒕 = 𝟏 𝒔𝒆𝒄 and 𝒕 = 𝟗 𝒔𝒆𝒄
4): Interpret and give final remarks on your findings.

𝑻𝒊𝒎𝒆 𝒕 0 2 4 6 8 10

Velocity V 50 210 2610 13010 41010 100050

Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) =

Question # 15:-
Find the missing values in the following data:

𝒙 45 50 55 60 65

𝒚(𝒙) 3.0 ? 2.0 ? -2.4

Answer:-
𝒇(𝟓𝟎) = 𝟐. 𝟗𝟐𝟓, 𝒇(𝟔𝟎) = 𝟎. 𝟐𝟐𝟓
Question # 16:-
The following table gives pressure of a steam at a given temperature. Using Newton’s
formula, compute the pressure for a temperature of 𝟏𝟒𝟐𝑪.

Temperature C. 140 150 160 170 180

Pressure, Kgf/cm2 3.685 4.854 6.302 8.076 10.225

Dr. Jamil Book Series 2 Page 115


Advanced Mathematical Techniques Chapter# 3 Interpolation

Answer:-
𝒇(𝟏𝟒𝟐) = 𝟑. 𝟖𝟗𝟖𝟖𝑲𝒈𝒇/𝒄𝒎𝟑
Question # 17:-
Find the missing values in the following data, using Newton’s divided difference formula:

𝒙 3 6 7 8 9 10

𝒚(𝒙) 168 ? 120 ? 72 63

Answer:-
𝒇(𝟔) = 𝟏𝟒𝟕, 𝒇(𝟖) = 𝟗𝟑

Assignment
Question # 18:-
Express y as a polynomial in powers of (𝒙 − 𝟐) from the following data:

𝒙 0 2 3 6 9 10

𝒚(𝒙) 3 7 24 207 714 983

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) = (𝒙 − 𝟐)𝟑 + 𝟔(𝒙 − 𝟐)𝟐 + 𝟏𝟎(𝒙 − 𝟐) +

Question # 19:-
Find 𝒇(𝒙) as a polynomial in powers of (𝒙 − 𝟔) from the following data:

𝒙 -1 0 2 3 7 10

y=𝒇(𝒙) -11 1 1 1 141 561

Answer:-
𝒇(𝒙) = (𝒙 − 𝟔) + 𝟏𝟑(𝒙 − 𝟔)𝟐 + 𝟓𝟒(𝒙 − 𝟔) + 𝟕𝟑

Question # 20:-
The Pressure drop that occurs when water flows through an orifice meter is measured using
a differential Pressure transmitter. The output current is converted to voltage drop by a
resister. The objective is to correlate the flow rate 𝑭 (𝒈 𝒎𝒊𝒏−𝟏 ) with the voltage drop
𝑷 (𝒎 𝑽). The following data were collected from an experiment:

𝑭 (𝒈 𝒎𝒊𝒏−𝟏 ) 3 5 6 9

𝑷 (𝒎 𝑽) 293 508 585 764

Dr. Jamil Book Series 2 Page 116


Advanced Mathematical Techniques Chapter# 3 Interpolation

(i): Derive a polynomial passing through these data points using Newton’s Divided
interpolation method
(ii): Write Polynomial in simplest form.
(iii): Use this Polynomial to estimate 𝑷 at 𝟕 (𝒈 𝒎𝒊𝒏−𝟏 ) flow rate.
(iv): Interpret and conclude your results.
Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) =

Lagrange’s Interpolation Polynomial Method

Question # 21:-
Determine the Lagrange’s interpolation Polynomial for the data:

𝒙 𝟎 𝟏 𝟑

𝒚 = 𝒇(𝒙) 𝟏 𝟑 𝟓𝟓

and estimate the value at 𝒙 = 𝟐 i.e. find 𝒇(𝟐).

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) = 𝟖𝒙𝟐 − 𝟔𝒙 + 𝟏 and 𝒇(𝟐) = 𝟐𝟏

Question # 22:-
Find the missing value from the following data using Lagrange interpolation Polynomial:

𝒙 𝟎 𝟏 𝟐 𝟑 𝟒

𝒚 = 𝒇(𝒙) −𝟏𝟐 𝟎 − 𝟔 𝟏𝟐

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) = 𝒙𝟑 − 𝟕𝒙𝟐 + 𝟏𝟖𝒙 − 𝟏𝟐 and 𝒇(𝟐) = 𝟒

Question # 23:- Assignment


Use Lagrange interpolation Polynomial, find (𝟏) :

𝒙 −𝟏 𝟎 𝟐 𝟑

𝒚 = 𝒇(𝒙) 𝟓 𝟐 𝟎 𝟏

Answer:-
𝟏
𝒇(𝟏) =
𝟑

Dr. Jamil Book Series 2 Page 117


Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 24:-
The Chemical Oxygen Demand(COD) is found to increase downstream a river. The data
collected from the experiment are tabulated below:

𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 (𝑲𝒎) 𝒅 0 1 2 5

𝑪𝑶𝑫 (𝒎𝒈 𝑳−𝟏 ) 𝑪 2 3 12 147

1): Design a Mathematical Model through Polynomial using Lagrange interpolation


method,
2): Write Polynomial in simplest form.
3): Use this Polynomial to estimate COD at 3Km downstream.
4): Interpret and conclude your results.

Answer:-

𝑪(𝒅) = 𝒇(𝒅) = 𝒅𝟑 + 𝒅𝟐 − 𝒅 + 𝟐

Question # 25:-
The following table gives corresponding values of Pressure of a steam at a given
temperature.
1): Make a Mathematical Model using Lagrange interpolation polynomial,
2): Write Polynomial in simplest form.
3): Find the pressure for a temperature of 𝟏𝟔𝟓° 𝑪
4): Interpret and conclude your results.

𝑻𝒆𝒎𝒑𝒆𝒓𝒂𝒕𝒖𝒓𝒆° 𝑪 , 140 150 160 170

Pressure. Kgf per cm sq. 3.685 4.854 6.302 8.076

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) =

Question # 26:-
Use the following data :

𝒙 0 1 3 4

𝒚 = 𝒇(𝒙) 5 6 50 105

1): Make a Mathematical Model through Polynomial using Lagrange interpolation method,
2): Write Polynomial in simplest form.

Dr. Jamil Book Series 2 Page 118


Advanced Mathematical Techniques Chapter# 3 Interpolation

3): Use this Polynomial to estimate 𝒇(𝟐. 𝟓).


4): Interpret and conclude your results.

Answer:-

𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) =

Question # 27:-
Find Lagrange’s interpolation Polynomial fitting the Points (𝟏) = −𝟑 , 𝒚(𝟑) = 𝟎 , 𝒚(𝟒) =
𝟑𝟎 , 𝒚(𝟔) = 𝟏𝟑𝟐. Hence find 𝒇(𝟓).

Answer:-
𝟏
𝒚(𝒙) = 𝒇(𝒙) = (−𝒙𝟑 + 𝟐𝟕𝒙𝟐 − 𝟗𝟐𝒙 + 𝟔𝟎)
𝟐

𝒚(𝟓) = 𝒇(𝟓) = 𝟕𝟓
Assignment
Question # 28:-
Given the following data, evaluate 𝒇(𝟑) using Lagrange’s interpolation Polynomial:

𝒙 𝟏 𝟐 𝟓

𝒚 = 𝒇(𝒙) 𝟏 𝟒 𝟏𝟎

Answer:-
𝒇(𝟑) = 𝟔. 𝟒𝟗𝟗𝟗

Question # 29:-
Determine by Lagrange’s method the percentage number of patients over 40 years, using
the following data:

Age over 𝒙 years 30 35 45 55

% 𝒏𝒖𝒎𝒃𝒆𝒓 𝒚 𝒐𝒇 patients 148 96 68 34

Answer:-
𝒚(𝟒𝟎) = 𝒇(𝟒𝟎) = 𝟕𝟒. 𝟕

Question # 30:-
Obtain the Lagrange’s interpolation Polynomial of 𝒚(𝒙) from the following data; and
obtain 𝒚(𝟐. 𝟓):

𝒙 𝟎 𝟏 𝟑 𝟒

𝒚 = 𝒇(𝒙) 𝟓 𝟔 𝟓𝟎 𝟏𝟎𝟓

Dr. Jamil Book Series 2 Page 119


Advanced Mathematical Techniques Chapter# 3 Interpolation

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) = 𝒙𝟑 + 𝟑𝒙𝟐 − 𝟑𝒙 + 𝟓

Question # 31:-
The following data give the percentage of criminals for different age groups:

𝑨𝒈𝒆(𝒍𝒆𝒔𝒔 𝒕𝒉𝒂𝒏 𝒙 𝒚𝒆𝒂𝒓𝒔) 𝟐𝟓 𝟑𝟎 𝟒𝟎 𝟓𝟎

% 𝒐𝒇 𝒄𝒓𝒊𝒎𝒊𝒏𝒂𝒍𝒔 𝟐𝟔 𝟑𝟒 𝟒𝟐 𝟒𝟕

Using Lagrange’s formula, estimate the percentage of criminals under the age of 35.

Answer:-
𝒇(𝟑𝟓) ≈ 𝑷(𝟑𝟓) = 𝟑𝟖. 𝟗𝟓

Question # 32:-
Use Lagrange’s interpolation formula to fit a Polynomial to the following data:

𝒙 𝟎 𝟏 𝟑 𝟒

𝒚 = 𝒇(𝒙) −𝟏𝟐 𝟎 𝟔 𝟏𝟐

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑷(𝒙) = 𝒙𝟑 − 𝟕𝒙𝟐 + 𝟏𝟖𝒙 − 𝟏𝟐

Assignment
Question # 33:-
The following table are the measurement 𝑻 made on a curve record by oscilograph
representing a change of current 𝑰 due to a change in the conditions of an electric current:
1): Construct a Mathematical Model by Lagrange interpolation polynomial,
2): Write Polynomial in uncomplicated form.
3): Find the current 𝑰 for a 𝑻 = 𝟑.
4): Interpret and conclude your results.

𝑻 0 1 4 5

Current 𝑰 8 11 68 123

Answer:-
𝑰(𝑻) =≈ 𝑷(𝑻) = 𝑻𝟑 − 𝑻𝟐 + 𝟑𝑻 + 𝟖

Dr. Jamil Book Series 2 Page 120


Advanced Mathematical Techniques Chapter# 3 Interpolation

Hermite’s Interpolation Polynomial Method

Question # 34:-
From the following table of values of 𝒇(𝒙) and 𝒇′(𝒙) obtain 𝒇(−𝟎. 𝟓) and 𝒇(𝟎. 𝟓), using
hermit’s interpolation formula:

𝒙 −𝟏 𝟎 𝟏

𝒚 = 𝒇(𝒙) 𝟏 𝟏 𝟑

𝒚′ = 𝒇’(𝒙) −𝟓 𝟏 𝟕

Answer:-
𝟏𝟏 𝟑
𝒇(𝒙) ≈ 𝑷(𝒙) = 𝟐𝒙𝟒 − 𝒙𝟐 + 𝒙 + 𝟏 and (−𝟎. 𝟓) = , 𝒇(𝟎. 𝟓) =
𝟖 𝟖

Question # 35:-
From the following data find 𝑷(𝒙) using hermit’s interpolation formula and find 𝒇(𝟎. 𝟓).

𝒙 𝒚 = 𝒇(𝒙) 𝒚 = 𝒇’(𝒙)

−𝟏 𝟏 −𝟏

𝟎 𝟎 𝟏

𝟏 𝟏 𝟎

Answer:-
𝟏
𝒇(𝒙) ≈ 𝑷(𝒙) = (𝟑𝒙𝟓 − 𝟑𝒙𝟒 − 𝟕𝒙𝟑 + 𝟕𝒙𝟐 + 𝟒𝒙) and 𝒇(𝟎. 𝟓) = 𝟎. 𝟔𝟗𝟓𝟑𝟏𝟐𝟓
𝟒

Question # 36:-
Using hermit’s interpolation, find cubic Polynomial from the data, also find 𝒇(𝟎. 𝟓).

𝒙 𝟎 𝟏

𝒚 = 𝒇(𝒙) 𝟎 𝟏

𝒚′ = 𝒇’(𝒙) 𝟎 𝟏

Answer:-
𝟑
𝒇(𝒙) = 𝟐𝒙𝟐 − 𝒙𝟑 , 𝒇(𝟎. 𝟓) =
𝟖

Dr. Jamil Book Series 2 Page 121


Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 37:-
Find 𝒇(𝟎. 𝟓) from the data below by hermit’s interpolation formula:

𝒙 𝟎 𝟏

y=𝒇(𝒙) 𝟏 𝟏

y’=𝒇’(𝒙) 𝟎 𝟏

Answer:-
𝟕
𝒇(𝟎. 𝟓) =
𝟖

Assignment
Question # 38:-
Express 𝒚 as a Polynomial in 𝒙 from the following data, using hermit’s interpolating
formula:

𝒙 −𝟏 0 1

𝒚(𝒙) −𝟏𝟎 -4 −2

𝒚′(𝒙) 𝟏𝟎 3 2

Answer:-
𝒚(𝒙) ≈ 𝑷(𝒙) = 𝒙𝟑 − 𝟐𝒙𝟐 + 𝟑𝒙 − 𝟒
Question # 39:-
Express 𝒇(𝒙) as a Polynomial in 𝒙 from the following data, using hermit’s interpolation
formula.

𝒙 0 1 2

𝒚 = 𝒇(𝒙) 1 2 33

𝒚 = 𝒇′(𝒙) 0 4 64

Answer:-
𝒇(𝒙) ≈ 𝑷(𝒙) = −𝟒𝒙𝟓 + 𝟐𝟏𝒙𝟒 − 𝟐𝟖𝒙𝟑 + 𝟏𝟐𝒙𝟐 + 𝟏
Question # 40:-
Express y as a polynomial in 𝒙 from the following data, using interpolation method.

𝒙 -2 0 1

𝒚(𝒙) 13 -1 1

𝒚′(𝒙) -31 1 5

Dr. Jamil Book Series 2 Page 122


Advanced Mathematical Techniques Chapter# 3 Interpolation

Answer:-
𝒚(𝒙) = 𝒇 (𝒙) ≈ 𝑷 (𝒙) = 𝒙𝟒 + 𝒙 − 𝟏

Question # 41:-
Express y as a polynomial in 𝒙 from the following data, using hermit’s interpolation
method:

𝒙 1 2 3

𝒚(𝒙) -4 5 60

𝒚’(𝒙) 0 24 96

Answer:-
𝒚 (𝒙) = 𝒇 (𝒙) ≈ 𝒙𝟒 − 𝟐 𝒙𝟐 – 𝟑

Cubic Spline Interpolation Polynomial Methods

Question # 42:-
From the following table, compute 𝒚(𝟏. 𝟓) and 𝒚’(𝟏), using cubic spline.

𝒙 1 2 3

𝒚(𝒙) -8 -1 18

Finally write your comments and give suitable interpretation either physical/geometrical
or Mechanical on your finding. What you think !
Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑺(𝒙) = 𝟑𝒙𝟑 − 𝟗𝒙𝟐 + 𝟏𝟑𝒙 − 𝟓, 𝟏 ≤ 𝒙 ≤ 𝟐
𝒚(𝟏. 𝟓) = −𝟒𝟓/𝟖, 𝒚’(𝟏) ≈ 𝑺’(𝟏) = 𝟒
Question # 43:- Assignment

Using cubic spline, find 𝒚(𝟎. 𝟓) and 𝒚’(𝟏) given that 𝑴𝟎 = 𝑴𝟐 = 𝟎, and the table:

𝒙 0 1 2

𝒚(𝒙) -5 -4 3

Answer:-
𝒚(𝒙) = 𝒇(𝒙) ≈ 𝑺(𝒙) = (𝟑/𝟐)𝒙𝟑 − (𝒙/𝟐) − 𝟓, 𝟎 ≤ 𝒙 ≤ 𝟏
𝒚(𝟎. 𝟓) ≈ 𝑺(𝟎. 𝟓) = −𝟖𝟏/𝟏𝟔, 𝒚’(𝟏) ≈ 𝑺’(𝟏) = 𝟒
Dr. Jamil Book Series 2 Page 123
Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 44:-
Find the cubic spline polynomial in each interval for the function given below:
Assume that 𝑴𝟎 = 𝑴𝟑 = 𝟎. Also find 𝒇(𝟐. 𝟓).

𝒙 0 1 2 3

𝒚 = 𝒇(𝒙) 1 2 33 244

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟒𝒙𝟑 + 𝟓𝒙 + 𝟏, 𝟎 ≤ 𝒙 ≤ 𝟏

𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟓𝟎𝒙𝟑 − 𝟏𝟔𝟐𝒙𝟐 + 𝟏𝟔𝟕𝒙 − 𝟓𝟑, 𝟏 ≤ 𝒙 ≤ 𝟐

𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟒𝟔𝒙𝟑 + 𝟒𝟏𝟒𝒙𝟐 − 𝟗𝟖𝟓𝒙 + 𝟕𝟏𝟓 𝟐 ≤ 𝒙 ≤ 𝟑

Question # 45:-
Find the cubic spline given the table:(assume that 𝑴(𝟎) = 𝟎, 𝑴(𝟑) = −𝟏𝟐)

𝒙 0 2 4 6

𝒚(𝒙) 1 9 41 41

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = 𝒙𝟑 + 𝟏 𝟎 ≤ 𝒙 ≤ 𝟐

𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟐𝒙𝟑 + 𝟏𝟖𝒙𝟐 − 𝟑𝟔𝒙 − 𝟐𝟓, 𝟐 ≤ 𝒙 ≤ 𝟒

𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟔𝒙𝟐 + 𝟔𝟎𝒙 − 𝟏𝟎𝟑, 𝟒 ≤ 𝒙 ≤ 𝟔

Question # 46:-
Obtain the cubic spline approximation for the function 𝒚 = 𝒇(𝒙) from the following data,
given by 𝑴𝟎 = 𝑴𝟑 = 𝟎. Find 𝒚(𝟏. 𝟓).

𝒙 -1 0 1 2

𝒚(𝒙) 0 1 2 18

At the end put down your conclusions and express suitable interpretation either
physical/geometrical or Mechanical on your results. What is your understanding!
Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = −𝒙𝟑 − 𝟑𝒙𝟐 − 𝒙 + 𝟏, −𝟏 ≤ 𝒙 ≤ 𝟎

𝒚(𝒙) ≈ 𝑺(𝒙) = 𝟓𝒙𝟑 − 𝟑𝒙𝟐 − 𝒙 + 𝟏, 𝟎 ≤ 𝒙 ≤ 𝟏

𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟒𝒙𝟑 + 𝟐𝟒𝒙𝟐 − 𝟐𝟖𝒙 + 𝟏𝟎, 𝟏 ≤ 𝒙 ≤ 𝟐

Dr. Jamil Book Series 2 Page 124


Advanced Mathematical Techniques Chapter# 3 Interpolation

Question # 47:-
Find the cubic spline interpolation polynomial for the data given below under the condition
𝑴(𝟎) = 𝑴(𝟑) = 𝟎 and valid in the sub-interval [𝟏, 𝟐]. Hence, find 𝒇(𝟏. 𝟓):

𝒙 0 1 2 3

𝒚(𝒙) 1 4 10 8

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = (𝟏/𝟑)(−𝟏𝟏𝒙𝟑 + 𝟒𝟓𝒙𝟐 − 𝟒𝟎𝒙 + 𝟏𝟖), 𝟏 ≤ 𝒙 ≤ 𝟐

Question # 48:-
Find the cubic spline polynomial in [𝟎, 𝟏] for the following data:
Also find 𝒚(𝟎. 𝟓) and 𝒚’(𝟏).

𝒙 0 1 2

𝒚 = 𝒇(𝒙) 0 2 6

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = (𝒙𝟑 + 𝟑𝒙)(𝟏/𝟐)

𝒚(𝟎. 𝟓) = 𝟏𝟑/𝟏𝟔, 𝒚’(𝟏) = 𝟑

Question # 49:-
Find the cubic spline polynomial for the data. Also find 𝒚(𝟎. 𝟓) and 𝒚’(𝟏).

𝒙 0 1 2

𝒚 = 𝒇(𝒙) 0 1 0

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = (−𝒙𝟑 + 𝟑𝒙)(𝟏/𝟐)

𝒚(𝟎. 𝟓) = 𝟏𝟏/𝟔, 𝒚’(𝟏) = 𝟎

Question # 50:-
Find the natural cubic spline in the range [𝟎, 𝟔] for the following data. Also find 𝒚(𝟑) and
𝒚’(𝟑).

𝒙 0 6 12

𝒚 = 𝒇(𝒙) 1 3 11

Dr. Jamil Book Series 2 Page 125


Advanced Mathematical Techniques Chapter# 3 Interpolation

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = (𝟏/𝟏𝟒𝟒)(𝒙𝟑 + 𝟏𝟐𝒙 + 𝟏𝟒𝟒)
𝒚(𝟑) = 𝟐𝟎𝟕/𝟏𝟒𝟒, 𝒚’(𝟑) = 𝟑𝟗/𝟏𝟒𝟒

Question # 51:-
Find the cubic spline for the following data with 𝑴(𝟎) = 𝟏𝟎 and 𝑴(𝟐) = 𝟏𝟎

𝒙 -1 0 1

𝒚 = 𝒇(𝒙) 1 0 1

Answer:-
𝒚(𝒙) ≈ 𝑺(𝒙) = −𝟐𝒙𝟑 − 𝒙𝟐 , −𝟏 ≤ 𝒙 ≤ 𝟎

𝒚(𝒙) ≈ 𝑺(𝒙) = 𝟐𝒙𝟑 − 𝒙𝟐 , 𝟎 ≤ 𝒙 ≤ 𝟏

Dr. Jamil Book Series 2 Page 126


Advanced Mathematical Techniques Chapter# 3 Interpolation

SUMMARY OF CH# 3
1. Interpolation:-
Interpolation is the process of finding the value of a function for any value of argument or
independent variable in an interval (𝒙𝟎 , 𝒙𝒏 ).
Thus interpolation is the art of reading between the lines in a given table.

2. Extrapolation:-
Extrapolation is the process of finding the value of a function outside an interval
(𝒙𝟎 , 𝒙𝒏 ).

3. Polynomial Interpolation 𝑷(𝒙):-


Approximation by the polynomial of least degree satisfying the given data is called
Polynomial Interpolation and the corresponding polynomial is called the interpolating
polynomial.
The following theorem guarantees the existence and uniqueness of such a polynomial.

4. Theorem:-
Let 𝒚(𝒙) = 𝒇(𝒙) be known at the distinct points 𝒙𝟎 , 𝒙𝟏 , … 𝒙𝒏 . Then there exists a unique
polynomial 𝑷(𝒙) of degree less than or equals to 𝒏 and satisfying the condition:

𝑷(𝒙𝒊 ) = 𝒚(𝒙𝒊 ) = 𝒚𝒊 = 𝒇𝒊 , 𝒊 = 𝟎, 𝟏, 𝟐, … . , 𝒏

4. Lagrange’s Interpolation formula:-


The Lagrange’s interpolation polynomial formula of degree at most (𝒏 + 𝟏) is given by:

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑳𝒊 (𝒙)𝒚𝒊


𝒊=𝟎

Where 𝑳𝒊 (𝒙) are called Lagrange’s interpolation coefficients and defined as:
(𝒙−𝒙 )(𝒙−𝒙 )… (𝒙−𝒙 )(𝒙−𝒙 )…(𝒙−𝒙 )
𝑳𝒊 (𝒙): (𝒙𝒊 −𝒙𝟎𝟎)(𝒙𝒊−𝒙𝟏𝟏 )…(𝒙𝒊−𝒙𝒊−𝟏
𝒊−𝟏 𝒊+𝟏 𝒏
)(𝒙𝒊 −𝒙𝒊+𝟏 )…(𝒙𝒊 −𝒙𝒏 ) [ 𝑫𝒆𝒍𝒆𝒕𝒆 𝒊𝒕𝒉 𝒇𝒂𝒄𝒕𝒐𝒓 (𝒙𝒊 − 𝒙𝒊 ) ]

5. Hermite’s Interpolation polynomial formula:-


𝒏 𝒏

𝒚(𝒙) = 𝒇(𝒙) ≅ 𝑷(𝒙) = ∑ 𝑨𝒊 (𝒙)𝒇𝒊 + ∑ 𝑩𝒊 (𝒙)𝒇′𝒊


𝒊=𝟎 𝒊=𝟎
where
𝑨𝒊 (𝒙) = [𝟏 − 𝟐𝑳′ 𝒊 (𝒙𝒊 )(𝒙 − 𝒙𝒊 )][𝑳𝒊 (𝒙)]𝟐

𝑩𝒊 (𝒙) = (𝒙 − 𝒙𝒊 )[𝑳𝒊 (𝒙)]𝟐


where 𝒇′𝒊 and 𝐋′𝒊 (𝐱) are derivatives of 𝒇(𝒙) and 𝑳𝒊 (𝒙) respectively.
Dr. Jamil Book Series 2 Page 127
Advanced Mathematical Techniques Chapter# 3 Interpolation

6. Newton’s forward Interpolation Polynomial formula:-

𝒑(𝒑−𝟏) 𝒑(𝒑−𝟏)(𝒑−𝟐) 𝒑(𝒑−𝟏)(𝒑−𝟐)…(𝒑−𝒏+𝟏)


𝑷(𝒙) = 𝒚𝟎 + 𝒑𝜟𝒚𝟎 + 𝚫𝟐 𝒚𝟎 + 𝚫𝟑 𝒚𝟎 +. . . + 𝜟𝒏 𝒚𝟎
𝟐! 𝟑! 𝒏!

𝒙−𝒙𝟎
where 𝒑 =
𝒉

7. Newton’s backward Interpolation Polynomial formula:-

𝒑(𝒑+𝟏) 𝒑(𝒑+𝟏)(𝒑+𝟐) 𝒑(𝒑+𝟏)(𝒑+𝟐)…(𝒑+𝒏−𝟏)


𝑷(𝒙) = 𝒚𝒏 + 𝒑𝛁𝒚𝒏 + 𝛁𝟐 𝒚𝒏 + 𝛁𝟑 𝒚𝒏 +. . . + 𝛁𝒏 𝒚𝒏
𝟐! 𝟑! 𝒏!

𝒙−𝒙𝒏
where 𝒑 =
𝒉

8.The divided differences:-

𝒇(𝒙𝒏 ) − 𝒇(𝒙𝒏−𝟏 )
𝒇[𝒙𝒏−𝟏 , 𝒙𝒏 ] =
𝒙𝒏 − 𝒙𝒏−𝟏

These are called first divided differences and is devoted by 𝚫𝒇. Higher divided differences
operators are defined as:

𝒇[𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒌 ] − 𝒇[𝒙𝟎 , … , 𝒙𝒌−𝟏 ]


𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒌−𝟏 , 𝒙𝒌, ] =
𝒙𝒌 − 𝒙𝟎

for 𝒌 = 𝟑, 𝟒, 𝟓, . . . , 𝒏

these differences are denoted by 𝚫𝟐 𝒇, 𝚫𝟑 𝒇 … … . 𝚫𝒌 𝒇

9. Newton’s divided difference interpolation formula:-

𝑷(𝒙) = 𝒇(𝒙𝟎 ) + (𝒙 − 𝒙𝟎 )𝒇[𝒙𝟎 , 𝒙𝟏 ] + (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 ]

+(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 )(𝒙 − 𝒙𝟐 )𝒇[𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ] + ⋯

+(𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) … (𝒙 − 𝒙𝒏−𝟏 )𝒇[𝒙𝟎 , 𝒙𝟏 , … , 𝒙𝒏 ]

10. Cubic Spline Interpolation:-

𝟏 𝟑 𝟑
𝟏 𝒉𝟐
𝑺(𝒙) = [(𝒙𝒊 − 𝒙) 𝑴𝒊−𝟏 + (𝒙 − 𝒙𝒊−𝟏 ) 𝑴𝒊 ] + (𝒙𝒊 − 𝒙) [𝒚𝒊−𝟏 − 𝑴𝒊−𝟏 ] +
𝟔𝒉 𝒉 𝟔
𝟏 𝒉𝟐
+ 𝒉 (𝒙 − 𝒙𝒊−𝟏 ) [𝒚𝒊 − 𝑴𝒊 ] , 𝒊 = 𝟏, 𝟐, 𝟑, … , 𝒏 (1)
𝟔

Dr. Jamil Book Series 2 Page 128


Advanced Mathematical Techniques Chapter# 3 Interpolation

𝟔
𝑴𝒊−𝟏 + 𝟒𝑴𝒊 + 𝑴𝒊+𝟏 = 𝒉𝟐 [𝒚𝒊−𝟏 − 𝟐𝒚𝒊 + 𝒚𝒊+𝟏 ], 𝐢 = 𝟏, 𝟐, 𝟑, … . . , 𝐧 − 𝟏 (2)

and

𝑴𝟎 = 𝑴𝒏 = 𝟎 (3)

Dr. Jamil Book Series 2 Page 129

You might also like