0% found this document useful (0 votes)
43 views75 pages

Group 06

This document is an assignment on Numerical Analysis submitted by a group of students at Khulna University. It covers various topics including the purpose of numerical analysis, calculus of finite differences, interpolation methods, numerical integration, and solutions to algebraic transcendental equations. The assignment includes detailed explanations and solved problems related to these topics.
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)
43 views75 pages

Group 06

This document is an assignment on Numerical Analysis submitted by a group of students at Khulna University. It covers various topics including the purpose of numerical analysis, calculus of finite differences, interpolation methods, numerical integration, and solutions to algebraic transcendental equations. The assignment includes detailed explanations and solved problems related to these topics.
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/ 75

KHULNA UNIVERSITY

An Assignment on Numerical Analysis


Section-A
Group:06
Course Title:Numerical Analysis
Course Code:Math-3209

Submitted To: Submitted By:

Prof. Dr. Munnujahan Ara


Student Name Student ID
Professor

Mathematics Discipline Badhan Roy 201202


Khulna University Amrita Sen 201256
Harasit Biswas 211204
Khulna Tashbiha Tabassum 211224
Zannatul Fardosh 211232
Raisa Ahmed 211235
Yousuf Hossain 211236
Babul Akter Durjoy 211242
Mahmuda Khatun 211244

Date of Submission: 30.10.2024


Page |1

Contents

Topics Topics Name Page


No. Number

01  What is Numerical Analysis? 02


 What is the purpose of the numerical analysis?

02 The Calculus of finite differences: 02-10


 The Operator E
 The Operator ∆
 The Operator 𝛁
 Relations between the operators

03 Interpolation with Equal Interval: 11-24


 The Difference Table
 Newton Forward Interpolation
 Solved problems of Newton Forward
Interpolation Formula
 Newton Backward Interpolation
 Solved problems of Newton Backward
Interpolation Formula

04 Interpolation with Unequal Interval: 24-35


 Newton’s divided difference
 Solved problems of Newton’s divided difference
 Lagrange Interpolation
 Solved problems of Lagrange Interpolation
05 Central Difference Interpolation Formula: 36-50
 Gauss forward formula
 Solved problems of Gauss forward formula
 Gauss backward formula
 Solved problems of Gauss backward formula
 Stirling’s formula
 Solved problems of Stirling’s formula
 Bessel’s formula
 Solved problems of Bessel’s formula
06 Numerical Integration: 51-66
 Trapezoidal rule & Solved problems
 Simpson’s 1/3 rule & Solved problems
 Simpson’s 3/8 rule & Solved problems
 Romberg Integration & & Solved problems
07 Solution of Algebraic Transcendental Equations: 67-75
 Bisection method
 Solved problems of Bisection method
 Newton Rapson method
 Solved problems of Newton Rapson method
Page |3
What is Numerical Analysis?

Numerical analysis is the study of numerical methods that attempt at finding


approximate solutions of problems rather than the exact ones. Numerical analysis finds
application in all fields of engineering and the physical sciences, and in the 21st century
also the life and social sciences, medicine, business and even the arts.

What is the purpose of the numerical analysis?

Numerical analysis is a branch of mathematics that solves continuous problems using


numeric approximation. It involves designing methods that give approximate but
accurate numeric solutions, which is useful in cases where the exact solution is
impossible or prohibitively expensive to calculate.

Exact and Approximate Numbers:


3,4,9,1/2,0.5 - are exact numbers. √2,π,√3 - are approximate numbers as they can not be exactly be a
finites digit. They can be written as 1.414,3.1416,1.7320.

Rounding of Numbers:
If 27.73 is rounded off to three decimal places, the result is 27.7. If 9.20Ω is rounded off to three
decimal places the value 9.21.
Computation of Errors:
Let 𝑉𝑇 = 𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒
𝑉𝐴 = 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑎 𝑛𝑢𝑚𝑏𝑒𝑟
 The error is 𝐸 = 𝑉𝑇 − 𝑉𝐴
 The absolute error is 𝐸𝐴 = |𝑉𝑇 − 𝑉𝐴 |
𝐸 |𝑉𝑇 −𝑉𝐴 |
 The relative error is 𝐸𝑅 = 𝑉𝐴 =
𝑇 𝑉𝑇
 The percentage error is 𝐸𝑃 = 𝐸𝑅 × 100%
|𝑉𝑇 − 𝑉𝐴 |
= × 100%
𝑉𝑇

Operators:
The Operator E: This is known usually as shifting or shift operator.
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ) → 𝐼𝑛𝑐𝑟𝑒𝑚𝑒𝑛𝑡 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥
𝑤ℎ𝑒𝑟𝑒 𝑦 = 𝑓(𝑥) 𝑏𝑒 𝑎𝑛𝑦 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑥

Operating E on x simply indicate an increment value of x in f(x)


In terms of y, we can write as:
𝐸𝑦𝑖 = 𝑦𝑖+1

The Operator ∆ (forward difference):


The forward difference operator ∆ (Delta) is defined as:
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
𝑜𝑟, ∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛
𝑜𝑟, ∆𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 + ℎ) − 𝑓(𝑥𝑖 )
𝑜𝑟, ∆𝑦𝑖 = 𝑦𝑖+1 − 𝑦𝑖 ; 𝑖 = 0,1,2, … , 𝑛
So, Page |4
∆𝑦0 = 𝑦1 − 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1
… … … … … … … ….
∆𝑦𝑛−1 = 𝑦𝑛 − 𝑦𝑛−1

This is called first order forward difference.

The Operator 𝛁 (Backward difference):

The backward difference operator ∇ (Nabla) is defined as:


∇ 𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
𝑜𝑟, ∇ 𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
𝑜𝑟, ∇𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 ) − 𝑓(𝑥𝑖 − ℎ)
𝑜𝑟, ∇𝑦𝑖 = 𝑦𝑖 − 𝑦𝑖−1 ; 𝑖 = 𝑛, 𝑛 − 1, … … … ,1
So,
∇𝑦1 = 𝑦1 − 𝑦0
∇𝑦2 = 𝑦2 − 𝑦1
… … … … … … … ….
∇𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1

This is called first order backward difference.

Suppose 𝑦 = 𝑓(𝑥) denotes a function which takes the value 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 for the equidistant value
𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 respectively of the independent variable of x.

Forward Difference Table (Horizontal)

Argument Entry 𝟏𝒔𝒕 difference 𝟐𝒏𝒅 difference 𝟑𝒓𝒅 differenmce


x y ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚

𝑥0 𝑦0 ∆𝑦0 = 𝑦1 − 𝑦0 ∆2 𝑦0 = ∆𝑦1 − ∆𝑦0 ∆3 𝑦0 = ∆2 𝑦1 − ∆2 𝑦0

𝑥1 𝑦1 ∆𝑦1 = 𝑦2 − 𝑦1 ∆2 𝑦1 = ∆𝑦2 − ∆𝑦1


(𝑥0 + ℎ)
𝑥2 𝑦2 ∆𝑦2 = 𝑦3 − 𝑦2
(𝑥0 + 2ℎ)
𝑥3 𝑦3
(𝑥0 + 3ℎ)

This is horizontal forward difference table.


Forward Difference Table (Diagonal) Page |5

Argument Entry 𝟏𝒔𝒕 difference 𝟐𝒏𝒅 difference 𝟑𝒓𝒅 differenmce


x y ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚

𝑥0 𝑦0
∆𝑦0 = 𝑦1 − 𝑦0
𝑥1 𝑦1 ∆2 𝑦0 = ∆𝑦1 − ∆𝑦0
(𝑥0 + ℎ)
∆𝑦1 = 𝑦2 − 𝑦1 ∆3 𝑦0 = ∆2 𝑦1 − ∆2 𝑦0
𝑥2 𝑦2 ∆2 𝑦1 = ∆𝑦2 − ∆𝑦1
(𝑥0 + 2ℎ)
∆𝑦2 = 𝑦3 − 𝑦2
𝑥3 𝑦3
(𝑥0 + 3ℎ

This is diagonal forward difference table.

Backward Difference Table (Horizontal)

Argument Entry 1𝑠𝑡 difference 2𝑛𝑑 difference 3𝑟𝑑 differenmce


x y ∇𝑦 ∇2 𝑦 ∇3 𝑦

𝑥0 𝑦0

𝑥1 𝑦1 ∇𝑦1 = 𝑦1 − 𝑦0
(𝑥0 + ℎ)

𝑥2 𝑦2 ∇𝑦2 = 𝑦2 − 𝑦1 ∇2 𝑦2 = ∇𝑦2 − ∇𝑦1


(𝑥0 + 2ℎ)

𝑥3 𝑦3 ∇𝑦3 = 𝑦3 − 𝑦1 ∇2 𝑦3 = ∇𝑦3 − ∇𝑦2 ∇3 𝑦3 = ∇2 𝑦3 − ∇2 𝑦2


(𝑥0 + 3ℎ)

This is horizontal backward difference table.

Backward Difference Table (Diagonal)

Argument Entry 𝟏𝒔𝒕 difference 𝟐𝒏𝒅 difference 𝟑𝒓𝒅 differenmce


x y 𝛁𝒚 𝛁𝟐 𝒚 𝛁𝟑𝒚

𝑥0 𝑦0

∇𝑦1 = 𝑦1 − 𝑦0

𝑥1 𝑦1 ∇2 𝑦2 = ∇𝑦2 − ∇𝑦1
(𝑥0 + ℎ)
∇𝑦2 = 𝑦2 − 𝑦1 ∇3 𝑦3 = ∇2 𝑦3 − ∇2 𝑦2

𝑥2 𝑦2 ∇2 𝑦3 = ∇𝑦3 − ∇𝑦2
(𝑥0 + 2ℎ)
∇𝑦3 = 𝑦3 − 𝑦1 Page |6

𝑥3 𝑦3
(𝑥0 + 3ℎ)

This is diagonal backward difference table.

Example: Prove that, ∆. ∇= ∆ − ∇

Solution:
We know from forward difference,
∆ 𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
And backward difference,
∇ 𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
So, ∆. ∇𝑓(𝑥) = ∆[𝑓(𝑥) − 𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − ∆𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − {𝑓(𝑥) − 𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − ∇𝑓(𝑥)
Or, (∆. ∇)𝑓(𝑥) = ∆𝑓(𝑥) − ∇𝑓(𝑥)
Or, (∆. ∇)𝑓(𝑥) = (∆ − ∇)𝑓(𝑥)
∴ ∆. ∇= ∆ − ∇
(Proved)

Example: Prove that ∆≡ 𝐸 − 1

Solution:
We know, Shifting operator
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
The forward difference: ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
Or, ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
Or, ∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
∴ ∆= 𝐸 − 1
(Proved)

Example: If h is very small then prove that, ∆𝑛+1 𝑓(𝑥0 ) = ℎ𝑛+1 𝑓 𝑛+1 (𝑥0 )

Solution:
From the definition of derivative that,
𝑓(𝑥0 + ℎ) − 𝑓(𝑥0 )
lim = 𝑓 ′ (𝑥0 )
ℎ→0 ℎ

And forward difference , ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)


So, we write first derivative as,
𝑓(𝑥0 + ℎ) − 𝑓(𝑥0 )
lim = 𝑓 ′ (𝑥0 )
ℎ→0 ℎ

∆𝑓(𝑥0 )
lim = 𝑓 ′ (𝑥0 )
ℎ→0 ℎ
∆𝑓(𝑥0 ) = ℎ𝑓 ′ (𝑥0 )

Also, for second derivative we can write as,


Page |7
𝑓 ′ (𝑥0 ′
+ ℎ) − 𝑓 (𝑥0 )
lim = 𝑓 ′′ (𝑥0 )
ℎ→0 ℎ
∆𝑓(𝑥0 + ℎ) ∆𝑓(𝑥0 )

lim ℎ ℎ = 𝑓 ′′ (𝑥 )
0
ℎ→0 ℎ
∆2 𝑓(𝑥0 )
lim = 𝑓 ′′ (𝑥0 ) (from the first difference)
ℎ→0 ℎ2
∆2 𝑓(𝑥0 ) = ℎ2 𝑓 ′′ (𝑥0 )
Similarly,
∆𝑛 𝑓(𝑥0 ) = ℎ𝑛 𝑓 𝑛 (𝑥0 )
∆𝑛+1 𝑓(𝑥0 ) = ℎ𝑛+1 𝑓 𝑛+1 (𝑥0 )
(Proved)

Home Work:

Question-1: Prove that ∆k f(x) = ∑k0(1)i (k1)f{x − (k − i)h}

Solution:
Proof: From shifting operator, we know that,
𝐸 = 1 + ∆ 𝑎𝑛𝑑 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
Or, ∆ = 𝐸 − 1
So, we get
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥)
Also, for ∆2 𝑓(𝑥) = ∆{∆𝑓(𝑥)}
= ∆{𝑓(𝑥 + ℎ) − 𝑓(𝑥)}
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= (𝐸 − 1)𝑓(𝑥 + ℎ) − (𝐸 − 1)𝑓(𝑥)
= 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) − 𝐸𝑓(𝑥) + 𝑓(𝑥)
= 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) + 𝑓(𝑥)
∆2 𝑓(𝑥) = 𝑓(𝑥 + 2ℎ) − 2𝑓(𝑥 + ℎ) + 𝑓(𝑥)
Similarly,
∆3 𝑓(𝑥) = (𝐸 − 1)3 𝑓(𝑥)
= (𝐸 3 − 3𝐸 2 + 3𝐸 − 1)𝑓(𝑥)
= 𝐸 𝑓(𝑥) − 3𝐸 2 𝑓(𝑥) + 3𝐸𝑓(𝑥) − 𝑓(𝑥)
3

= 𝑓(𝑥 + 3ℎ) − 3𝑓(𝑥 + 2ℎ) + 3𝑓(𝑥 + ℎ) − 𝑓(𝑥)


𝑘 (𝐸 𝑘
∆ 𝑓(𝑥) = − 1) 𝑓(𝑥)
= [𝐸 𝑘 − 𝑘𝐶1 𝐸 𝑘−1 + 𝑘𝐶2 𝐸 𝑘−2 − 𝑘𝐶3 𝐸 𝑘−3 … … + (−1)𝑘 ]𝑓(𝑥)
= 𝐸 𝑘 𝑓(𝑥) − 𝑘𝐶1 𝐸 𝑘−1 𝑓(𝑥) + 𝑘𝐶2 𝐸 𝑘−2 𝑓(𝑥) − 𝑘𝐶3 𝐸 𝑘−3 𝑓(𝑥) … … + (−1)𝑘 𝑓(𝑥)
= 𝑓(𝑥 + 𝑘ℎ) − 𝑘𝐶1 𝑓{𝑥 + (𝑘 − 1)ℎ} + 𝑘𝐶2 𝑓{𝑥 + (𝑘 − 2)ℎ} … … + (−1)𝑘 𝑓(𝑥)
Which is k-th order difference of a function 𝑓(𝑥)
𝑘

∆ 𝑓(𝑥) = ∑(−1)𝑖 𝑘𝐶𝑖 𝑓{(𝑥 + (𝑘 − 𝑖)ℎ)


𝑘

𝑖=0
(Proved)
Page |8
st
Question-2: Show that the 1 difference polynomial of degree n is a polynomial of degree (n-1).

Solution:
Let us consider a polynomial of degree ‘n’,
𝑦 = 𝑓(𝑥) = 𝑎𝑥 𝑛 + 𝑏𝑥 𝑛−1 + ⋯ … + 𝑘𝑥 + 𝑙 … … … . (1)
Again let,
∆𝑥 = ℎ i.e., 𝑥0 + ℎ = 𝑥0 + ∆𝑥0 = 𝑥1
Now,
𝑦 + ∆𝑦 = 𝑓(𝑥 + ∆𝑥)
= 𝑎(𝑥 + ℎ)𝑛 + 𝑏(𝑥 + ℎ)𝑛−1 + ⋯ … + 𝑘(𝑥 + ℎ) + 𝑙 … … (2)
Subtracting (1) from (2) we get,
∆𝑦 = 𝑦 + ∆𝑦 − 𝑦
= 𝑎[(𝑥 + ℎ) − 𝑥 + 𝑏[(𝑥 + ℎ)𝑛−1 − 𝑥 𝑛−1 ] + ⋯ … + 𝑘(𝑥 + ℎ − 𝑥) + 𝑙 − 𝑙
𝑛 𝑛]

= 𝑎[𝑥 + C1 𝑥 𝑛−1 ℎ + ⋯ … . −𝑥 𝑛 ] + 𝑏[𝑥 𝑛−1 +n-1C1 𝑥 𝑛−2 ℎ + ⋯ … − 𝑥 𝑛−1 ] +


𝑛 n
… + 𝑘ℎ
n 𝑛−1 n-1 𝑛−2
= 𝑎 C1 ℎ 𝑥 + 𝑏 C1 ℎ 𝑥 + ⋯ … + 𝑘ℎ
Let, 𝑎 nC1 ℎ = 𝑎′ , 𝑏 n-1C1 ℎ = 𝑏 ′ , …….
∴ ∆𝑦 = 𝑎′ 𝑥 𝑛−1 + 𝑏 ′ 𝑥 𝑛−2 + ⋯ … + 𝑘ℎ
st
Hence, the 1 difference of a polynomial of degree n is a polynomial of degree (n-1).
(Showed)

Question-3: Show that, the 𝑛𝑡ℎ difference of polynomial of degree n is a constant and
(𝑛 + 1)𝑡ℎ difference is zero.

Solution:
let a polynomial of 𝑛𝑡ℎ degree,
𝑓(𝑥) = 𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + ⋯ + 𝑘𝑥 𝑛 Where 𝑘 ≠ 0
We know, ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∴ ∆𝑓(𝑥) = [𝑎 + 𝑏(𝑥 + ℎ) + 𝑐(𝑥 + ℎ)2 + ⋯ + 𝑘(𝑥 + ℎ)𝑛 ] − [𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + ⋯ + 𝑘𝑥 𝑛 ]
= 𝑏ℎ + 𝑐[(𝑥 + ℎ)2 − 𝑥 2 ] + ⋯ + 𝑘[(𝑥 + ℎ)𝑛 − 𝑥 𝑛 ]
= 𝑏ℎ + 𝑐[𝑥 + 2𝑥ℎ + ℎ2 − 𝑥 2 ] + ⋯ + 𝑘[𝑥 𝑛 + 𝑛𝐶 1 𝑥 𝑛−1 ℎ + 𝑛𝐶 2 𝑥 𝑛−2 ℎ2 + ⋯ ) − 𝑥 𝑛 ]
2

= 𝑏ℎ + 𝑐(2𝑥ℎ + ℎ2 ) + ⋯ + 𝑘(𝑛𝐶 1 𝑥 𝑛−1 ℎ + 𝑛𝐶 2 ℎ2 + ⋯ )


= (𝑏ℎ + 𝑐ℎ2 ) + 2𝑐ℎ𝑥 + ⋯ + 𝑘ℎ2 𝑛𝐶 2 𝑥 𝑛−2 + 𝑘ℎ𝑛𝐶 1 𝑥 𝑛−1
= 𝑎1 + 𝑏1 𝑥 + ⋯ + 𝑘ℎ𝑛𝑥 𝑛−1
Now,
∆2 𝑓(𝑥) = ∆{∆𝑓(𝑥)}
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= [𝑎1 + 𝑏1 (𝑥 + ℎ) + ⋯ + 𝑘ℎ𝑛(𝑥 + ℎ)𝑛−1 ] − [𝑎1 + 𝑏1 𝑥 + ⋯ + 𝑘ℎ𝑛𝑥 𝑛−1 ]
= 𝑏1 (𝑥 + ℎ − 𝑥) + ⋯ + 𝑘ℎ𝑛{(𝑥 + ℎ)𝑛−1 − 𝑥 𝑛−1 }
= 𝑏1 ℎ + ⋯ + 𝑘ℎ𝑛{𝑥 𝑛−1 + (𝑛 − 1)𝐶 1 𝑥 𝑛−2 ℎ + (𝑛 − 1)𝐶 2 𝑥 𝑛−3 ℎ2 + ⋯ − 𝑥 𝑛−1 }
= 𝑏1 ℎ + ⋯ + 𝑘ℎ𝑛{(𝑛 − 1)𝐶 1 𝑥 𝑛−2 ℎ + (𝑛 − 1)𝐶2 𝑥 𝑛−3 ℎ2 + ⋯ }
= 𝑎2 + 𝑏2 𝑥 + ⋯ + 𝑘ℎ2 𝑛(𝑛 − 1)𝑥 𝑛−2
Similarly,
∆3 𝑓(𝑥) = 𝑎3 + 𝑏3 𝑥 + ⋯ + 𝑘ℎ3 𝑛(𝑛 − 1)(𝑛 − 2)𝑥 𝑛−3
………………………
………………………
∆𝑛 𝑓(𝑥) = 𝑘ℎ3 𝑛(𝑛 − 1)(𝑛 − 2) … {𝑛 − (𝑛 − 1)}𝑥 𝑛−3
= 𝑘ℎ𝑛 𝑛(𝑛 − 1)(𝑛 − 2)(𝑛 − 3) … 1
= 𝑘ℎ𝑛 𝑛!
Which is a constant.
So, ∆𝑛+1 𝑓(𝑥) = ∆{∆𝑛 𝑓(𝑥)}
= ∆𝑛 𝑓(𝑥 + ℎ) − ∆𝑛 𝑓(𝑥)
= 𝑘ℎ𝑛 𝑛! − 𝑘ℎ𝑛 𝑛!
=0
Page |9

So, the 𝑛𝑡ℎ difference of polynomial of degree n is a constant and (𝑛 + 1)𝑡ℎ difference is zero.
(Showed)

Question-4: Prove that, 𝐸∇≡ ∇𝐸 ≡ ∆

Solution:
We have (𝐸∇)𝑓(𝑥) = 𝐸{∇𝑓(𝑥)}
= 𝐸{𝑓(𝑥) − 𝑓(𝑥 − ℎ)}
= 𝐸𝑓(𝑥) − 𝐸𝑓(𝑥 − ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥) … … … … (1)
Also,
(∇𝐸)𝑓(𝑥) = ∇{𝐸𝑓(𝑥)}
= ∇𝑓(𝑥 + ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥)… … … … (2)
From (1) and (2), We have
𝐸∇≡ ∆ 𝑎𝑛𝑑 ∇𝐸 ≡ ∆
Thus 𝐸∇≡ ∇𝐸 ≡ ∆
(Proved)

Question-5: Find the relation between


(i) Operator E of finite difference and difference operator D of differential
calculus.
(ii) Relation between D and ∆.

Solution:
(i) 𝐸 ≡ 𝑒 𝜆𝐷 ≡ 1 + ∆, where D is the differential operator of differential calculus.
We have 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
ℎ2 ′′
= 𝑓(𝑥) + ℎ𝑓 ′ (𝑥) + 𝑓 (𝑥) + ⋯
2!
ℎ2 2
= 1. 𝑓(𝑥) + ℎ𝐷𝑓(𝑥) + 𝐷 𝑓(𝑥) + ⋯
2!
ℎ2 𝐷 2
= {1 + ℎ𝐷 + + ⋯ } 𝑓(𝑥)
2!
= 𝑒 𝜆𝐷 𝑓(𝑥)
𝜆𝐷
Thus 𝐸𝑓(𝑥) = 𝑒 𝑓(𝑥), for any function 𝑓(𝑥).
∴ 𝐸 = 𝑒 𝜆𝐷
(𝑃𝑟𝑜𝑣𝑒𝑑)
(ii) Again, we have 𝑒 𝜆𝐷 ≡ 1 + ∆
⇒ ℎ𝐷 ≡ log(1 + ∆)
∆2 ∆3 ∆4
≡ (∆ − + − + ⋯ )
2 3 4
1 ∆2 ∆3 ∆4
Or 𝐷 = ℎ (∆ − 2 + 3 − 4 + ⋯ )

This is the relation between 𝐷 𝑎𝑛𝑑 ∆.


(Proved)
P a g e | 10

Viva Questions

Question: What is numerical analysis?


Ans: It's the study of algorithms for approximating solutions to mathematical problems.

Question: What are the types of errors in numerical analysis?


Ans:
 Round-off error: Due to limited precision.
 Truncation error: Due to approximation.
 Absolute and Relative errors: Measure the difference between exact and approximate
values.

Question: Difference between direct and iterative methods?


Ans:
 Direct methods: Solve exactly in finite steps (e.g., Gaussian elimination).
 Iterative methods: Approximate solutions with successive refinements (e.g., Jacobi
method).

Question: What is the bisection method?


Ans: An iterative method for finding roots by repeatedly halving an interval where the function
changes sign.

Question: What is interpolation?


Ans: Estimating values between known data points using functions like polynomials or splines.
Question: Why do we use numerical integration?

Ans: To estimate integrals when analytical solutions are complex or impossible, using methods like
trapezoidal or Simpson’s rule.
P a g e | 11

Interpolation with Equal Interval:

 The Difference Table:


Let 𝑦 = (𝑥) is a function of 𝑥, 𝑥 being given at an equal interval. Let the values of 𝑥 be 𝑎,
𝑎 + ℎ, 𝑎 + 2ℎ and so on and the corresponding values of y be (𝑎), (𝑎 + ℎ), 𝑓(𝑎 + 2ℎ) and
so on. Then the forward and backward differences can be calculated from the forward
differenc

Argument Entry First differences Second differences


𝑥 𝑦 = 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥)
𝑎 𝑓(𝑎)

𝑓(𝑎 + ℎ) − 𝑓(𝑎) = ∆𝑓(𝑎)

𝑎+ℎ 𝑓(𝑎 + ℎ) ∆𝑓(𝑎 + ℎ) − ∆𝑓(𝑎) =


∆2𝑓(𝑎)
𝑓(𝑎 + 2ℎ) − 𝑓(𝑎 + ℎ) =
∆𝑓(𝑎 + ℎ)
𝑎 + 2ℎ 𝑓(𝑎 + 2ℎ) ∆𝑓(𝑎 + 2ℎ) − ∆𝑓(𝑎 +
ℎ) = ∆2𝑓(𝑎 + ℎ)
𝑓(𝑎 + 3ℎ) − 𝑓(𝑎 + 2ℎ) =
∆𝑓(𝑎 + 2ℎ)
𝑎 + 3ℎ 𝑓(𝑎 + 3ℎ) ∆𝑓(𝑎 + 3ℎ) − ∆𝑓(𝑎 +
2ℎ) = ∆2𝑓(𝑎 + 2ℎ)
𝑓(𝑎 + 4ℎ) − 𝑓(𝑎 + 3ℎ) =
∆𝑓(𝑎 + 3ℎ)
𝑎 + 4ℎ 𝑓(𝑎 + 4ℎ)

Similarly we can calculate third and higher order differences from the table. Here we have
taken forward differences therefore this table is known as forward difference table.
P a g e | 12

Backward Difference Table:

Argument Entry First differences Second differences


𝑥 𝑦 = 𝑓(𝑥) ∇𝑓(𝑥) ∇2𝑓(𝑥)
𝑎 𝑓(𝑎)

𝑓(𝑎 + ℎ) − 𝑓(𝑎) = ∇𝑓(𝑎 +


ℎ)
𝑎+ℎ 𝑓(𝑎 + ℎ) ∇𝑓(𝑎 + 2ℎ) − ∇𝑓(𝑎 +
ℎ) = ∇2𝑓(𝑎 + 2ℎ)
𝑓(𝑎 + 2ℎ) − 𝑓(𝑎 + ℎ) =
∇𝑓(𝑎 + 2ℎ)
𝑎 + 2ℎ 𝑓(𝑎 + 2ℎ) ∇𝑓(𝑎 + 3ℎ) − ∇𝑓(𝑎 +
2ℎ) = ∇2𝑓(𝑎 + 3ℎ)
𝑓(𝑎 + 3ℎ) − 𝑓(𝑎 + 2ℎ) =
∇𝑓(𝑎 + 3ℎ)
𝑎 + 3ℎ 𝑓(𝑎 + 3ℎ) ∇𝑓(𝑎 + 4ℎ) − ∇𝑓(𝑎 +
3ℎ) = ∇2𝑓(𝑎 + 4ℎ)
𝑓(𝑎 + 4ℎ) − 𝑓(𝑎 + 3ℎ) =
∇𝑓(𝑎 + 4ℎ)
𝑎 + 4ℎ 𝑓(𝑎 + 4ℎ)

Similarly we can calculate third and higher order differences from the table. Here we have
taken backward differences therefore this table is known as backward difference table.

Newton’s Forward Interpolation Formula:

Theory:
Let the function y  f(x) who takes the values y0 , y1 ,  , yn corresponding to the values x0,
x1,  , xn of x.

X: 𝑥0 𝑥1 𝑥2, … , xn
Y: 𝑦0 𝑦1 𝑦2, … , 𝑦𝑛

Let these values of x are in equidistance, such that xi  x0  ih (i  0,1,). Assuming y(x) to
be a polynomial of the nth degree in x such that y(x0) =y0, y(x1)=y1, ... , y(xn)=yn. Then we can
write,
P a g e | 13

(𝑥) =a0 +a1(x-x0) +a2(x-x0) (x-x1) +a3(x-x0) (x-x1) (x-x2) +…+an(x-x0) (x-
x1)…(x-xn-1)................................... (1)
Putting x=x0, x1, …,xn successively in (1), we get that
𝑦0=a0, y1=a0+a1(x1-x0), y2=a0+a1(x2-x0) + a2(x2-x0) (x2-x1) ........ and so on.

From these, we find that a0= Y0, ∆y0=y1-y0=a1(x1-x0) = a1h


1
 a1 = ∆y0
h

Also, ∆y1 = y2-y1 = a1(x2-x1) + a2(x2-x0) (x2-x1)


=a1h+a2h.h = ∆y0 + 2h2a2
1 1
 a2 = 2
(∆y1 - ∆y0) = 2 ∆2y0
2h 2!h

1 3
Similarly a3 = ∆ y0 and so on.
3!h3

Substituting these values in (1), we obtain


1
Y(x) = y0+∆y0 (x-x0) + 1
∆2y0(x-x0) (x-x1) +
2
h 2!h

1 3
∆ y0(x-x0)(x-x1)(x-x2)+............................... (2)
3!h3

Now if it is required to evaluate y for x  x0  uh, then


(x-x0)=uh, x-x1=x-(x0+h)=(x-x0) –h =uh-h =(u-1)h, and many more.
Hence writing y(x) = y(x0+uh)=yu , (2) becomes
u(u 1) 2
Yu=y0 + u∆y0 + ∆ y0 + u(u 1)(u  2) ∆3y0 + …
2! 3!

+ u(u 1)(u  2)...(u  n 1) ∆ny.......................... (3)


n!

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


for forward difference as formula (3) contains y0 and the forward differences of y0.
P a g e | 14

 Problem Solving Using Newton’s Forward Interpolation Formula:

Question 1:
A second degree polynomial passes through (0,1), (1,3), (2,7), (3,13). Find the polynomial.
Solution:
The difference table:
x f (x) f (x) 2 f (x) 3 f (x)
0 1
2
1 3 2
4 0
2 7 2
6
3 13

By Newton’s forward interpolation formula,


u(u 1)
f (a  nh  uh)  f (a  nh)  uf (a  nh)  2 f (a  nh) 
2!
u(u 1)(u  2) 3 u(u 1)(u  2)(u  3) 4
 f (a  nh)   f (a  nh)
3! 4!
Expanding up to second order differences only.
Putting a=0, h=1, u=x so that
x(x 1)
f (x)  f (0)  xf (0)  2 f (0)
2!

=1+2x+x2-x
= x2+x+1
This is the required polynomial.

Question 2:
The following table is given:
x 0 1 2 3 4
f(x) 3 6 11 18 27
P a g e | 15

What is the form of the function?


Solution:
The difference table:
x f (x) f (x) 2 f (x) 3 f (x)
0 3
3
1 6 2
5 0
2 11 2
7 0
3 18 2
9
4 27

By Newton’s forward interpolation formula,


u(u 1)
f (a  nh  uh)  f (a  nh)  uf (a  nh)  2 f (a  nh) 
2!
u(u 1)(u  2) 3 u(u 1)(u  2)(u  3) 4
 f (a  nh)   f (a  nh)
3! 4!
Expanding up to second order differences only.
x(x 1)
f (x)  f (0)  xf (0)  2 f (0)
2!

=x2+2x+3
This is the required polynomial.

Question 3:
The population of a country in the decennial census were as under. Estimate the population
for the year 1925.
Years: 1891 1901 1911 1921 1931
Population: 46 66 81 93 101
Solution:
1925 1891
Here, u   3.4
10
P a g e | 16

The difference table:


x f (x) f (x) 2 f (x) 3 f (x) 4 f (x)
1891 46
20
1901 66 -5
15 2
1911 81 -3 -3
12 -1
1921 93 -4
8
1931 101

By Newton’s forward interpolation formula,


u(u 1)
f (a  nh  uh)  f (a  nh)  uf (a  nh)  2 f (a  nh) 
2!
u(u 1)(u  2) 3 u(u 1)(u  2)(u  3) 4
 f (a  nh)   f (a  nh)
3! 4!
3.4(2.4) 3.4(2.4)(1.4)
f (1925)  46  3.4(20)  (5)  (2)
2 6
3.4(2.4)(1.4)(.4)
 (3)
24
=96.8368 approx.

 Newton Gregory Formula for Backward Interpolation:

Theory: The backward difference for any function is defined to be


f (x)  f (x)  f (x  h) .

Here, h being the interval of differencing.


Now suppose we are given (n 1) values for the function f(x) and independent variable x is
at equal intervals i.e.,
x  a, a  h, a  2h,..., a  nh

Then to n 1 observations, we can fit a polynomial of nth degree. Let the polynomial be
f (x)  A0  A1 (x  a  nh)  A2 (x  a  nh)(x  a  (n 1)h)  ...  An (x  a  nh)(x  a  n 1h)...(x  a  h)

Where A0 , A1, A2 ,..., An are determined in such a way that f (x) gives the observed values for
P a g e | 17

x  a  nh, a  n 1h,... and a

Putting x  a  nh, a  n 1h,... in succession, we get

f (a  nh)  A0

f (a  n 1h)  A0  A1(h)

i.e., A1  f (a  nh)  f (a  n 1h)  f (a  nh)


h h

Similarly,
2 f (a  nh)
A2  

2h2

……………..
n f (a  nh)
An  

hn.n!

Substituting these values in (1), we obtain

𝛻𝑛𝑦
𝑌(𝑥) = 𝑦𝑛 + 𝛻𝑦𝑛 (𝑥 − 𝑥𝑛 ) + 𝛻 2 𝑦𝑛 (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 ) + ⋯ … … … … … . 𝑛!ℎ𝑛𝑛 𝛻 𝑛 𝑦𝑛 (𝑥 − 𝑥𝑛 )(𝑥 −
𝑥𝑛−1 ) … … . (𝑥 − 𝑥1 ) … … … … . … (2)
𝑥−𝑥𝑛
Now, let =𝑢

𝑜𝑟, 𝑥 = 𝑥𝑛 + 𝑢ℎ

𝑥−𝑥𝑛−1 𝑥𝑛 +ℎ𝑢−𝑥𝑛−1 ℎ𝑢+(𝑥𝑛 −𝑥𝑛−1 )


Again, = = =𝑢+1
ℎ ℎ ℎ

Hence equation(2) becomes,

𝛻𝑦 𝛻2 𝑦 𝛻3 𝑦
𝑓(𝑥) = 𝑦𝑛 + 1!𝑛 𝑢 + 2! 𝑛 𝑢(𝑢 − 1) + 3! 𝑛 𝑢(𝑢 − 1)(𝑢 − 2) … … … … … … … ..This is called the
Newton’s backward interpolation formula or Newton-Gregory formula for backward difference.
P a g e | 18

• Problem Solving Using Newton’s Forward Interpolation Formula:

Question 1:

A second degree polynomial passes through (0,1), (1,3), (2,7), (3,13). Find the polynomial.

Solution:

The difference table:


x 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥)
0 1
2
1 3 2
4 0
2 7 2
6
3 13

By Newton’s forward interpolation formula,

𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!

Expanding up to second order differences only.

Putting a=0, h=1, u=x so that

𝑥(𝑥 − 1) 2
𝑓(𝑥) = 𝑓(0) + 𝑥∆𝑓(0) + ∆ 𝑓(0)
2!

=1+2x+x2-x

= x2+x+1

This is the required polynomial.

Question 2:

The following table is given:

X 0 1 2 3 4

F(x) 3 6 11 18 27
What is the form of the function? P a g e | 19

Solution:

The difference table:


𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥)
0 3

1 6 2
5 0
2 11 2

7 0

3 18 2
9

4 27

By Newton’s forward interpolation formula,

𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!

Expanding up to second order differences only.

𝑥(𝑥 − 1) 2
𝑓(𝑥) = 𝑓(0) + 𝑥∆𝑓(0) + ∆ 𝑓(0)
2!

=x2+2x+3

This is the required polynomial.

Question 3:
The population of a country in the decennial census were as under. Estimate the population for the year 1925.
Years: 1891 1901 1911 1921 1931

Population: 46 66 81 93 101
Solution: P a g e | 20

1925−1891
Here, u = 10
= 3.4
The difference table:

𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥) ∆4 𝑓(𝑥)

1891 46

20
1901 66 -5
15 2

1911 81 -3 -3

12 -1
1921 93 -4

8
1931 101

By Newton’s forward interpolation formula,

𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!

3.4(2.4) 3.4(2.4)(1.4) 3.4. (2.4)(1.4)(. 4)


𝑓(1925) = 46 + (−5) + (2) + (−3)
2 6 24
= 96.8368 𝑎𝑝𝑝𝑟𝑜𝑥

• Newton Gregory Formula for Backward Interpolation:

Theory: The backward difference for any function is defined to

be ∇𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)

Here, h being the interval of differencing.

Now suppose we are given (n+1) values for the function f(x) and independent variable x is at equal intervals
i.e.,

x = a,a+h ,a+2h,...,a+nh

Then to ̅̅̅̅̅̅̅
𝑛 + 1 observations, we can fit a polynomial of n th degree. Let the polynomial be
𝑓(𝑥) = 𝐴0 + 𝐴1 (𝑥 − ̅̅̅̅̅̅̅̅̅ 𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ) + 𝐴2 (𝑥 − ̅̅̅̅̅̅̅̅̅ 𝑎 + (𝑛 − 1)ℎ) + ⋯
+ 𝐴𝑛 (𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛 − 𝑙ℎ) … (𝑥 − 𝑎ℎ ̅̅̅̅)
P a g e | 21
Where 𝐴0 , 𝐴1 , 𝐴2 , … 𝐴𝑛 are determined in such way that f(x) gives the observed values for

𝑥 = 𝑎 + 𝑛ℎ, 𝑎 + ̅̅̅̅̅̅̅̅̅
𝑛 − 𝑙ℎ, … 𝑎𝑛𝑑 𝑎

Putting x=a+nh, 𝑎 + ̅̅̅̅̅̅̅̅̅


𝑛 − 𝑙ℎ, … 𝑖𝑛 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑖𝑜𝑛 , 𝑤𝑒 𝑔𝑒𝑡

𝑓(𝑎 + 𝑛ℎ) = 𝐴0

𝑓(𝑎 + ̅̅̅̅̅̅̅̅̅
𝑛 − 𝑙ℎ) = 𝐴0 + 𝐴1 (−ℎ)

𝑓(𝑎 + 𝑛ℎ) − 𝑓(𝑎 + ̅̅̅̅̅̅̅̅̅


𝑛 − 𝑙ℎ) ∇𝑓(𝑎 + 𝑛ℎ)
𝑖. 𝑒, 𝐴1 = =
ℎ ℎ

∇2 𝑓(𝑎 + 𝑛ℎ)
𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦, 𝐴2 =
2ℎ2
…………………………………

∇𝑛 𝑓(𝑎 + 𝑛ℎ)
𝐴𝑛 =
𝑛! ℎ𝑛

Substracting the values of 𝐴0 , 𝐴1 , 𝐴2 , … 𝐴𝑛 , we get

∇𝑓(𝑎 + 𝑛ℎ) ∇2 𝑓(𝑎 + 𝑛ℎ)


𝑓(𝑥) = 𝑓(𝑎 + 𝑛ℎ) + (𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ) + 𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
(𝑥 − ̅̅̅̅̅̅̅̅̅ 𝑎 + (𝑛 − 1)ℎ) + ⋯
ℎ 2ℎ2
𝑛
∇ 𝑓(𝑎 + 𝑛ℎ)
+ (𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛 − 𝑙ℎ) … (𝑥 − ̅𝑎ℎ̅̅̅)
𝑛! ℎ𝑛

Now if we take the origin at x=a+nh, then let


𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ
𝑢=

Where x is the value to be interpolated and h is the width of the interval. Then it can be written as

̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 + 1)(𝑢 + 2)(𝑢 + 3) 4 𝑢(𝑢 + 1) … (𝑢 + 𝑛 − 1) 𝑛
+ ∇ 𝑓(𝑎 + 𝑛ℎ) + ⋯ + ∇ 𝑓(𝑎 + 𝑛ℎ)
4! 𝑛!

This is known as Newton-Gregory formula for backward difference.

• Problem Solving Using Newton’s Backward Interpolation Formula:

Question 1: Given

x 1 2 3 4 5 6 7 8

f(x) 1 8 27 64 125 216 343 512

Estimate f(7.5)
Solution: P a g e | 22

The value to be interpolated lies at the end of the given observations i.e. near 8. So in this case Newton’s

backward formula will be more suitable.

Here,
𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ 7.5 − 8
𝑢= = = −0.5
ℎ 1

The difference table:

𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥)

1 1
7

2 8 12
19 6
3 27 18
37 6
4 64 24
61 6

5 125 30
91 6
6 216 36
127 6
7 343 42
169
8 512

Since ∇3 𝑓(𝑥) is constant, we can leave higher order differences.

By Newton’s backward interpolation formula,

̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!

(−.5)(−.5 + 1) 2 (−.5)(−.5 + 1)(−.5 + 2) 3


𝑓(7.5) = 𝑓(8) + (−.5)∇𝑓(8) + ∇ 𝑓(8) + ∇ 𝑓(8)
2! 3!

= 512 − 84.5 − 5.25 − .375 = 421.875


P a g e | 23

Question 2: Given

sin45=0.7071 sin50=0.7660 sin55=0.8192

sin60=0.8660

Find sin52 by using backward interpolation method.

Solution:

Here, we have
x: 45 50 55 60

f(x): .7071 .7660 .8192 .8660

The difference table:

𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥)

45 .7071
.0589

50 .7660 -.0057
.0532 -.0007
55 .8192 -.0064

.0468
60 .8660

52−45
Here,𝑢 = 5
= 1.4

̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!

(1.4)(1.4 + 1) 2 (1.4)(1.4 + 1)(1.4 + 2) 3


𝑓(52) = 𝑓(45) + (1.4)∇𝑓(45) + ∇ 𝑓(45) + ∇ 𝑓(45)
2! 3!

= .7786512 𝑎𝑝𝑝𝑟𝑜𝑥
P a g e | 24

Question 3:

Using Newton’s formula for interpolation, estimate the population for the year 1905:

Year Population
1891 98, 752

1901 132,285

1911 168,076

1921 195,690

246,050
1931

Solution:

The difference table:

𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2 𝑓(𝑥) ∆3 𝑓(𝑥) ∆4 𝑓(𝑥)

1891 98752

33533
1901 132285 2258

35791 -10435
1911 168076 -8177 41358

27614 30923
1921 195690 22746

50360
1931 246050

1905−1891
Here,𝑢 = 10
= 1.4

̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!

𝑓(1905) = 147841 𝑎𝑝𝑝𝑟𝑜𝑥

Interpolation with Unequal Interval


• Newton’s Divided Difference:

Divided Differences:
A divided difference is defined to be the difference between two successive values of the entry divided by
the difference between the corresponding value of the arguments e.g given the following values of the
P a g e | 25

function y = f (x)
x a b c d e
F(x) f(a) f(b) f(c) f(d) f(e)

𝑓(𝑏)−𝑓(𝑎)
the first divided difference at x(a)= is 𝑏−𝑎
𝑓(𝑐)−𝑓(𝑏)
the first divided difference at x(b)= is
𝑐−𝑏

Let f (x0), f(x1),... f(xn) be the values of f(x) corresponding to the arguments x0, x1,...xn, not necessarily equally
spaced. From the definition of divided differences

𝑓(𝑥) − 𝑓(𝑥0 )
𝑓(𝑥, 𝑥0 ) =
𝑥 − 𝑥0

𝑜𝑟, 𝑓(𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥, 𝑥0 ) … … … … (1)

𝑓(𝑥, 𝑥0 ) − 𝑓(𝑥0 , 𝑥1 )
𝐴𝑙𝑠𝑜 𝑓(𝑥, 𝑥0 , 𝑥1 ) =
𝑥 − 𝑥1

𝑜𝑟, 𝑓(𝑥, 𝑥0 ) = 𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥1 )𝑓(𝑥, 𝑥0 , 𝑥1 ) … … … … (2)

𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦, 𝑓(𝑥, 𝑥0 , 𝑥1 ) = 𝑓(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥 − 𝑥2 )𝑓(𝑥, 𝑥0 , 𝑥1 , 𝑥2 ) … … … (3)


………………………………………………………………………………..

………………………………………………………………………………..

𝑓(𝑥, 𝑥0 , 𝑥1 … , 𝑥𝑛−1 ) = 𝑓(𝑥0 , 𝑥1 , … 𝑥𝑛 ) + (𝑥 − 𝑥𝑛 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ) … … … … (4)

Multiplying the equation (2) by (𝑥 − 𝑥0 ) ,(3) by (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) and so on and finally the equation (4)

by (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 − 𝑥𝑛−1 )and adding to the equation (1),we have ,


𝑓(𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓 (𝑥0 , 𝑥1 , 𝑥2 ) + ⋯ + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 −
𝑥𝑛−1 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ) + 𝑅𝑛

𝑊ℎ𝑒𝑟𝑒 𝑡ℎ𝑒 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑅𝑛 𝑖𝑠 𝑔𝑖𝑣𝑒𝑛 𝑏𝑦

𝑅𝑛 = (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 − 𝑥𝑛−1 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ).

Assuming that 𝑓(𝑥) is a polynomial of degree n,


𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ) vanishes so that
𝑓(𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓 (𝑥0 , 𝑥1 , 𝑥2 ) + ⋯ + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 −
𝑥𝑛−1 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ) ………………………………….(5)
This formula is called Newton’s divided difference interpolation formula.
P a g e | 26

Viva Question:

1. What is the formula for Newton’s Backward interpolation?

Answer:
𝑓(𝑎 − ̅̅̅̅̅̅̅̅̅̅̅̅
ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2!
𝑢(𝑢 + 1)(𝑢 + 2) 3 𝑢(𝑢 + 1)(𝑢 + 2)(𝑢 + 3) 4
+ ∇ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
3! 4!
𝑢(𝑢 + 1) … (𝑢 + 𝑛 − 1) 𝑛
+⋯+ ∇ 𝑓(𝑎 + 𝑛ℎ)
𝑛!

2. What is the formula for Newton’s Divided Difference interpolation?

Answer: 𝑓(𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓 (𝑥0 , 𝑥1 , 𝑥2 ) + ⋯ +


(𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 − 𝑥𝑛−1 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 )

3. What is the Rn th term is Newton’s Divided Difference?

Answer: 𝑅𝑛 = (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )... (𝑥 − 𝑥𝑛−1 )𝑓(𝑥, 𝑥0 , 𝑥1 , … , 𝑥𝑛 ).


P a g e | 27

Problem Solving Using Newton Divided Difference Formula:

Question 1:
Find the polynomial from the given values using Newton’s divided difference formula:
X 3 2 1 -1
F(x) 3 12 15 -21

Solution:
The difference table:
x f(x) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
3 3

(12 − 3)
= −9
(2 − 3)

2 12 (−3 + 9)
= −3
(1 − 3)

(15 − 12) (−7 + 3)


= −3 =1
1 15 (1 − 2) (−1 − 3)
(18 + 3)
= −7
(−1 − 2)
(−21 − 15)
15 -21 = 18
(−1 − 1)

By Using Newton divided difference formula,


𝑓(𝑥) = 𝑓(3) + 𝑓(𝑥 − 3)∆𝑓(3) + (𝑥 − 3)(𝑥 − 2)∆2𝑓(𝑥) + (𝑥 − 3)(𝑥 − 2)(𝑥 − 1)∆3𝑓(3)
(𝑥) = 3 + (𝑥 − 3)(−9) + (𝑥 − 3)(𝑥 − 2)(−3) + (𝑥 − 3)(𝑥 − 2)(𝑥 − 1)(1)
(𝑥) = 𝑥3 − 9𝑥2 + 17𝑥 + 6
P a g e | 28

Question 2:
Find the polynomial using Newton’s divided difference formula from the following table
x 0 2 3 4 7 9
F(x) 4 26 58 112 466 922

Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥) ∆ 4𝑓(𝑥)
0 4
(26 − 4)
= 11
(2 − 0)
2 26 (32 − 11)
(3 − 0)
(58 − 26) =7 (11 − 7)
= 32
(2 − 3) (4 − 0)
=1 0
3 58 (54 − 32)
(4 − 2)
(112 − 58) = 11 (16 − 11)
= 54
(4 − 3) (7 − 2)
4 112 (1 − 1)
=1
(118 − 54) (9 − 3)
(7 − 3) =0
(466 − 112) = 16
= 118 (22 − 16)
(7 − 4)
7 466 (9 − 4)
=1

(922 − 466) (228 − 118)


= 228
(9 − 7) (9 − 4)
= 22
9 922

By Newton divided difference formula,


𝑓(𝑥) = 𝑓(0) + (𝑥 − 0)∆𝑓(0) + (𝑥 − 0)(𝑥 − 2)∆2𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)∆3𝑓(0)
+ (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)∆4𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)(𝑥
− 7)∆5𝑓(0)
Putting the values we get,
f(x) = 4 + x(11) + x(x − 2)7 + x(x − 2)(x − 3)1
(𝑥)=𝑥3 + 2𝑥2 + 3𝑥 + 4
P a g e | 29

Question 3:
Find the polynomial from following data by using newton general interpolation formula for
divided difference and hence find y at x=3,x=9
x 2 4 5 6 8 10
f(x) 10 96 196 350 868 1746

Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥) ∆3𝑓(𝑥)

2 10 (96 − 10)
= 43
(4 − 2)
(100 − 43)
= 19
4 96 (5 − 2)
(26 − 4) (27 − 19)
= 100 =2
(5 − 4) (6 − 2)
5 196 (154 − 100) 0
(6 − 4)
350 − 196 = 27 (35 − 27)
=2
(6 − 5) (8 − 4)
6 350
= 154
(259 − 154) 0
(8 − 5) (45 − 35)
=2
(868 − 350) = 35 (10 − 5)
8 868 (8 − 6)
= 259
(439 − 259)
(10 − 6)
(1746 − 868) = 45
(10 − 8)
10 1746 = 439

By Newton divided difference formula,


𝑓(𝑥) = 𝑓(0) + (𝑥 − 0)∆𝑓(0) + (𝑥 − 0)(𝑥 − 2)∆2𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)∆3𝑓(0)
+ (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)∆4𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)(𝑥
− 7)∆5𝑓(0)
(𝑥) = 10 + (𝑥 − 2)43 + (𝑥 − 2)(𝑥 − 4)19 + (𝑥 − 2)(𝑥 − 3)(𝑥 − 4)2
(𝑥) = 2𝑥3 − 3𝑥2 + 5𝑥
𝑝𝑢𝑡 𝑥 = 3, 𝑥 = 9
(3) = 42, (9) = 1260
P a g e | 30

Question 4:
Find the polynomial from following data by using newton general interpolation formula for
divided difference and find f(8),f(15).
𝑥 4 5 7 10 11 13
𝑓(𝑥) 48 100 294 900 1210 2028

Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥) ∆ 4𝑓(𝑥)
4 48
(100 − 48)
= 52
(5 − 4)
5 100 (97 − 52)
= 15
(7 − 4)
(294 − 100) (21 − 15)
= 97 =1
(10 − 5) (10 − 4)
7 294 (202 − 47)
= 21 0
(10 − 5)
(900 − 294)
(27 − 21)
(10 − 7) =1
10 900 (11 − 5)
= 202
(310 − 202)
= 27 0
(11 − 7)
(1210 − 900)
11 1210 (33 − 27)
(11 − 10) =1
= 310 (13 − 10)
(404 − 310)
= 33
(13 − 10)

13 2028 (310 − 202)


(13 − 11)
= 404

By Newton divided difference formula,


𝑓(𝑥) = 𝑓(0) + (𝑥 − 0)∆𝑓(0) + (𝑥 − 0)(𝑥 − 2)∆2𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)∆3𝑓(0)
+ (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)∆4𝑓(0) + (𝑥 − 0)(𝑥 − 2)(𝑥 − 3)(𝑥 − 4)(𝑥
− 7)∆5𝑓(0)
(𝑥) = 48 + (𝑥 − 4)52 + (𝑥 − 5)(𝑥 − 4)15 + (𝑥 − 4)(𝑥 − 5)(𝑥 − 1)1
(𝑥) = 𝑥3 − 𝑥2
𝑝𝑢𝑡 𝑥 = 8, 𝑥 = 15
(8) = 448, (15) = 3150
P a g e | 31

Question 5:
Find the polynomial from following data by using newton general interpolation formula for
divided difference
𝑥 0 1 2 5
𝑓(𝑥) 2 3 12 147

Solution:
The difference table :
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥)
0 2
(3 − 2)
(1 − 0)
1 3 =1 (9 − 1)
=4
(2 − 0)
(12 − 3) (9 − 4)
=1
(2 − 1) (5 − 0)
2 12 =9 (45 − 9)
=9
(5 − 1)

(147 − 12)
5 147
(5 − 2)
= 45

By Newton divided difference formula,


𝑓(𝑥) = 𝑓(0) + (𝑥 − 0)∆𝑓(0) + (𝑥 − 0)(𝑥 − 1)∆2𝑓(0) + (𝑥 − 0)(𝑥 − 1)(𝑥 − 2)𝑓(0)
(𝑥) = 2 + (𝑥 − 0)1 + (𝑥 − 0)(𝑥 − 1)4 + (𝑥 − 0)(𝑥 − 1)(𝑥 − 2)1
= 2 + 𝑥 + (𝑥 − 1)4 + ((𝑥 − 1)(𝑥 − 2)
= 2 + 𝑥 + (𝑥2 − 𝑥)4 + 𝑥(𝑥2 − 2𝑥 − 𝑥 + 2)
𝑦 = 𝑥3 + 𝑥2 − 𝑥 + 2
P a g e | 32

Lagrange’s Interpolation Formula for unequal Intervals:

Let, (𝑥) denotes a polynomial of the n-th degree which takes the values 𝑦0 , 𝑦1 , 𝑦2 , … . 𝑦𝑛

We know that the (n+1)th differences of this polynomial are zero and hence we have

𝑓(𝑥0 , 𝑥1 , 𝑥2 , … . , 𝑥𝑛 ) = 0 … … … … … … … … (1)

But we have, (𝑥0, 𝑥1, 𝑥2, … … , 𝑥𝑛) =


𝑦 𝑦0
From (1) we can write: (𝑥−𝑥 )(𝑥−𝑥 )(𝑥−𝑥 )…..(𝑥−𝑥
+ (𝑥 )(𝑥
0 1 2 𝑛) 0 −𝑥)(𝑥0 −𝑥1 0 −𝑥2 )…..(𝑥0 −𝑥𝑛 )
𝑦1 𝑦𝑛
+ (𝑥1 −𝑥)(𝑥1 −𝑥0 )(𝑥1 −𝑥2 )…..(𝑥1 −𝑥𝑛 )
+…..(𝑥 −𝑥)(𝑥 −𝑥 )(𝑥 −𝑥 )
𝑛 𝑛 1 𝑛 𝑛−1

From (1) we can write:

(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
𝑦= 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … . (𝑥0 − 𝑥𝑛 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … . (𝑥1 − 𝑥𝑛 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
+ 𝑦
(𝑥2 − 𝑥0 )(𝑥1 − 𝑥2 ) … . (𝑥2 − 𝑥𝑛 ) 2
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 )
+ ⋯….+ 𝑦 … … . (2)
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … . (𝑥𝑛 − 𝑥𝑛−1 ) 𝑛

This is also the Lagrange’s formula of interpolation for unequal interval. Now,by interchanging x
and y in (2) we have: 𝑥
(𝑦 − 𝑦1 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 ) (𝑦 − 𝑦0 )(𝑦 − 𝑦𝑛 ) … (𝑦 − 𝑦𝑛 )
𝑥= 𝑥0 + 𝑥
(𝑦0 − 𝑦1 )(𝑦0 − 𝑦2 ) … . (𝑦0 − 𝑦𝑛 ) (𝑦1 − 𝑦0 )(𝑦1 − 𝑦2 ) … . (𝑦1 − 𝑦𝑛 ) 1
(𝑦 − 𝑦0 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 )
+ 𝑥
(𝑦2 − 𝑦0 )(𝑦1 − 𝑦2 ) … . (𝑦2 − 𝑦𝑛 ) 2
(𝑦 − 𝑦0 )(𝑦 − 𝑦1 ) … (𝑦 − 𝑦𝑛−1 )
+ ⋯….+ 𝑥 … … . (2)
(𝑦𝑛 − 𝑦0 )(𝑦𝑛 − 𝑦1 ) … . (𝑦𝑛 − 𝑦𝑛−1 ) 𝑛

• Problem Solving Using Lagrange’s Interpolation:

Question 1:

The values of y and x are given as below:


𝒙 𝟓 𝟔 𝟗 𝟏𝟏
𝒚 12 13 14 16
P a g e | 33

Find the value of y when 𝑥 = 10.

Solution:

Here, 𝑥 = 10, 𝑥0 = 5, 𝑥1 = 6, 𝑥2 = 9, 𝑥3 = 11 and 𝑦0 = 12, 𝑦1 = 13, 𝑦2 = 14, 𝑦3 = 16 .

By Lagrange’s formula, we have,


(𝑥−𝑥1 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥3 )
𝑦 = (𝑥 𝑦0 + (𝑥 𝑦1 + (𝑥 𝑦2 +
0 −𝑥1 )(𝑥0 −𝑥2 )(𝑥0 −𝑥3 ) 1 −𝑥0 )(𝑥1 −𝑥2 )(𝑥1 −𝑥3 ) 2 −𝑥0 )(𝑥2 −𝑥1 )(𝑥2 −𝑥3 )
(𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥2 )
𝑦
(𝑥3 −𝑥0 )(𝑥3 −𝑥1 )(𝑥3 −𝑥2 ) 3
… … … … … … (1)

Substituting the values of 𝑥, 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3, 𝑦0 , 𝑦1 , 𝑦2 , 𝑦3 in (1) we get,


(10−6)(10−9)(10−11) (10−5)(10−9)(10−11) (10−5)(10−6)(10−11)
𝑦= (5−6)(5−9)(5−11)
× 12 + (6−5)(6−9)(6−11)
× 13 + (9−5)(9−6)(9−11)
× 14 +
(10−5)(10−6)(10−9)
(11−5)(11−6)(11−9)
× 16

⇒ 𝑦 = 2 − 4.33 + 11.66 + 5.33 = 14.66

So, the value of y=14.66 when 𝑥 = 10.

Question 2:

The following values of the function (𝑥) for values of x are given:
(1) = 4, (2) = 5, 𝑓(7) = 5, 𝑓(8) = 4.

Find the value of (6).

Solution:

We know that, the Lagrange’s formula is:


(𝑥−𝑥1 )(𝑥−𝑥2 )…(𝑥−𝑥𝑛 ) (𝑥−𝑥0 )(𝑥−𝑥2 )…(𝑥−𝑥𝑛 ) (𝑥−𝑥0 )(𝑥−𝑥1 )...(𝑥−𝑥𝑛−1 )
𝑦 = (𝑥 𝑦0 + (𝑥 𝑦1 + ⋯ … + (𝑥 𝑦𝑛
0 −𝑥1 )(𝑥0 −𝑥2 )…(𝑥0 −𝑥𝑛 ) 1 −𝑥0 )(𝑥1 −𝑥2 )…(𝑥1 −𝑥𝑛 ) 𝑛 −𝑥0 )(𝑥𝑛 −𝑥1 )...(𝑥𝑛 −𝑥𝑛−1 )

Now by the Lagrange’s formula, we get,

(6−2)(6−7)(6−8) (6−1)(6−7)(6−8) (6−1)(6−2)(6−8) (6−1)(6−2)(6−7)


𝑦 = (1−2)(1−7)(1−8) × 4 + (2−1)(2−7)(2−8) × 5 + (7−1)(7−2)(7−8) × 5 + (8−1)(8−2)(8−7) × 4

4 5 5
⇒ 𝑦 = − 42 (6 − 2)(6 − 7)(6 − 8) + 30 (6 − 1)(6 − 7)(6 − 8) − 30 (6 − 1)(6 − 2)(6 − 8) +
4
(6 − 1)(6 − 2)(6 − 7)
42
4 5 5 4
⇒ 𝑦 = − 42 × 8 + 30 × 10 − 30 × (−40) + 42 × (−20)

16 5 20 40
⇒ 𝑦 = − 21 + 3 + − 21
3
17 P a g e | 34
∴𝑦= ≈ 5.66
3

Question 3:

For the following table find the form of the function (𝑥).
𝒙 𝟎 𝟏 𝟐 𝟓
𝒇(𝒙) 2 3 12 147

Solution:
Here, 𝑥0 = 0, 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 5

By Lagrange’s formula, we have,


(𝑥−𝑥1 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥3 )
𝑓(𝑥) = (𝑥 𝑓(𝑥0 ) + (𝑥 𝑓(𝑥1 ) + (𝑥 𝑓(𝑥2 ) +
0 −𝑥1 )(𝑥0 −𝑥2 )(𝑥0 −𝑥3 ) 1 −𝑥0 )(𝑥1 −𝑥2 )(𝑥1 −𝑥3 ) 2 −𝑥0 )(𝑥2 −𝑥1 )(𝑥2 −𝑥3 )
(𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥2 )
(𝑥3 −𝑥0 )(𝑥3 −𝑥1 )(𝑥3 −𝑥2 )
𝑓(𝑥3 ) … … … … … … (1)

Substituting the values of 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 in (1) we get,


(𝑥−1)(𝑥−2)(𝑥−5) (𝑥−0)(𝑥−2)(𝑥−5) (𝑥−0)(𝑥−1)(𝑥−5) (𝑥−0)(𝑥−1)(𝑥−2)
𝑓(𝑥) = (0−1)(0−2)(0−5)
× 2 + (1−0)(1−2)(1−5) × 3 + (2−0)(2−1)(2−5) × 12 + (5−0)(5−1)(5−2) × 147

𝑓(𝑥) 1 3 2 49
⇒ 𝑥(𝑥−1)(𝑥−2)(𝑥−5) = − 5𝑥 + 4(𝑥−1) − 𝑥−2 + 20(𝑥−5)

20𝑥 3 +20𝑥 2 −20𝑥+40


= 20𝑥(𝑥−1)(𝑥−2)(𝑥−5)
∴ 𝑓(𝑥) = 𝑥 3 + 𝑥 2 − 𝑥 + 2

Question 4:
Using interpolation estimate the output of a factory in 1986 from the following data:
Year 1974 1978 1982 1990
Output in 1000
25 60 80 170
tones

Solution:

Here, 𝑥 = 1986, 𝑥0 = 1974, 𝑥1 = 1978, 𝑥2 = 1982, 𝑥3 = 1990 and 𝑦0 = 25, 𝑦1 =


60, 𝑦2 = 80, 𝑦3 = 170 .
By Lagrange’s interpolation formula, we have,
(𝑥−𝑥1 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥2 )(𝑥−𝑥3 ) (𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥3 )
𝑦 = (𝑥 𝑦 + (𝑥
) 0
𝑦 + (𝑥
) 1
𝑦2 +
0 −𝑥1 )(𝑥0 −𝑥2 )(𝑥0 −𝑥3 1 −𝑥0 )(𝑥1 −𝑥2 )(𝑥1 −𝑥3 2 −𝑥0 )(𝑥2 −𝑥1 )(𝑥2 −𝑥3 )
(𝑥−𝑥0 )(𝑥−𝑥1 )(𝑥−𝑥2 )
𝑦
(𝑥3 −𝑥0 )(𝑥3 −𝑥1 )(𝑥3 −𝑥2 ) 3
… … … … … … (1)
Substituting the values of 𝑥, 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3, 𝑦0 , 𝑦1 , 𝑦2 , 𝑦3 in (1) we get,
(1986−1978)(1986−1982)(1986−1990) (1986−1974)(1986−1982)(1986−1990)
𝑦 = (1974−1978)(1974−1982)(1974−1990) × 25 + (1978−1974)(1978−1982)(1978−1990) × 60 +
(1986−1974)(1986−1978)(1986−1990) (1986−1974)(1986−1978)(1986−1982)
(1982−1974)(1982−1978)(1982−1990 )
× 80 + ( × 170
1990−1974)(1990−1978)(1990−1982)
100 12×80 170
⇒ 𝑦 = 16 − 60 + 8 + 4
⇒ 𝑦 = 6.25 − 60 + 120 + 42.5
∴ 𝑦 = 108.75
So, the output of the factory in 1986 is 108.75 (Output in 1000 tones).
P a g e | 35
Viva Questions
1.what is Newton Divided Difference?

The divided difference is a recursive method used to calculate coefficients for polynomial
interpolation,particularly Newton’s form of the interpolating polynomial.

2.why divided difference is important in numerical analysis?

Divided difference is a way of generalizing finite differences to handle unequal spacing between
data points.It’s allow us to contruct interpolation polynomials in a straightforward way,even when
the x-value are not values are not equally spaced.

3.What is the purpose in divided difference ?

Divided difference are used in constructing Newton’s interpolating polynomial,which has the
form:

𝑃(𝑥) = 𝑓 [𝑥0 ] + 𝑓[𝑥0 , 𝑥1 ](𝑥 − 𝑥0 ) + 𝑓[𝑥0 , 𝑥1 , 𝑥2 ](𝑥 − 𝑥0 )(𝑥 − 𝑥1 )


+ ⋯ … . . +𝑓[𝑥0 , 𝑥1 , … . , 𝑥𝑛 ](𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … … (𝑥 − 𝑥𝑛−1 )

Where each term involves a divide difference and the product of terms (𝑥 − 𝑥𝑖 ) for all previous
points.

4.What is Lagrange interpolation?

Lagrange interpolation is a method for constructing a polynomial that passes through a given set
of points. It is commonly used in numerical analysis to estimate unknown values within a certain
range of known data points.

5.What is the applications of lagrange interpolation?

Lagrange interpolation is useful in numerical analysis, computer graphics, and scientific


computing for approximating functions and modeling data points.
P a g e | 36

Central Difference Interpolation Formula:

Gauss’s Forward Formula:


x y First Difference Second Third Fourth
Difference Difference Difference
x0-2h y-2
Δ y-2
x0-h y-1 Δ2y-2
Δ y-1 Δ3y-2
x0 y0 Δ2y-1 Δ4y-2
Δ y0 Δ3y-1
x0+h y1 Δ2y0
Δ y1
x0+2h y2

Newton’s general interpolation formulae:


y= f(x) = y0+(x- x0) f (x0 , x1) +(x- x0) (x- x1) f (x0 , x1, x2) +(x- x0) (x- x1) (x- x2) f (x0 , x1, x2,x3)+………..
Let, x0=x0
x1= x0 +h , x2= x0 –h , x3=x0 +2h , x4 = x0 -2h

………………………………..

y= y0+(x- x0) f (x0 , x0+h) +(x- x0) (x- x0-h) f (x0 , x0+h, x0-h) +(x- x0) (x- x0-h) (x- x0+h) f (x0 , x0+h, x0 –
h,x0 +2h)+………..(1)
Let ,u=(𝑥 − 𝑥0)/h

Or, x-x0=hu

y= y0+hu f (x0 , x0+h) +hu (hu-h) f (x0 , x0+h, x0-h) + hu (hu-h) (hu+h) f (x0 , x0+h, x0 –h,x0
+2h)+………..(2)

From the symmetric property of divided difference, we have:


f(x0 , x1)=(y1-y0)/(x1-x0)= (y0-y1)/(x0-x1)=f(x1 , x0)

Similarly ,
f(x0 , x0+h) =(y1-y0)/(x1-x0)= Δ y0 /((x0+h)-x0)= Δ y0/1! h= f(x0+h, x0)

Again,
P a g e | 37
f(x0 , x0+h,x0-h)= f(x0-h , x0,x0+h)=1/(2h)[ (y1-y0)/(x1-x0)- (y0-y1)/(x0-x1)] [since x0-h= x-1 ,x0+h= x1 ]
=1/(2h)[( Δy0/h)-( Δy-1/h)]
=1/(2h2)[ Δy0- Δy-1]
= Δ2y-1/2h2
= Δ2y-1/2! h2

Similarly,
f(x0-h , x0, x0+h,x0+2h)= Δ3y-1/3! h3
f(x0-2h ,x0-h, x0, x0+h,x0+2h)= Δ4y-2/4! h4 and so on
From (2) ,We have :
y= y0+hu Δ y0/1! h +hu (hu-h) Δ2y-1/2! h2
+ hu (hu-h) (hu+h) Δ3y-1/3! h3 +……..
y=f(x)= y0+u Δ y0/1! +u (u-1) Δ2y-1/2!
+ u (u-1) (u+1) Δ3y-1/3! +u(u2-1)(u-2) Δ4y-2/4! +…….
This is known as the Gauss’s Forward Interpolation Formula for Equal Interval.

Example:
Use Gauss’s Forward Formula to evaluate y30, given that y21=18.4708, y25=17.8144, y29=17.1070,
y33=16.3432 and y37=15.5154

Solution:

Taking x0=29, h=4, we require the value of y for x=30 , i.e. for u=(x-x0)/h=(30-29)/4=0.25

x y First Difference Second Third Fourth


Difference Difference Difference
21 18.4708
-0.6564
25 17.8144 -0.0510
-0.7074 -0.0054
29 17.1070 -0.0564 -0.0022
-0.7638 -0.0076
33 16.3432 -0.0640
-0.8278
37 15.5154

y=f(x)= y0+u Δ y0/1! +u (u-1) Δ2y-1/2!


+ u (u-1) (u+1) Δ3y-1/3! + u(u2-1)(u-2) Δ4y-2/4! +…….
Y0.25=17.1070+(0.25)*(-0.7638)+((0.25)*(0.25-1)*(-0.0564/2))+((0.25+1)*(0.25)*(0.25-1)/6)*(-
0.0076)+((0.25+1)*(0.25)*(0.25-1)*(0.25-2)/24)*(-0.0022)=16.9216 (approx)

Gauss’s Backward Formula:


Substituting x0= x0 , x1= x0 +h , x2= x0 –h , x3=x0 -2h , x4 = x0 +2h ,
x5= x0 -3h , x6= x0 +3h etc.
In the general Newton formula ,we get ,
y= y0+(x- x0) f (x0 , x0-h) +(x- x0) (x- x0+h) f (x0 , x0-h, x0+h) +(x- x0) (x- x0+h) (x- x0-h) f (x0 , x0-h, x0
+h,x0 -2h)+………..(1)
Let ,u=(𝑥 − 𝑥0)/h
Or, x-x0= hu
y= y0+hu f (x0-h , x0) + hu ( hu+h) f (x0-h, x0, x0+h) + hu (hu+h) (hu-h) f (x0-2h , x0-h, x0 ,x0
+2h)+………..(2)
P a g e | 38
From the symmetric property of divided difference, we have:
f(x0 , x1)=(y1-y0)/(x1-x0)= (y0-y1)/(x0-x1)=f(x1 , x0)

Similarly ,
f(x0-h , x0) = Δ y-1/1! h
Again,

f( x0-h, x0, x0+h)= Δ2y-1/2! h2


= Δ2y-1/2! h2

Similarly,
f(x0-2h , x0-h, x0,x0+h)= Δ3y-1/3! h3
f(x0-2h ,x0-h, x0, x0+h,x0+2h)= Δ4y-2/4! h4 and so on
From (2) ,We have :
y= y0+hu Δ y0/1! h +hu (hu-h) Δ2y-1/2! h2
+ hu (hu-h) (hu+h) Δ3y-1/3! h3 +……..
y=f(x)= y0+u Δ y-1/1! +u (u+1) Δ2y-1/2!
+ u (u-1) (u+1) Δ3y-2/3! +u(u2-1)(u+2) Δ4y-2/4! +…….
This is known as the Gauss’s Backward Interpolation Formula for Equal Interval.

Example 1:
Using Gauss’s Backward Difference formula , find y(8) from the following table:
x 0 5 10 15 20 25
y 7 11 14 18 24 32

SOLUTION:

Taking x0=10 , h=5 , we have to find y for x=8 , i.e. for u=(x-x0)/h=(8-10)/5= -0.4

x y Δy Δ2y Δ3y Δ4y Δ5y


0 7
4
5 11 -1
3 2
10 14 1 -1
4 1 0
15 18 2 1
6 0
20 24 2
8
25 32

We know, y=f(x)= y0+u Δ y-1/1! +u (u+1) Δ2y-1/2!


+ u (u-1) (u+1) Δ3y-2/3! +u(u2-1)(u+2) Δ4y-2/4! +…….
=14+(-0.4)*3+(-0.4)*((-0.4+1)/2)+((-0.4)*(0.16-1)*(2/6))+((-0.4)*(0.16-1)*(-0.4+2)*(-1/24))
=14-1.2-0.12+0.112-0.0224
=12.7696 (Ans)
P a g e | 39

Question 2:
Interpolate by means of Gauss’s backward formula the population for the year 1936, given
the following table:
Year 1901 1911 1921 1931 1941 1951
Population 12 15 20 27 39 52

Solution:
Taking 1931 as the origin and 10 years as the unit, then the population is to be estimated for
1936 1931
u =.5
10

The Difference table is given below:

x yu yu 2 y 3 y 4 y 5 y
u u u u

1901 12
3
1911 15 2
5 0
1921 20 2 3
7 3 -10
1931 27 5 -7
12 -4
1941 39 1
13
1951 52

Now Gauss Backward Formula is


u(u 1) 2 u(u 1)(u 1) 3 
yu  y0  uy1   y 1   y 2 
2 3!

u(u 1)(u 1)(u  2) 4 u(u 1)(u 1)(u  2)(u  2) 


 y 2   y 3  ...
4! 5!

(.5 1).5 .5(.5 1)(.5 1) 


y  27  (.5)(7)  (5)  (3) 
2 6
.5(.5 1)(.5  2)(.5 1) .5(.5 1)(.5  2)(.5 1)(.5  2)
(7)  (10)
24 120
=27+3.5+1.875-.1875+.2734-.1172
=32.3437 approx.
P a g e | 40

Question 3: Find Solution for x = 1976 using Gauss Backward formula.


x f(x)
1940 17
1950 20
1960 27
1970 32
1980 36
1990 38

Solution: The value of table for x and y


x 1940 1950 1960 1970 1980 1990
f(x) 17 20 27 32 36 38

Taking 1970 as the origin and 10 years as the unit, then the population is to be estimated for
1976−1970
u= = 0.6
10
The difference table is given below:
x f(x) ∆y ∆ 2y ∆ 3y ∆ 4y ∆ 5y

1940 17

1950 20 4

7 -6

1960 27 -2 7

5 1 -9

1970 32 -1 -2

4 -1

1980 36 -2

1990 38

𝑢(𝑢+1) 2 𝑢(𝑢+1)(𝑢−1) 3
Now Gauss Backward Formula is: 𝑦𝑢 = 𝑦0 + 𝑢∆𝑦−1 +
2
∆ 𝑦−1 + 3!
∆ 𝑦−2 +
𝑢(𝑢+1)(𝑢−1)(𝑢+2) 4 𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2) 5
4!
∆ 𝑦−2 + 5!
∆ 𝑦−3 + ⋯
y=32+3-0.48-0.064+0.0832-0.104832
y=34.43437 approx.
P a g e | 41

What is interpolation? Why do we need interpolation in numerical analysis?


Answer: Interpolation is the process of estimating the value of a function for any intermediate value of the
independent variable (x), given a set of data points. It is needed when exact values are unknown, but
estimates are required for intermediate points.

What are Gauss Forward and Backward Interpolation methods?


Answer: Gauss Forward Interpolation is used when the point to be interpolated is near the beginning of the
dataset, while Gauss Backward Interpolation is used when the point is near the end. Both methods are based
on finite differences and are suitable for equally spaced data.

What is the difference between the forward difference Δ and backward difference ∇?
Answer: Forward difference Δ is calculated as: Δyi=yi+1−yi
While backward difference ∇ is calculated as: ∇yi=yi−yi−1

What role does finite differences play in Gauss interpolation?


Answer: In Gauss interpolation, forward or backward finite differences are used to construct the
interpolation polynomial

Can Gauss interpolation be used for unequally spaced data points?


Answer: No, Gauss interpolation requires the data points to be equally spaced. For unequally spaced data,
methods like Lagrange interpolation or Newton’s divided difference method are more appropriate.

What would you do if the point to be interpolated lies near the middle of the data set?
Answer: We might consider using central interpolation methods like Gauss Central Interpolation, which
balances between forward and backward.

What type of data is suitable for Gauss forward and backward interpolation?
Answer: Gauss Forward and Backward formula methods are suited for equidistant data points.

How are Gauss interpolation formulas different from Newton's interpolation?


Answer: Gauss interpolation formulas are specifically designed for interpolating near the beginning
(forward) or end (backward) of a set of data points. Newton's forward and backward interpolation is more
general, but Gauss’ methods offer more accurate results near the center of the data set when the point is not
exactly at the ends.
P a g e | 42

Stirling’s Interpolation Formula:


Stirling Interpolation Formula or Stirling Approximation is an interpolation technique, which is used to
obtain the value of a function at an intermediate point within the range of a discrete set of known data
points.

We know that the Gauss’s forward interpolation formula for equal interval:
𝑢(𝑢−1) 𝑢(𝑢+1)(𝑢−1) 3 𝑢(𝑢+1)(𝑢−1)(𝑢−2) 4
: 𝑦𝑢 = 𝑦0 + 𝑢∆𝑦0 + 2 ∆2 𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2 +
3! 4!
𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2)
∆5 𝑦−2 + ⋯
5!

We also know that the Gauss’s forward interpolation formula for equal interval:
𝑢(𝑢+1) 𝑢(𝑢+1)(𝑢−1) 3 𝑢(𝑢+1)(𝑢−1)(𝑢+2) 4
𝑦𝑢 = 𝑦0 + 𝑢∆𝑦−1 + 2 ∆2 𝑦−1 + ∆ 𝑦−2 + ∆ 𝑦−2 +
3! 4!
𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2)
∆5 𝑦−3 + ⋯
5!

Taking the mean of Gauss’s forward formula and Gauss’s backward formula, we get
𝑢(∆𝑦0 + ∆𝑦−1 ) 𝑢2 2 𝑢(𝑢2 − 1) (∆3 𝑦−1 + ∆3 𝑦−2 ) 𝑢2 (𝑢2 − 1) 4
𝑦 = 𝑦0 + + ∆ 𝑦−1 + + ∆ 𝑦−2
2 2! 3! 2 4!
2 (𝑢 2 2 2) 5 5
𝑢 − 1)(𝑢 − 2 (∆ 𝑦−3 + ∆ 𝑦−4 )
+ +⋯
5! 2
This is known as the Stirling’s formula.

The difference table is shown as like below:

𝒚 ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚 ….
∆𝑦−1 ∆3 𝑦−2 ….
𝑦0 ∆2 𝑦−1 ∆4 𝑦−2 ….
∆𝑦0 ∆3 𝑦−1 ….

Problem Solving Using Stirling Formula:


Question 1: Use Stirling formula to find 𝑦28 , given
𝑦20 = 49225, 𝑦25 = 48316, 𝑦30 = 47236, 𝑦35 = 45926, 𝑦40 = 44306

Solution:
Taking x=30 as the origin and h=5 as the unit, the value of y required will be for
28− 30
𝑢 = 5 = −0.4
x y ∆y ∆ 2y ∆ 3y ∆ 4y
20 49225
-909
25 48316 -171
-1080 -59
30 47236 -230 -21
-1310 -80
35 45926 -310
-1620
40 44306
P a g e | 43
Putting the values in Stirling’s formula, we get

𝑢(∆𝑦0 + ∆𝑦−1 ) 𝑢2 2 𝑢(𝑢2 − 1) (∆3 𝑦−1 + ∆3 𝑦−2 )


𝑦 = 𝑦0 + + ∆ 𝑦−1 + +⋯
2 2! 3! 2

( 1310 + 1080) (−0.4)2 ( −0.4)(. 16 − 1) ( −59 − 80)


𝑦−0.4 = 47236 + (−0.4) + ( −230) +
2 2 6 2
(0.16)(0.16 − 1)
+ ( −21)
24

= 47236 + 478 − 18.4 − 3.8920 + .1176

=47692 approx.

Question 2: Use Stirling formula to find 5 𝑦35 is given,


𝑦20 = 512, 𝑦30 = 439, 𝑦40 = 346, 𝑦50 = 243

Where, 𝑦𝑥 represents the number of persons at age x years in a life table.

Solution:
35−30
Taking x=30 as the origin and h=10 as the unit, the value of y requied will be for u = =0.5
10
The difference table is given below:

X y y ∆²y ∆³y
20 512
-73
30 439 -20
-93 10
40 346 -10
-103
50 243

Putting the values in Stirling’s formula, we get


∆𝑦0 + ∆𝑦−1 𝑢² 𝑢(𝑢2 −12 ) (∆2 𝑦−2 −∆3 𝑦−1 )
Yu = y0 + + ∆²𝑦−1 +
2 2! 3! 2
1 (0.5)² (0.5)[(0.5)2 −1] 1
Y35 = 439 + (.5) 2 [-73+(-93)] + (-20) + [10]
2! 3! 2
= 439-41.45-2.5-0.31
= 394.6875 approx.

Question 3:
Apply Stirling’s formula to find the value of F(1.34) from the following table

x: 0 0.5 1.0 1.5 2.0


F(x): 0 191 341 433 477

Solution:
1.34−1
Here, u = = .60
.5
The difference table is given below: P a g e | 44

X y ∆y ∆²y ∆³y ∆4y


0 0
191
0.5 191 -41
150 -17
1 341 -58 27
92 10
1.5 433 -48
44
2 477

Putting the values in Stirling formula,


∆𝑦0 + ∆𝑦−1 𝑢² 𝑢(𝑢2 −12 ) (∆2 𝑦−2 −∆3 𝑦−1 )
Yu = y0 + + ∆²𝑦−1 + +….
2 2! 3! 2
1 (0.60)² ((.60)2 −1)
Y1.34 = 341+ (.60) 2 (150+92) + – 58 + (.60) +
2 6
2 2)
1` 0.60 ((. 60 − 1)
(−17 + 10) (27)
2 24

=409.80 approx.

Question 4:
Find f(x) at x=7 from following data
X 2 4 6 8 10
F(x) 5 49 181 449 901

Solution:
The difference table is given below:

x y ∆y ∆ 2y ∆ 3y ∆ 4y
2 5
44
5 49 88
132 48
6 181 136 0
268 48
8 449 184
452
10 901

7−6
Here u = 2 = 0.5.
Stirling Formula:
u(∆y0 + ∆y−1 ) u2 2 u(u2 − 1) (∆3 y−1 + ∆3 y−2 )
y = y0 + + ∆ y−1 + +⋯
2 2! 2
3! 2
132+168 136 ((0.5 )−1) 48+48 0
y7 = 181+0.5 2 + (0.52 ) 2! + 0.5 + 0.5((0.52 ) − 1) 41
2 3!
=295 approx.
Question 5: P a g e | 45

Use Stirling’s formula to find y for x=9 from the following:


x 0 4 8 12 16
y = f(x) 14 24 32 35 40

Solution:
The Central difference table for the given table is:
x y ∆y ∆ 2y ∆3y ∆ 4y

0 14

10

4 24 -2

8 -3

8 32 -5 10

3 7

12 35 2

16 40

(9−8)
Here , u = = 0.25
4
u(∆y0 + ∆y−1 ) u2 2 u(u2 − 1) (∆3 y−1 + ∆3 y−2 )
y = y0 + + ∆ y−1 + +⋯
2 2! 3! 2
(.25)² 2
.25(.25) −1 2 2
(.25) (.25) −1)
Y9 = 32 + (.25)(5.5) + 2 (-5) + (2) + (10)
3! 4!
= =33.116 approx.

• Bessel's Interpolation :

We know that Gauss's forward interpolation formula for equal interval


∆y0 ∆2 y−1 ∆3 y−1 ∆𝟒 𝐲−𝟐
y = y0 +u + u(u-1) + + u(u + 1)(𝑢 − 1) + u(u² − 1)(u − 2) +… ... …(1)
1! 2! 3! 4!
x−x0
where u = h
we know, Δy0 = y1 − y0
𝑦0 = 𝑦1 − 𝛥𝑦0 … … …(2)
And 𝑦−1 = 𝑦0 − 𝛥𝑦−1
So, ∆2 y−1 = ∆3 𝛥𝑦−1 … … ... (3)
Similarly, ∆4 y−2 = ∆5 𝛥𝑦−2
(1)Finally become as:
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
Y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
P a g e | 46
This is known as the Bessel's interpolation formula.

The standard form of the Bessel's interpolation formula is:


1
u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
Y = y0 + uΔy0 + + ∆ y−1
2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!

Here first two terms transforming to y0 + uΔy0 as because 𝑦0 = 𝑦1 − 𝛥𝑦0

Problem Solving using Bessel’s Formula:


Question 1:

Apply Bessel’s formula to find (3.63)3from the following data table:


x 6.1 6.2 6.3 6.4 6.5
3
y=x 226.981 238.328 250.047 262.144 274.625

Solution:
x−x 6.36−6.3
Here u = h 0 = .1 = 0.6
The difference table

u X y ∆y ∆ 2y ∆ 3y ∆4y
-2 6.1 226.981
11.347
-1 6.2 238.328 0.372
11.719 0.006
0 6.3 250.047 0.372 0
12.097 0.006
1 6.4 262.144 0.384
12.481
2 6.5 274.625

By Bessel’s formula,
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
1
𝑦 = (250.047 + 262.141) + (0.6 − 0.5)(12.097) +
2
0.6(0.6 − 1)1 1 (0.6 − 0.5)(0.6)(0.6 − 1)
( ) (0.378 + 0.384) + (0.006)
2 2 6
=257.259
P a g e | 47

Question 2:
Apply Bessel’s formula to obtain 𝑦32 from the following data
f(25)=0.2707,f(35)=0.3388,f(30)=0.3027,f(40)=0.3794
Solution:
The difference table is given below:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
25 0.2707

0.032
30 0.3027 0.0041
0.004
0.0361
35 0.3388 0.0045

0.0406

40 0.3794

𝑥−𝑥0
Here 𝑝 = =32−30=0.4
ℎ 5

By Bessel’s formula

1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
1 (0.4−0)(0.4−1) 1
(𝑃) = (0.3027 + 0.3388) + (0.4 − 0.5)(0.0361) + ( )(0.0041 +
2 2 2
(0.4−0)(0.4−1)(0.4+1)(0.4−2) (0.4−0.5)(0.4−0)(0.4−1)
0.0045) + (0) + (0.0004)
24 24

= 0.3075 − 0.00361 − 0.000516


⇒ 𝑦32 = 0.31662416
∴ y32 = 0.316624

Question 3:
Apply Bessel’s formula to obtain y25 from the following data f(20)=24, f(28)=35, f(24)=32,
f(32)=40
P a g e | 48

Solution:
The difference table is given below:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
20 24

8
24 32 -5
7
3
28 35 2

32 40

𝑥−𝑥0
Here 𝑝 = =25−24=0.25
ℎ 4

(𝑝) = 0.5* (32 + 35) + (0.25 − 0.5)(3) + (0.5*0.5)(−5 + 2)*(.25-0)*(.25-1) +


(0.25−0.5)(0.25−1)(0.25)
(7)
6

⇒ (𝑝) = 33.5 − 0.75 + 0.140625 + 0.0546875


∴ 𝑦25 = 32.945

Question 4:
Apply Bessel’s formula to obtain y9
24 , y8 = 32, 𝑦12 = 35 , 𝑦16 = 40
Solution:
The difference table is given below:

𝑥 𝑦 ∆𝑦 ∆2𝑦 ∆3𝑦 ∆4𝑦


0 14
10
4 24 -2
8 -3
8 32 -5 10
3 7
12 35 2
5
16 40
P a g e | 49
𝑥−𝑥0
Here 𝑝 = = 9−8 =0.25
h 4

1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
=33.5-0.75+0.140625+0.0546875+0.085449218
=33.03076

Question 5:
Apply Bessel’s formula to obtain given the following data are given that,
f(20)=2854, f(28)=3544 , f(24)=3162, f(32)=3992

Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
20 2854

308
24 3162 74
-8
382
28 3544 66

448

32 3992

𝑥−𝑥0
Here 𝑝 = =25−24=0.25
h 4

1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
4

⇒ 𝑦25 = 3353 − 45.5 − 6.5625 − 0.0625


∴ 𝑦25 = 3251
P a g e | 50
NUMERICAL INTEGRATION
For evaluating the definite integral of a function that has no explicit antiderivative or whose
antiderivative is not easy to obtain we use numerical integration. The process of computing the
value of a definite integral from a set of numerical values of the integrand is called numerical
integration.
y

f(x)

a b x

Question 1:
5.2
Calculate the value of the integral ∫4 𝑙𝑛𝑥 𝑑𝑥 by Trapezoidal rule and also find the error
with comparing the actual integral value.

Solution:
5.2−4
Divided the range of the integration (4, 5.2) equal parts each of width, ℎ = = 0.2 ,
6
where f(x)= ln(x)=y. The values of ln(x) for each point of sub-division are given below:

𝑥 𝑦 = 𝑙𝑛𝑥
𝑥𝑜 = 4.0 𝑦𝑜 = 1.3862944
𝑥1 = 𝑥𝑜 + ℎ = 4.0 + 0.2 = 4.2 𝑦1 = 1.4350845

𝑥2 = 𝑥𝑜 + 2ℎ = 4.4 𝑦2 = 1.4816045

𝑥3 = 𝑥𝑜 + 3ℎ = 4.6 𝑦3 = 1.5260563
𝑥4 = 𝑥𝑜 + 4ℎ = 4.8 𝑦4 = 1.5686159

𝑥5 = 𝑥𝑜 + 5ℎ = 5.0 𝑦5 = 1.6094379
𝑥6 = 𝑥𝑜 + 6ℎ = 5.2 𝑦6 = 1.6486586
P a g e | 51

From Trapezoidal rule, we have:


5.2 ℎ
∫ 𝑙𝑛𝑥 𝑑𝑥 = [(𝑦𝑜 + 𝑦6) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5)]
4 2

0.2
= [3.034953 + 2 × 7.6207991]
2

= 0.1 × 18.276551
= 1.8276551
5.2
Actual value of ∫ 𝑙𝑛𝑥 𝑑𝑥 = [(ln 𝑥 − 1)]5.2
4 4

= 3.3730249 − 1.5451774
= 1.8278475
Hence the error is: 1.8278475 − 1.8276551 = 0.0001924

Question 2:
1.4
Evaluate the value of the integral ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒𝑥)𝑑𝑥 by Trapezoidal rule. After
finding the true value of the integral, calculate the error.
Solution:
1.4−0.2
Divide the range of integration (0.2, 1.4) into 12 equal parts each of width = = 0.1.
12
Hence h=0.1. the values of the function at each point of sub-division are given below:

𝑥 sin 𝑥 𝑙𝑛𝑥 𝑒𝑥 𝑦 = sin 𝑥 − 𝑙𝑛𝑥 + 𝑒𝑥


𝑥0 = 0.2 0.19867 −1.60943 1.22140 𝑦0 = 3.02950
𝑥1 = 𝑥0 + ℎ = 0.3 0.29552 −1.20397 1.34986 𝑦1 = 2.84935
𝑥2 = 𝑥0 + 2ℎ = 0.4 0.38942 −0.91629 1.49182 𝑦2 = 2.79753
𝑥3 = 𝑥0 + 3ℎ = 0.5 0.47943 −0.69315 1.64872 𝑦3 = 2.82130
𝑥4 = 𝑥0 + 4ℎ = 0.6 0.56464 −0.51083 1.82212 𝑦4 = 2.89759
𝑥5 = 𝑥0 + 5ℎ = 0.7 0.64422 −0.35667 2.01375 𝑦5 = 3.01464
𝑥6 = 𝑥0 + 6ℎ = 0.8 0.71736 −0.22314 2.22554 𝑦6 = 3.16604
𝑥7 = 𝑥0 + 7ℎ = 0.9 0.78333 −0.10536 2.45960 𝑦7 = 3.34829
𝑥8 = 𝑥0 + 8ℎ = 1.0 0.84147 0.00000 2.71828 𝑦8 = 3.55975
𝑥9 = 𝑥0 + 9ℎ = 1.1 0.89121 0.09531 3.00417 𝑦9 = 3.80007
𝑥10 = 𝑥0 + 10ℎ = 1.2 0.93204 0.18232 3.32012 𝑦10 = 4.06984
𝑥11 = 𝑥0 + 11ℎ = 1.3 0.96356 0.26236 3.66930 𝑦11 = 4.37050
𝑥12 = 𝑥0 + 12ℎ = 1.4 0.98545 0.33647 4.05520 𝑦12 = 4.70418
P a g e | 52

. (s 𝑥
− +
4 in 𝑙𝑛
By Trapezoidal rule, 𝑥we get, 1 ∫ℎ 𝑥

1.4
∫.2 (𝑠𝑖𝑛𝑥 − 𝐼𝑛𝑥 + 𝑒 𝑥 ) = 4.05617

Now, the actual value of ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 ) = [−cos 𝑥 − 𝑥


1.4 𝑥 (𝑙𝑛𝑥 − 1) + 𝑒 𝑥] 1.4
0.2

= [{−cos 1.4 − (1.4)(𝑙𝑛 1.4 − 1) + 𝑒1.4} − {−cos 0.2 − (0.2)(𝑙𝑛0.2 − 1) + 𝑒0.2}]


= 4.05095

Hence the error is: 4.05095 − 4.05617 = −0.00522

Question 3:
𝜋
Calculate an approximate value of ∫02 sin 𝑥 𝑑𝑥 by the Trapezoidal rule using 11 ordinates.

Solution:
𝜋
−0
2
First we divide the range of integration into ten equal parts by taking the interval of differencing h= 10 =
𝜋
and then we compute the values of the function 𝑓(𝑥) = sin 𝑥 for each point of sub-division. These
20
computed values are as shown in the following table.

𝑥 𝑦 = sin 𝑥
𝑥0 = 0 𝑦0 = 0.00000
𝜋 𝑦1 = 0.15643
𝑥1 = 𝑥0 + ℎ =
20
2𝜋 𝑦2 = 0.30902
𝑥2 = 𝑥0 + 2ℎ =
20
3𝜋 𝑦3 = 0.45399
𝑥3 = 𝑥0 + 3ℎ =
20
4𝜋 𝑦4 = 0.58778
𝑥4 = 𝑥0 + 4ℎ =
20
5𝜋 𝑦5 = 0.70711
𝑥5 = 𝑥0 + 5ℎ =
20
6𝜋 𝑦6 = 0.80902
𝑥6 = 𝑥0 + 6ℎ =
20
7𝜋 𝑦7 = 0.89101
𝑥7 = 𝑥0 + 7ℎ =
20
8𝜋 𝑦8 = 0.95106
𝑥8 = 𝑥0 + 8ℎ =
20
9𝜋 𝑦9 = 0.98769
𝑥9 = 𝑥0 + 9ℎ =
20
10𝜋 𝑦10 = 1.00000
𝑥10 = 𝑥0 + 10ℎ =
20
P a g e | 53

By Trapezoidal rule, we have,


𝜋

∫02 sin 𝑥 𝑑𝑥 = 2 [(𝑦0 + 𝑦10 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 + 𝑦7 + 𝑦8 + 𝑦9 )]
(𝜋⁄20) 𝜋
= 2 [1.00000 + 2(5.85311)] = 40 [12.70622]
= 0.9981
𝜋
⁄2
Now the exact value of the integral is: ∫02 sin 𝑥 𝑑𝑥 = [cos 𝑥]0𝜋 = 1.0000
Therefore, the error is: 1.0000 − 0.9981 = 0.0019

Simpson’s one third rule:


Putting n=2 in formula (1) i.e.,
𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2) 3
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + 2! ∆2 𝑦0 + ∆ 𝑦0 + ⋯ ] 𝑑𝑢
3!
𝑛2 𝑛3 𝑛2 ∆2 𝑦0 𝑛4 ∆3 𝑦0
= ℎ [𝑛𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 𝑛3 + 𝑛2 )
2 22! 3!
𝑛5 3𝑛4 11𝑛3 4
2 ∆ 𝑦0
+( 5 − + − 3𝑛 ) 4! + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3

And neglecting the third and higher order differences, we obtain


𝑥0 +2ℎ 22 23 22 ∆2 𝑦0
∫𝑥 𝑦𝑑𝑥 = ℎ [2𝑦0 + ∆𝑦0 + ( 3 − ) ]
0 2 2 2!
2 1
=h [2y0 + 2(𝑦1 − 𝑦0 ) + (3 . 2) (𝑦2 − 2𝑦1 + 𝑦0 )]
[as ∆2 𝑦0 = ∆𝑦1 − ∆𝑦0 = (𝑦2 − 𝑦1 ) − (𝑦1 − 𝑦0 )]

= 3 [𝑦0 + 4𝑦1 + 𝑦0 ] ………………… (3)

Clearly (3) determines the area of two strips, bounded by the ordinates at
𝑥0 , 𝑥0 + ℎ 𝑎𝑛𝑑 𝑥0 + 2ℎ , at a time. Now by using (3), if n is a multiple of 2 i.e.
n is an even positive integer, we obtain,
𝑥0 +4ℎ ℎ
∫𝑥 +2ℎ 𝑦𝑑𝑥 = [𝑦2 + 4𝑦3 + 𝑦4 ]
3
0
𝑥0 +6ℎ ℎ
∫𝑥 +4ℎ 𝑦𝑑𝑥 = 3 [𝑦4 + 4𝑦5 + 𝑦9 ]
0
………………………………………
𝑥0 +𝑛ℎ ℎ
∫𝑥 +(𝑛−2)ℎ 𝑦𝑑𝑥 = 3 [𝑦(𝑛−2) + 4𝑦(𝑛−1) + 𝑦𝑛 ]
0

Adding all these integrals, we get


𝑏
𝑥0 +𝑛ℎ
𝐼 = ∫ 𝑦𝑑𝑥 = ∫ 𝑦𝑑𝑥
𝑥0
𝑎
𝑥 +2ℎ 𝑥 +4ℎ 𝑥 +6ℎ 𝑥 +𝑛ℎ
= ∫𝑥 0 𝑦𝑑𝑥 +∫𝑥 0 𝑦𝑑𝑥 + ∫𝑥 0 𝑦𝑑𝑥 + ⋯ + ∫𝑥 0 𝑦𝑑𝑥
0 0+2ℎ 0+4ℎ 0+(𝑛−2)ℎ
ℎ ℎ
= 3 [𝑦0 + 4𝑦1 + 𝑦0 ] + 3 [𝑦2 + 4𝑦3 + 𝑦4 ] + ⋯ + [𝑦(𝑛−2) + 4𝑦(𝑛−1) + 𝑦𝑛 ]

= 3 [(𝑦0 + 𝑦𝑛 ) + 4(𝑦1 + 𝑦3 + … + 𝑦𝑛−1 ) + 2(𝑦2 +𝑦4 + ⋯ + 𝑦𝑛−2 )]

= [(sum of extreme ordinates) + 4(sum of odd ordinates) + 2(sum of even
3
ordinates)].

This is known as Simpson’s one third rule.


In this method we find the area of two strips at a time. Also in this method, in two consecutive
intervals we replace y by a second degree polynomial as its differences of order higher than 2 will
vanish.
P a g e | 54

Problem Solving using Simpson’s one third Formula:


Question 1:
1 𝑑𝑥 1
Find ∫0 1+𝑥 2 by using Simpson’s 3 rule. Hence obtain the approximate value of 𝜋 in each case.

Solution:
1−0 1
Divide the range of integration (0,1) into 6 equal parts each of width 6 = 6. The values of 𝑓(𝑥) at
each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥𝑜 = 0 1
𝑦𝑜 = = 1.0000000
1
1 1 36
𝑥1 = 𝑥𝑜 + ℎ = 0 + = 𝑦1 = = 0.9729729
6 6 37
2 36
𝑥2 = 𝑥𝑜 + 2ℎ = 𝑦2 = = 0.9000000
6 40
3 36
𝑥3 = 𝑥𝑜 + 3ℎ = 𝑦3 = = 0.8000000
6 45
4 36
𝑥4 = 𝑥𝑜 + 4ℎ = 𝑦4 = = 0.6923076
6 52
5 36
𝑥5 = 𝑥𝑜 + 5ℎ = 𝑦5 = = 0.5901639
6 61
𝑥6 = 𝑥𝑜 + 6ℎ = 1 1
𝑦6 = = 0.5000000
2
1
By Simpson’s ‘3’ rule, we get,
1 𝑑𝑥 ℎ
∫0 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦6 ) + 2(𝑦2 + 𝑦4 )]
1+𝑥 2
1
= 18 [1.5000000 + 4(2.3631369) + 2(1.5923077)]
1
= 18 (14.137163) = 0.7853979 … … … … … … (1)
1 𝑑𝑥 𝜋
But = [tan−1 𝑥]01 = tan−1 1 − tan−1 0 =
∫0 1+𝑥 2 4
… … … … … … (2)
Now from (1) and (2) we get,
𝜋
= 0.7853979 or, 𝜋 = 3.1415916
4

Question 2:
1
0.7 1
Evaluate ∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 approximately by using Simpson’s ‘3’ rule.

Solution:
0.7−0.5
Divide the range of integration (0.5, 0.7) into 4 equal parts each of width= 4 = 0.05. Hence
h=0.05. The values of the function for each point of sub-division are given below:
1
𝑥
𝑦 = 𝑥 2 𝑒 −𝑥
𝑥0 = 0.50 𝑦0 = 0.4288818
𝑥1 = 𝑥0 + ℎ = 0.55 𝑦1 = 0.4278774
𝑥2 = 𝑥0 + 2ℎ = 0.60 𝑦2 = 0.4251076
𝑥3 = 𝑥0 + 3ℎ = 0.65 𝑦3 = 0.4208867
𝑥4 = 𝑥0 + 4ℎ = 0.70 𝑦4 = 0.4154730

1
By Simpson’s ‘3’ rule, we get,
P a g e | 55
0.7 1 ℎ
∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 = 3 [(𝑦0 + 𝑦4 ) + 4(𝑦1 + 𝑦3 ) + 2𝑦2 ]

0.05
= [0.8443548 + 3.3950564 + 0.8502152]
3
= 0.0848271

Question 3:
1 3
Calculate by Simpson’s ‘3’ rule, an approximation value of ∫−3 𝑥 4 𝑑𝑥 by taking seven equidistant
ordinates. Compare it with the exact value.

Solution:
3−(−3)
Divide the range of integration (-3,3) into six equal parts each of width= 6 = 1. Hence h=1. The
values of the function for each point of sub-division are given below:
𝑥 𝑦 = 𝑥4
𝑥0 = −3 𝑦0 = 81
𝑥1 = 𝑥0 + ℎ = −2 𝑦1 = 16
𝑥2 = 𝑥0 + 2ℎ = −1 𝑦2 = 1
𝑥3 = 𝑥0 + 3ℎ = 0 𝑦3 = 0
𝑥4 = 𝑥0 + 4ℎ = 1 𝑦4 = 1
𝑥5 = 𝑥0 + 5ℎ = 2 𝑦5 = 16
𝑥6 = 𝑥0 + 6ℎ = 3 𝑦6 = 81

1
By Simpson’s ‘3’ rule, we get,
3 ℎ
∫−3 𝑥 4 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
1
= 3 [162 + 4 × 32 + 2 × 2]
1
= 3 × 294 = 98

3
3 𝑥5 1 1
Now the exact value is: ∫−3 𝑥 4 𝑑𝑥 = [ 5 ] = 5 [(3)5 − (−3)5 ] = 5 × 486 = 97.2
−3
Hence the error is: 97.2 − 98 = −0.8

Simpson’s three- eighth rule:

Putting n=3 in formula


𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2) 3
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + 2! ∆2 𝑦0 + ∆ 𝑦0 + ⋯ ] 𝑑𝑢
3!
𝑛2 𝑛3 𝑛2 ∆2 𝑦0 𝑛4 ∆3 𝑦0
= ℎ [𝑛𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 𝑛3 + 𝑛2 )
2 2
2! 3!
𝑛5 3𝑛4 11𝑛3 4
2 ∆ 𝑦0
+( 5 − + − 3𝑛 ) 4! + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3

And neglecting fourth and higher order differences, we obtain


𝑥0 +3ℎ 32 33 32 ∆2 𝑦0 34 ∆3 𝑦0
∫𝑥 𝑦𝑑𝑥 = ℎ [3𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 33 + 32 ) ]
0 2 2 2! 3!
9 9
= ℎ [3𝑦0 + 2 (𝑦1 − 𝑦0 ) + 4 (𝑦2 − 2𝑦1 + 𝑦0 )
9
+ 8 (𝑦3 − 3𝑦2 + 3𝑦1 − 𝑦0 )]
3ℎ
= [𝑦0 − 3𝑦1 + 3𝑦2 + 𝑦3 ] ……………………… (4)
8
P a g e | 56
Clearly (3) determines the area of three strips at a time, which bounded by the ordinates 𝑥0 , 𝑥0 +
ℎ , 𝑥0 + 2ℎ and 𝑥0 + 3ℎ . Now by using (4), if n is a multiple of three, we obtain

𝑥0 +6ℎ 3ℎ
∫𝑥 +3ℎ 𝑦𝑑𝑥 = 8 [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
0
………………………………………………………
𝑥0 +𝑛ℎ 3ℎ
∫𝑥 +(𝑛−3)ℎ 𝑦𝑑𝑥 = [𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ]
8
0

Adding all these integrals, we get


𝑥0 +𝑛ℎ 𝑥0 +3ℎ 𝑥0 +6ℎ 𝑥0 +𝑛ℎ
∫ 𝑦𝑑𝑥 = ∫ 𝑦𝑑𝑥 + ∫ 𝑦𝑑𝑥 + ⋯ + ∫ 𝑦𝑑𝑥
𝑥0 𝑥0 𝑥0 +3ℎ 𝑥0 +(𝑛−3)ℎ
3ℎ 3ℎ
= [𝑦0 − 3𝑦1 + 3𝑦2 + 𝑦3 ] + [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
8 8
3ℎ
+⋯+ [𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ]
8
3ℎ
= [(𝑦0 + 𝑦𝑛 ) + 3((𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + 𝑦7 + ⋯ + 𝑦𝑛−1 )
8
+2(𝑦2 + 𝑦6 + ⋯ + 𝑦𝑛−3 )]

This is known as Simpson’s three- eight rule.

Problem Solving using Simpson’s three- eight rule Formula:

Question 1:
6 𝑑𝑥 3
Evaluate ∫0 1+𝑥 2 by using Simpson’s ‘8’ rule.

Solution:
6−0
Divide the range of integration (0, 6) into six equal parts each of width= 6 = 1. Hence h=1. The
values of the function for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥0 = 0 1
𝑦0 = = 1.0000000
1
𝑥1 = 𝑥0 + ℎ = 1 1
𝑦1 = = 0.5000000
2
𝑥2 = 𝑥0 + 2ℎ = 2 1
𝑦2 = = 0.2000000
5
𝑥3 = 𝑥0 + 3ℎ = 3 1
𝑦3 = = 0.1000000
10
𝑥4 = 𝑥0 + 4ℎ = 4 1
𝑦4 = = 0.0588235
17
𝑥5 = 𝑥𝑜 + 5ℎ = 5 1
𝑦5 = = 0.0384615
26
𝑥6 = 𝑥𝑜 + 6ℎ = 6 1
𝑦6 = = 0.0270270
37

3
By Simpson’s ‘8’ rule, we get,
P a g e | 57
6 𝑑𝑥 3ℎ
∫0 1+𝑥 2 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
8
3
= 8 [1.0270270 + 2.391855 + 0.200000

3
= 8 × 3.618882 = 1.3570808

Question 2:
3 7 𝑑𝑥
Use Simpson’s ‘8’ rule to find the value of ∫1 𝑥 approximately and compare it with the actual value.

Solution:
7−1
Divide the range of integration (1, 7) into six equal parts each of width= 6 = 1. Hence h=1. The
values of y for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥0 = 1 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 2 1
𝑦1 =
2
𝑥2 = 𝑥0 + 2ℎ = 3 1
𝑦2 =
3
𝑥3 = 𝑥0 + 3ℎ = 4 1
𝑦3 =
4
𝑥4 = 𝑥0 + 4ℎ = 5 1
𝑦4 =
5
𝑥5 = 𝑥𝑜 + 5ℎ = 6 1
𝑦5 =
6
𝑥6 = 𝑥𝑜 + 6ℎ = 7 1
𝑦6 =
7

3
By Simpson’s ‘8’ rule, we get,

7 𝑑𝑥 3ℎ
∫1 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
𝑥 8
3
= 8 [1.1429 + (3 × 1.2) + (2 × 0.25)]
3
= 8 × 5.2429 = 1.9661

7 𝑑𝑥
Now the actual value is: ∫1 = [𝑙𝑛𝑥]17 = ln 7 − ln 1 = 1.9459
𝑥

Hence, the error is: 1.9459 − 1.9661 = −0.0202

Question 3:
3 1 3
Evaluate ∫ 𝑑𝑥 by using Simpson’s ‘ ’ rule and compare it with the actual value.
0 1+𝑥 8
P a g e | 58
Solution:

3−0
Divide the range of integration (0, 3) into six equal parts each of width= = 0.5. Hence
6
h=0.5. The values of y for each point of sub-division are given below:

𝑥 1
𝑦= 1+𝑥
𝑥0 = 0 𝑦0 = 1

𝑥1 = 𝑥0 + ℎ = 0.5 𝑦1 = 0.6667

𝑥2 = 𝑥0 + 2ℎ = 1 𝑦2 = 0.5

𝑥3 = 𝑥0 + 3ℎ = 1.5 𝑦3 = 0.4

𝑥4 = 𝑥0 + 4ℎ = 2 𝑦4 = 0.3333
𝑥5 = 𝑥𝑜 + 5ℎ = 2.5 𝑦5 = 0.2857
𝑥6 = 𝑥𝑜 + 6ℎ = 3 𝑦6 = 0.25

By Simpson’s ‘1’ rule, we get,


3

3 1 3ℎ
∫0 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
1+𝑥 8

3(0.5)
= [1.25 + (3 × 1.7857) + (2 × 0.4)]
8
3(0.5)
= × 7.4071 = 1.3888
8

Now the actual value is: = [ln (1 + 𝑥)]3 = ln 4 − ln 1 = 1.3863

Hence, the error is: 1.3863 − 1.3888 = −0.0025


P a g e | 59
Viva Question

1.What is Simpson’s One-Third rule in Numerical Analysis?

Ans: The Simpson's One-Third Rule is a numerical method for approximating the definite integral of
a function. It is particularly useful when the function is difficult to integrate analytically.

2.Why Simpson's One-Third Rule is necessary in numerical analysis?

Ans:Simpson's One-Third Rule is necessary in numerical analysis for several reasons.Those are
Analytical Complexity, Efficiency, Accuracy, Flexibility, Foundation for Higher Methods.

3. What is Simpson’s Three-Eight rule in Numerical Analysis?

Ans: Simpson's Three-Eighths Rule is another numerical method for approximating definite integrals,
similar to Simpson's One-Third Rule but generally more accurate for certain types of functions.

4. Why Simpson's Three-Eight Rule is necessary in numerical analysis?

Ans: Simpson's Three-Eighths Rule is necessary in numerical analysis for several important
reasons.Those are Complex Integrands, Increased Accuracy, Flexibility in Application, Foundation
for More Advanced Techniques, Error Management.

Romberg Integration:

Romberg Integration is an extrapolation of two results of the trapezoid method applied to a regular
partition cut into subintervals of sizes that are consecutive powers of 2.

Define a sequence of values Ai where:


A1 = Trapezoid method with 20 = 1 partition i.e. 1⁄2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
1
A2 = Trapezoid method with 21 = 2 partitions (2[A1+ℎ1(𝑓(𝑎 + ℎ2)])
1
A3 = Trapezoid method with 22 = 4 partitions (2[A2+ℎ2{(𝑓(𝑎 + ℎ3)+(𝑓(𝑎 + 3ℎ3)}])
A4 = Trapezoid method with 23 = 8 partitions ………………
. . .
. . .
. . .

Each Ai calculation is considered an iteration.

In generally we get,
1 𝑘−2
Ak = 2 [Ak-1+ℎk-1∑2𝑖=1 𝑓(𝑎 + (2𝑖 − 1) ℎk)]
For each 𝑘 = 2,3,4 … …

A1
4 A2  A1
B1 =
3
16 B2  B1
A2 C1 =
15
4 A3  A2 P a g e | 60
B2 =
3
16 B3  B2
A3 C2 =
15
4 A4  A3
B3 =
3
A4
. . .
. . .
. . .
The values for Romberg’s Method of integration con be arranged in a triangular matrix.
1 2 3 4 5 6
1 A1
2 A2 B1
3 A3 B2 C1
4 A4 B3 C2 D1
5 A5 B4 C3 D2 E1
6 A6 B5 C4 D3 E2 F1

The best possible estimate in each row is the right most entry: A1, B1 ,C1 ,D1 ,E1 ,F1.

Since we will run out of letters after 6 rows we express this with R(i,j).
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)

The best possible estimate in each row is the right most entry: R(i,i) .
The R(i,j) can be obtained in the following way:
R(i,1) is always the trapezoid method applied with a partition size of 2i .
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)

4𝑗−1 𝑅(𝑖,𝑗−1)−𝑅(𝑖−1,𝑗−1)
R(i,j) = ; i,j= 2,3,4….
4𝑗−1 −1
For the rest of them a triangular pattern exist as how one fill in the other entries.
4 R(2,1)  R(1,1) P a g e | 61
R(2, 2) 
4 1 4 R(3, 2)  R(2, 2)
2
R(3,3) 
4 R(3,1)  R(2,1) 42  1 43 R(4,3)  R(3,3)
R(3, 2)  R(4, 4) 
4 1 42 R(4,1)  R(3, 2) 43  1
R(4,3) 
4 R(4,1)  R(3,1) 42  1 43 R(5,3)  R(4,3)
R(4, 2)  R(5, 4)  .......
4 1 42 R(5, 2)  R(4, 2) 43  1
R(5,3) 
4 R(5,1)  R(4,1) 42  1 43 R(6,3)  R(5,3)
R(5, 2)  R(6, 4)  .......
4 1 42 R(6, 2)  R(3, 2) 43  1
4 R(6,1)  R(5,1) R(6,3) 
R(6, 2)  42  1
4 1

Problem Solving using Romberg Integration Formula:

Question 1:
1 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫0 1+𝑥 for n=4.

Solution:
𝑏−𝑎 1 𝑏−𝑎 1 𝑏−𝑎
Here, 𝑎 = 0, 𝑏 = 1, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4, ℎ4 = =
2 22 23
1
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝑅(2,1) = 0.708331
1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 0.697024
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 0.694122

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444; 𝑅(3,3) = = 0.693176
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.693255; 𝑅(4,3) = = 0.693148
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.693155; 𝑅(4,4) = = 0.693148
4−1 43 −1

𝑅(1,1) = 0.75
𝑅(2,1) = 0.708331 𝑅(2,2) = 0.69444
𝑅(3,1) = 0.697024 𝑅(3,2) = 0.693255 𝑅(3,3) = 0.693176
𝑅(4,1) = 0.694122 𝑅(4,2) = 0.693155 𝑅(4,3) = 0.693148 𝑅(4,4) = 0.693148

Hence the best possible estimate is 0.693148 .


1 𝑑𝑥
Now, exact value is: ∫0 1+𝑥 = [ln(1 + 𝑥)]10 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718
P a g e | 62
So, the error is: 0.69314718 − 0.693148 = −0.00000082

Question 2:
2 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫1 𝑥 for n=4.
Solution:
𝑏−𝑎 1 𝑏−𝑎 1 𝑏−𝑎
Here, 𝑎 = 1, 𝑏 = 2, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = 2 = 2, ℎ3 = 22 = 4, ℎ4 = =
23
1
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = = 0.75
4

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝑅(2,1) = 0.70833333
1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 0.69702381
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 0.69412185

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444444; 𝑅(3,3) = = 0.69317461
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.69325397; 𝑅(4,3) = = 0.6931479
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.69315453; 𝑅(4,4) = = 0.69314748
4−1 43 −1

𝑅(1,1) = 0.75
𝑅(2,1) = 0.70833333 𝑅(2,2) = 0.69444444
𝑅(3,1) = 0.69702381 𝑅(3,2) = 0.69325397 𝑅(3,3) = 0.69317461
𝑅(4,1) = 0.69412185 𝑅(4,2) = 0.69315453 𝑅(4,3) = 0.6931479 𝑅(4,4) = 0.69314748

Hence the best possible estimate is 0.69314748 .


2 𝑑𝑥
Now, exact value is: ∫1 𝑥 = [ln(𝑥)]12 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718

So, the error is: 0.69314718 − 0.69314748 = −0.0000003

Question 3:
𝜋
Use Romberg Extrapolation to get the best possible estimate for: ∫0 𝑓(𝑥)𝑑𝑥 where 𝑓(𝑥) = sin 𝑥, for n =
4.

Solution:
𝑏−𝑎 𝜋 𝑏−𝑎 𝜋 𝑏−𝑎
Here, 𝑎 = 0, 𝑏 = 𝜋, ℎ1 = (𝑏 − 𝑎) = 𝜋, ℎ2 = = 2, ℎ3 = = 4, ℎ4 = =
2 22 23
𝜋
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
1 P a g e | 63
𝑅(1,1) = 2 × 𝜋 × (sin 0 + sin 𝜋) = 0

1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝜋
𝑅(2,1) = = 1.5708
2

1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 1.8961
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 1.9742

4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 2.0944; 𝑅(3,3) = = 1.9986
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 2.0046; 𝑅(4,3) = = 2.0000
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 2.0003; 𝑅(4,4) = = 2.0000
4−1 43 −1

𝑅(1,1) = 0
𝑅(2,1) = 1.5708 𝑅(2,2) = 2.0944
𝑅(3,1) = 1.8961 𝑅(3,2) = 2.0046 𝑅(3,3) = 1.9986
𝑅(4,1) = 1.9742 𝑅(4,2) = 2.0003 𝑅(4,3) = 2.0000 𝑅(4,4) = 2.0000

Hence the best possible estimate is 2.0000


𝜋
So, ∫0 sin 𝑥 𝑑𝑥 ≈ 𝑅(4,4) = 2.0000

𝜋
Here, the exact value is: ∫0 sin 𝑥 𝑑𝑥 = [−cos 𝑥]0𝜋 = 2

SOLUTION OF EQUATIONS OF ONE VARIABLE

Suppose, ((𝑥)) = 0 is a equation which may be algebraic or transcendental or combination of both.


Finding roots of ((𝑥)) = 0 means find the values of 𝑥 for which 𝑓(𝑥)) = 0. So, 𝑥 = 𝑎 is a root of the
equation (𝑥) = 0 if and only if 𝑓((𝑎)) = 0. But if 𝑥 = 𝑎 is a numerical solution of (𝑥) = 0 after
some iteration then 𝑓 ((𝑎)) may be equal to zero or approximately zero.

Suppose (𝑥1 )> 0, then 𝑎 < root < 𝑥1


So, second approximation to the root
1 P a g e | 64
𝑥2 = (𝑎 + 𝑥1 )
2

1. 𝑓(𝑥2 ) = 0 , then 𝑥2 is the root of 𝑓(𝑥) = 0


2. 𝑓(𝑥2 ) < 0, then root lies between 𝑥2 and 𝑥1
3. 𝑓(𝑥2 ) > 0, then root lies between 𝑎 and 𝑥2

Suppose 𝑥2 < 0, 𝒕𝒉𝒆𝒏 𝑥2 < 𝑟𝑜𝑜𝑡 < 𝑥1

So, third approximation to the root is,


1
𝑥3 = (𝑥2 + 𝑥1 )
2
…. ….. ….. …. ….. ….…. ….. ….. …. ….. ….
…. ….. ….. …. ….. ….…. ….. ….. …. ….. ….

This process continues till (𝑥𝑛 ) = 0 or approximately 0 then, 𝑥𝑛 is the root.

Question-1: Find the root of the following polynomial function using the Bisection method:
𝑥 3 − 4𝑥 − 9.
Solution:
Let, (𝒙) = 𝒙𝟑 − 𝟒𝒙 − 𝟗
(𝟐) = 𝟖 − 𝟖 − 𝟗 = −𝟗
(𝟑) = 𝟐𝟕 − 𝟏𝟐 − 𝟗 = 𝟔

So, the root lies in [𝟐, 𝟑]

First iteration:
𝟐+𝟑
𝒙𝟏 = = 𝟐. 𝟓
𝟐

Now. (𝒙𝟏 ) = 𝟐. 𝟓𝟑 − 𝟒(𝟐. 𝟓) − 𝟗 = −𝟑. 𝟑𝟕𝟓


Then(𝒙𝟏 ). (𝟑) < 𝟎
So, the root lies in [2.5, 3]

Second iteration:

𝟐. 𝟓 + 𝟑
𝒙𝟐 = = 𝟐. 𝟕𝟓
𝟐
Now. (𝒙𝟐 ) = 𝟐. 𝟕𝟓𝟑 − 𝟒(𝟐. 𝟕𝟓) − 𝟗 = 𝟎. 𝟕𝟗𝟔𝟗
Then (𝒙𝟐 ). (𝟐. 𝟓) < 𝟎
So, the root lies in [2.5, 2.75]
P a g e | 65
Iterations 𝑎 𝑏 𝒙𝒏 𝒇(𝒂) 𝒇(𝒃) 𝒇(𝒙𝒏)
1 2 3 2.5 −9 6 −3.375
2 2.5 3 2.75 −3.375 6 0.7969
3 2.5 2.75 2.625 −3.375 0.7969 −1.4121
4 2.625 2.75 2.6875 −1.4121 0.7969 −0.3391
5 2.6875 2.75 2.71875 −0.3391 0.7969 0.2209
6 2.6875 2.71875 2.703125 −0.3391 0.2209 −0.0615
7 2.703125 2.71875 2.7109 0.2209 −0.0615 0.0787
8 2.703125 2.7109 2.707 −0.0615 0.0787 0.00849

So, after 8th iteration the root of the function is 2.707

Question-2: Find the root of 𝒙𝟐 − 𝟓 = 𝟎 by using the Bisection


method.
Solution:

Here, (𝑥) = 𝑥 2 − 5
(2) = 4 − 5 = −1
(3) = 9 − 5 = 4
So the root lies in [2,3]
First iteration
𝟐+𝟑
𝒙𝟏 = = 𝟐. 𝟓
𝟐
Now, 𝑥1 ) = 2.52 − 5 = 1.25
Then, ((𝑥1 ) 2) < 0
So, the root lies [2,2.5]

Iterations(n) a b 𝒙𝒏 f(a) f(b) f(𝒙𝒏)

1 2 3 2.5 −1 4 1.25

2 2 2.5 2.25 −1 1.25 0.0625

3 2 2.25 2.2125 −1 0.0625 −0.48437

4 2.2125 2.25 2.23125 −0.1048 0.0625 −0.02152

5 2.23125 2.25 2.2406 0.3476 0.0625 0.0204

6 2.23125 2.2406 2.2359 −0.02152 0.0202 −0.0007

So, after 6th iteration the root of the equation is 2.2359.(approximately)


P a g e | 66

Viva Question:
1. Question: What is the main application of the Basel problem in finance?
Answer: It helps in modeling risk and return using series convergence.

2.Question: What does numerical integration estimate?


Answer: The area under a curve.

3. Question: How does the Trapezoidal Rule work?


Answer: It approximates the integral by using trapezoids.

4. Question: What is a key advantage of the Trapezoidal Rule?


Answer: It's simple and easy to apply.

5. Question: What type of function does the Trapezoidal Rule work best for?

Answer: Smooth functions.

6. Question: What is a limitation of the Trapezoidal Rule?


Answer: It can be less accurate for functions with high curvature.

7. Question: How can the accuracy of the Trapezoidal Rule be improved?


Answer: By increasing the number of subintervals.

8. Question: In which situations is the Trapezoidal Rule commonly used?


Answer: When analytical integration is difficult or impossible.
P a g e | 67

Solution of Algebraic Transcendental Equations:

 Bisection Method:

If f (x) is a continuous function and if a and b are two points such that f (a) and

f (b) are of opposite sign, then there exists a point c between a and b such that

f (c)  0 .

Procedure:
1. Find a and b such that f (a). f (b)  0

2. Let c  a  b /2 mid point


3. c is the root of the given function if f (c)  0 ;else follow the next step

4. Check if f (c). f (a)  0 or f (c). f (b)  0

5. Pick that interval [a, c] or [c, b] and repeat 2,3 and 4 procedure until stop
criteria satisfied, i.e f (c)  0 .

 c  (a  b) / 2
P a g e | 68

 Slowly Converges to a root.

• Problem Solving using Bisection Method Formula:


Question 1:
Determine the root of the given equation,
X2-3 = 0 for x ∈ [1, 2] by Bisection Method.

Solution:
Given: x2-3 = 0
Let f(x) = x2-3
Now, find the value of f(x) at a= 1 and b=2.
f (1) = 12-3 = 1 – 3 = -2 < 0
f (2) = 22-3 = 4 – 3 = 1 > 0
The given function is continuous, and the root lies in the interval [1, 2].
Let “t” be the midpoint of the interval.
I.e., t = (1+2)/2
t =3 / 2
t = 1.5
Therefore, the value of the function at “t” is

f(t) =f (1.5) = (1.5)2-3 = 2.25 – 3 = -0.75 < 0


P a g e | 69
f(t) is negative, so b is replaced with t= 1.5 for the next iterations.

The iterations for the given functions are:


No of
Iteration a f(a) b f(b) t f(t)

1 1 -2 2 1 1.5 -0.75
2 1.5 -0.75 2 1 1.75 0.062
3 1.5 -0.75 1.75 0.0625 1.625 -0.359
4 1.625 -0.3594 1.75 0.0625 1.6875 -0.1523
5 1.685 -0.01523 1.75 0.0625 1.7188 -0.0457
6 1.7188 -0.0457 1.75 0.0625 1.7344 0.0081
7 1.7188 -0.0457 1.7344 0.0081 1.7266 -o.0189

So, at the seventh iteration, we get the final interval [1.7266, 1.7344]
Hence, 1.7344 is the approximated solution.

Newton Raphson Methods:


Let, 𝑥0 denotes an approximate value of the desired root of the equation 𝑓(𝑥) = 0
And, let ℎ be the correction which must be applied to 𝑥0 to get the exact value of the rootthen 𝑥0 + ℎ is a
root of the equation 𝑓(𝑥) = 0.
So that,
𝑓(𝑥0 + ℎ) = 0
And 𝑥 = 𝑥0 + ℎ…… (1)
Expanding 𝑓(𝑥0 + ℎ) be Taylor’s theorem, we get
𝑓 ′ (𝑥0 ) 𝑓 ′′ (𝑥0 )
𝑓(𝑥0 + ℎ) = 𝑓(𝑥0 ) + ℎ + ℎ2 + ⋯ = 0.
1! 2!

Now, if h is the sufficiently small, we may neglected the terms containing 2nd and higher power of h and
get simple relation,
𝑓 ′ (𝑥0 )
𝑓(𝑥0 ) + ℎ =0
1!
𝑓(𝑥 )
⇒ ℎ = − 𝑓′ (𝑥0 )
0

here 𝑓 ′ (𝑥0 ) ≠ 0.
Putting the value of h in (1) we get that
𝑥 = 𝑥0 + ℎ
𝑓(𝑥0 )
⇒ 𝑥 = 𝑥0 − ′
𝑓 (𝑥0 )
Successive approximation are given by 𝑥0 , 𝑥1 , 𝑥2 , … … 𝑥𝑛+1
Similarly,
𝑓(𝑥0 )
⇒ 𝑥1 = 𝑥0 − ′
𝑓 (𝑥0 )
𝑓(𝑥0 )
⇒ 𝑥2 = 𝑥1 − ′
𝑓 (𝑥0 )
…………………………………
…………………………………
P a g e | 70
𝑓(𝑥𝑛 )
⇒ 𝑥𝑛+1 = 𝑥𝑛 − ′
𝑓 (𝑥𝑛 )

Which is known as the Newton-Raphson Method formula.

Geometrical interpretation of Newton-Rapshon Formula:

𝑦 = 𝑓(𝑥)
𝑦

𝑓(𝑥0 )

𝑓(𝑥1 )

𝑓(𝑥2 )
𝑥
𝑥2 𝑥1 𝑥0

A tangent is drawn at the point [𝑥0 , 𝑓(𝑥0 )] to the curve 𝑦 = 𝑓(𝑥) .


Another tangent is drawn at [𝑥1 , 𝑓(𝑥1 )].
The process can be continued till the desired accuracy is achieved.

 Problem Solving using Newton-Rapson Method Formula:

Question 1:
By using Newton- Raphson method, find the root 𝑥 4 − x − 10 = 0, which is nearer to x = 2.
Solution:
Here, 𝑓(𝑥) = 𝑥 4 − 𝑥 − 10
∴ 𝑓 ′ (𝑥) = 4𝑥 3 − 1
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛 4 − 𝑥𝑛 − 10 3𝑥𝑛 4 + 10
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 4𝑥𝑛 3 − 1 4𝑥𝑛 3 − 1
The approximate value of the root is given to be 2. Taking 𝑥0 = 2 , we get
3𝑥0 4 + 10 3.24 + 10
𝑥1 = = = 1.871
4𝑥0 3 − 1 4.23 − 1
3𝑥1 4 + 10 3. (1.871)4 + 10
𝑥2 = = = 1.856
4𝑥1 3 − 1 4. (1.871)2 − 1
3𝑥2 4 + 10 3. (1.856 )4 + 10
𝑥3 = = = 1.856
4𝑥2 3 − 1 4. (1.856 )3 − 1
Since 𝑥2 = 𝑥3 , so the required root is 1.856
P a g e | 71

Question 2:
By using Newton- Raphson method, find the root √12 to five place of decimal.
Solution:
Let x=√12 ⇒ x2 =12 ⇒ x2 – 12= 0.
The given equation is f(x)=0.
Here, 𝑓(𝑥) = 𝑥 2 − 12
∴ 𝑓 ′ (𝑥) = 2𝑥
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛2 − 12 𝑥𝑛2 + 12
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 2𝑥𝑛 2𝑥𝑛
Here f (3) =-3 & f (4) =4.
The approximate value of the root lies between 3 & 4. Taking 𝑥0 = 3.5 , we get
𝑥0 2 + 12 3.52 + 12
𝑥1 = = = 3.4642
2𝑥0 2 (3.5)
𝑥1 2 + 12 (3.4642)2 + 12
𝑥2 = = = 3.4641
2𝑥1 2(3.4642)
𝑥2 2 + 12 (3.4641)2 + 12
𝑥3 = = = 3.4641
2𝑥2 2(3.4641)
Since 𝑥2 = 𝑥3 , so the required root is 3.4641.

Question 3:
By using Newton- Raphson method, Solve the equation 3𝑥 − cos 𝑥 − 1 = 0, which is nearer to x =
2.
Solution:
Here, 𝑓(𝑥) = 3𝑥 − cos 𝑥 − 1
∴ 𝑓 ′ (𝑥) = 3 + sin 𝑥
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 3𝑥𝑛 − cos 𝑥𝑛 − 1 𝑥𝑛 sin 𝑥𝑛 + cos 𝑥𝑛 + 1
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 3 + sin 𝑥𝑛 3 + sin 𝑥𝑛
The approximate value of the root is given to be 2. Taking 𝑥0 = 0.60 , we get
𝑥0 sin 𝑥0 + cos 𝑥0 + 1 0.6(sin 0.6) + cos 0.6 + 1
𝑥1 = = = 0.60701
3 + sin 𝑥0 3 + sin 0.6
𝑥1 sin 𝑥1 + cos 𝑥1 + 1 0.60701(sin 0.60701) + cos 0.60701 + 1
𝑥2 = = = 0.60701
3 + sin 𝑥1 3 + sin 0.60701
Since 𝑥1 = 𝑥2 , so the required root is 0.60701

Question 4:
By using Newton- Raphson method, find the root 𝑥 3 − 3x − 5 = 0, which is nearer to 𝑥0 = 3.

Solution:
Here, 𝑓(𝑥) = 𝑥 3 − 3𝑥 − 5
∴ 𝑓 ′ (𝑥) = 3𝑥 2 − 3
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛 3 − 3𝑥𝑛 − 5 2𝑥𝑛 3 + 5
𝑥𝑛+1= 𝑥𝑛 – = 𝑥𝑛 – =
𝑓 ′ (𝑥𝑛 ) 3𝑥𝑛 2 − 3 3𝑥𝑛 2 − 3
The approximate value of the root is given to be 3. Taking 𝑥0 = 3 , we get
P a g e | 72
2𝑥0 3 + 5 2.33 + 5
𝑥1 = = = 2.4583
3𝑥0 2 − 3 3.32 − 3
2𝑥1 3 + 5 2. (2.4583)3 + 5
𝑥2 = = = 2.2943
3𝑥1 2 − 3 3. (2.4583)2 − 3
2𝑥2 3 + 5 2. (2.2943)3 + 5
𝑥3 = = = 2.2791
3𝑥2 2 − 3 3. (2.2943)2 − 3
Now, 𝑓(2.2791) = 0.0010 , so the required root is 2.2791.

Question 5:
Find the real root of the equation −4𝑥 + 𝑐𝑜𝑠𝑥 + 2 = 0 , by Newton-Rapshon method up to four
decimal places.
Solution:

Let, 𝑓(𝑥) = −4𝑥 + 𝑐𝑜𝑠𝑥 + 2 = 0

𝑓 ′ (𝑥) = −4 − 𝑠𝑖𝑛𝑥

f(0)= -4(0)+cos0+2=3 ˃ 0

f(1)= -4(1)+cos1+2= -4+0.5403+2 = -1.4597 ˂ 0

Thus, a root lies between 0 and 1 .

Now,

(0 + 1)
𝑥0 = = 0.5
2
First approximation:

𝑓(𝑥0 )
𝑥1 = 𝑥0 − = 0.7494
𝑓′(𝑥0 )

Second approximation:

𝑓(𝑥1 )
𝑥2 = 𝑥1 − = 0.7499
𝑓 ′ (𝑥1 )

Third approximation:

𝑓(𝑥2 )
𝑥3 = 𝑥2 − = 0.7499
𝑓′(𝑥2 )

Now 0.7499 is the root of the given equation correct to the three decimal places.
P a g e | 73

Method of false position


This is the method for finding the real root of an equation and closely resembles the bisection method.
In this method, we choose two points 𝑥1 and 𝑥2 such that 𝑓(𝑥1 ) and 𝑓(𝑥2 ) are of opposite signs. Since
the graph of 𝑦 = 𝑓(𝑥) crosses the 𝑥 axis between these two points, a root must lie in between these
two points.

𝑓(𝑥)

[𝑥1 , 𝑓(𝑥1 )]

𝑦 = 𝑓(𝑥)

𝑥2
𝑥1 𝑥

[𝑥2 , 𝑓(𝑥2 )]

Figure: Geometrical representation of false position.

Now the equation of the chord joining the two points [𝑥1 , 𝑓(𝑥1 )] and [𝑥2 , 𝑓(𝑥2 )] is
𝑦 − 𝑓(𝑥1 ) 𝑓(𝑥2 ) − 𝑓(𝑥1 )
= … … … … … … … … … (1)
𝑥 − 𝑥1 𝑥2 − 𝑥1

The method consist in replacing the part of the curve between the points [𝑥1 , 𝑓(𝑥1 )] and [𝑥2 , 𝑓(𝑥2 )]
by means of the chord joining these points and taking the point of intersection of the chord with the
axis as an approximation to the root.

The point of intersection in the present case giving by putting 𝑦 = 0 in (1).


Thus we obtain,

𝑓(𝑥1 )
x = 𝑥1 − (𝑥 − 𝑥1 )
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2
P a g e | 74

Hence the first approximation to the root 𝑓(𝑥) = 0 is giving by

𝑓(𝑥1 )
𝑥3 = 𝑥1 − (𝑥 − 𝑥1 ) … … … … … … … (2)
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2

If now 𝑓(𝑥3 ) and 𝑓(𝑥1 ) are at opposite signs, then the roots lies between 𝑥1 and 𝑥3 and we replace 𝑥2
by 𝑥3 in (2) and obtain the nextr approximation. Otherwise we replace 𝑥2 by 𝑥3 and generate the next
approximation.

Question 1:

Find a real root of wallis’s(1685) equation 𝑓(𝑥) = 𝑥 3 − 2𝑥 − 5 = 0

Solution:

We observe that,
𝑓(2) = −1 𝑎𝑛𝑑 𝑓(3) = 16
Hence a root lies between 2 and 3 .we have,

𝑓(𝑥1 )
𝑥 = 𝑥1 − 𝑓(𝑥 (𝑥2 -𝑥1 ) …………………..(1)
2 )−𝑓(𝑥1 )

−1
= 2 − 16+1 (3 − 2) = 2.059

i.e 𝑥3 = 2.059

Now 𝑓(𝑥3 ) = −0.38 𝑎𝑛𝑑 ℎ𝑒𝑛𝑐𝑒 𝑡ℎ𝑒 𝑟𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 2.059 𝑎𝑛𝑑 3.0
Using equation(1) again,

0.386
𝑥4 = 2.059 + (3 − 2.059)
16.386

Repeating the process ,we obtain successfully

𝑥5 = 2.0904, 𝑥6 = 2.0934 𝑒𝑡𝑐.

The correct value is 2.0943, so 𝑥6 is correct to two decimal places.


P a g e | 75

VIVA QUESTION :
1.What is the Newton-Raphson method?

Explain that it is an iterative method for finding successively better approximations to the roots (or
zeros) of a real-valued function.

2. Explain the principle behind the Newton-Raphson method.

It is based on the tangent line approximation. Starting from an initial guess, we use the tangent at that
point to approximate the function's root.

3.Raphson method to converge?

The function should be differentiable, and the initial guess should be close enough to the actual root.
Convergence can be rapid if the function is well-behaved near the root.

Used in solving nonlinear equations in engineering, physics, finance, and other fields.

It has a high rate of convergence (quadratic), making it faster than other methods, like the bisection
method, for functions that meet its requirements.

You might also like