0% found this document useful (0 votes)
22 views83 pages

Group 05

This document is an assignment on Numerical Analysis submitted by a group of students at Khulna University. It covers various topics including calculus of finite differences, interpolation methods, numerical integration, and solutions of equations. The report provides definitions, formulas, and examples related to these numerical methods.
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)
22 views83 pages

Group 05

This document is an assignment on Numerical Analysis submitted by a group of students at Khulna University. It covers various topics including calculus of finite differences, interpolation methods, numerical integration, and solutions of equations. The report provides definitions, formulas, and examples related to these numerical methods.
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/ 83

AN

ASSIGNMENT
ON
NUMERICAL
LAB REPORTANALYSIS
Course Title: Numerical Analysis
Course Code: MATH-3209
GROUP:05
ON
Submitted To: Submitted By:
Name Student ID
Dr. Munnujahan Ara
Azrin Sultana Ema 211205
Professor
MD. Samad Hossain 211210
Mathematics Discipline Tazrian Tamim 211233
Khulna University, Khulna. MD. Rayhan Hossain 211234
Maruf Hossain Riaz 211239
Soumyo Joti Chakraborty Utsho 211245
MD. Saifullah Sheikh Moon 211246
Tapos Kumar Mondol 211255
Toufiqur Rahman Tamim 211258
Sumaiya Islam 201261

3rd Year, 2nd Term


Date of Submission:30/10/2024 Mathematics Discipline
Khulna University, Khulna.
CONTENTS
Why we read Numerical Analysis ……………………………………………………………01
CALCULUS OF FINITE DIFFERENCES …………………………………………………….
The operators 𝐸, Δ and ∇ ………………………………………………………………………..01
Difference Table ………………………………….…………………………………………02-04
INTERPOLATION WITH EQUAL INTERVAL……………………………………………...
Interpolation ……………………………………………………………………………………08
Newton-Gregory formula for forward interpolation ………………………………………..08-13
Newton-Gregory formula for backward interpolation ……………………………………...13-23
INTERPOLATION WITH UNEQUAL INTERVAL …………………………………………
Newton's formula for Unequal Intervals/Divided difference ………………………………23-25
Lagrange's interpolation formula ……………………………………………………...……25-30
CENTRAL DIFFERENCE INTERPOLATION ……………………………………………..
Difference Table ……………………………………………………………………………30-31
Gauss's forward interpolation formula ……………………………………………………..31-32
Gauss's Backward interpolation formula …………………………………………………...33-35
Stirling's interpolation formula ……………………………………………………………..36-39
Bessel's interpolation formula ………………………………………………………………39-44
NUMERICAL INTEGRATION ………………………………………………………………..
Trapezoidal rule for numerical integration …………………………………………………44-47
Simpson's ' 1/3 ' rule for numerical integration ……………………………………………47-50
Simpson's ' 3/8 ' rule for numerical integration ……………………………………………….46
Romberg Integration rule ……………………………………………………………………50-55
HW…………………...……………………………………………………………………….55-63
SOLUTION OF EQUATIONS ………………………………………………………………….
Bisection Method ……………………………………………………………………………63-70
Newton - Raphson Method …………………………………………………………………70-83
Page |1

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,8,1/2,0.5 are exact numbers.
√2, pi, √3 are approximate numbers as they cannot be expressed exactly by a finite digit.
They can be written as 1.414,3.1416,1.7320 etc.
Rounding off numbers:
If 27.73 is rounded off to three decimal places, the result is 27.7
If 9.2652 is rounded off to three decimal places, the value 9.27
Computation of errors:
Let,
𝑉𝑇 = True value
𝑉𝐴 =Approximate value of a number
The error is 𝐸 = 𝑉𝑇 − 𝑉𝐴
The absolute error is 𝐸𝐴 = |𝑉𝑇 − 𝑉𝐴 |
𝐸 |𝑉𝑇 −𝑉𝐴 |
The relative error is 𝐸𝑅 = 𝑉𝐴 =
𝑇 𝑉𝑇

|𝑉𝑇 −𝑉𝐴 |
The percentage error is 𝐸𝑃 = 𝐸𝑅 × 100% = × 100%
𝑉𝑇

Operators
Page |2

The operator E:
This is known usually as shifting or shift operator.
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
Where, ℎ = increment value
𝑦 = 𝑓(𝑥) be any function of 𝑥.
Operating E on 𝑥 simply indicate an increment value of 𝑥 in 𝑓(𝑥).
In terms of 𝑦 we can write as: 𝐸𝑦 𝑖 = 𝑦𝑖+1

The operator ∆ (forward difference):


The forward difference operator ∆ (delta) is defined as:
∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∆𝑦𝑛 = 𝑦𝑛+1 − 𝑦𝑛
∆𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 + ℎ) − 𝑓(𝑥𝑖 )
∆𝑦𝑖 = 𝑦𝑖+1 − 𝑦𝑖
Where 𝑖 = 0,1,2,3, … … … 𝑛
Now,
∆𝑦0 = 𝑦1 − 𝑦0
∆𝑦1 = 𝑦2 − 𝑦1
…………
∆𝑦𝑛−1 = 𝑦𝑛 − 𝑦𝑛−1
This is called first order forward difference.
Horizontal forward difference table:
𝒙 𝒚 = 𝒇(𝒙) 𝚫𝒚 𝚫𝟐𝒚 𝚫𝟑𝒚 𝚫𝟒𝒚
𝑥0 𝑦0 Δ𝑦0 Δ2𝑦0 Δ3𝑦0 Δ4𝑦0
𝑥1 𝑦1 Δ𝑦1 Δ2𝑦1 Δ3𝑦1
𝑥2 𝑦2 Δ𝑦2 Δ2𝑦2
𝑥3 𝑦3 Δ𝑦3
𝑥4 𝑦4
Page |3

Diagonal forward difference table:


𝒙 𝒚 = 𝒇(𝒙) 𝚫𝒚 𝚫𝟐𝒚 𝚫𝟑𝒚 𝚫𝟒𝒚

𝑥0 𝑦0
Δ𝑦0
𝑥1 𝑦1 Δ2𝑦0
Δ𝑦1 Δ3𝑦0
𝑥2 𝑦2 Δ2𝑦1 Δ4𝑦0
Δ𝑦2 Δ3𝑦1
𝑥3 𝑦3 Δ2𝑦2
Δ𝑦3
𝑥4 𝑦4

The operator ∇ (backward difference):


The backward difference operator ∇ (nabla) is defined as:
𝛻𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
𝛻𝑦𝑛 = 𝑦𝑛 − 𝑦𝑛−1
𝛻𝑓(𝑥𝑖 ) = 𝑓(𝑥𝑖 ) − 𝑓(𝑥𝑖 − ℎ)
𝛻𝑦𝑖 = 𝑦𝑖 − 𝑦𝑖−1
Where 𝑖 = 𝑛, 𝑛 − 1, … … 1.
Now,
𝛻𝑦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 the independent variable 𝑥.
Page |4

Horizontal backward difference table:

𝒙 𝒚 = 𝒇(𝒙) 𝛁𝒚 𝛁𝟐𝒚 𝛁𝟑𝒚 𝛁𝟒𝒚


𝑥0 𝑦0
𝑥1 𝑦1 ∇𝑦1
𝑥2 𝑦2 ∇𝑦2 ∇2𝑦2
𝑥3 𝑦3 ∇𝑦3 ∇2𝑦3 ∇3𝑦3
𝑥4 𝑦4 ∇𝑦4 ∇2𝑦4 ∇3𝑦4 ∇4𝑦4

Diagonal backward difference table:

𝒙 𝒚 = 𝒇(𝒙) 𝚫𝒚 𝚫𝟐𝒚 𝚫𝟑𝒚 𝚫𝟒𝒚

𝑥0 𝑦0
Δ𝑦0
𝑥1 𝑦1 Δ2𝑦0
Δ𝑦1 Δ3𝑦0
𝑥2 𝑦2 Δ2𝑦1 Δ4𝑦0
Δ𝑦2 Δ3𝑦1
𝑥3 𝑦3 Δ2𝑦2
Δ𝑦3
𝑥4 𝑦4

Viva questions:
1. What is exact and approximate numbers?
2. What is shift operator?
3. Define absolute, relative and percentage error.
4. What is forward and backward difference?

Problem 01: Prove that:  =  − 


Page |5

Solution:
We have to prove that, ∆. ∇= ∆ − ∇
We know,
f ( x) = f ( x + h) − f ( x)
f ( x) = f ( x) − f ( x − h)

Now,
f ( x) = [ f ( x) − f ( x − h)]

= f ( x) − f ( x − h)
= f ( x) − { f ( x) − f ( x − h)}
= f ( x) − f ( x)

 () f ( x) = f ( x) − f ( x)
() f ( x) = ( − ) f ( x)
 =  − 
[Proved]

Problem 02: Show that, ∆=𝐸−1


Solution:
We have to show that, ∆ = 𝐸 − 1
Here,
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
⇒ ∆𝑓(𝑥) = 𝑓(𝑥 + 1) − 𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
∴ ∆=𝐸−1
[Proved]

problem 03: If h is very small then prove that, n+1 f ( x0 ) = hn+1 f n+1 ( x0 )
Page |6

Solution:
We know,
f ( x0 + h) − f ( x0 )
lim = f '( x0 )
h →0 h
f ( x0 )
 lim = f '( x0 )
h →0 h
Hence, f ( x0 ) = hf '( x0 )

Also,
f '( x0 + h) − f '( x0 )
lim = f ''( x0 )
h →0 h
f ( x0 + h) f ( x0 )

 lim h h = f ''( x )
0
h →0 h
f ( x0 + h) − f ( x0 )
 lim = f ''( x0 )
h →0 h2
 2 f ( x0 )
 lim  f ''( x0 )
h →0 h2
So, 2 f ( x0 )  h2 f ''( x0 )

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

Similarly, n+1 f ( x0 ) = hn+1 f n+1 ( x0 )

[Proved]
Home Work

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

Solution:
Proof: From shifting operator we know that,
𝐸 = 1 + ∆ 𝑎𝑛𝑑 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
⇒∆=𝐸−1
So we get,
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
Page |7

⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥)


Also for ∆2 𝑓(𝑥) = ∆{∆𝑓(𝑥)}
= ∆{𝑓(𝑥 + ℎ) − 𝑓(𝑥)}
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= (𝐸 − 1)𝑓(𝑥 + ℎ) − (𝐸 − 1)𝑓(𝑥)
= 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) − 𝐸𝑓(𝑥) + 𝑓(𝑥)
= 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) + 𝑓(𝑥)
∆2 𝑓(𝑥) = 𝑓 (𝑥 + 2ℎ) − 2𝑓(𝑥 + ℎ) + 𝑓(𝑥)
Similarly,
∆3 𝑓(𝑥) = (𝐸 − 1)3 𝑓(𝑥)
= (𝐸 3 − 3𝐸 2 + 3𝐸 − 1)𝑓(𝑥)
= 𝐸 3 𝑓(𝑥) − 3𝐸 2 𝑓(𝑥) + 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 𝑘 𝑡ℎ order difference of a function 𝑓(𝑥)


𝑘

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


𝑘

𝑖=0

[Proved]

2. Show that the 1st difference polynomial of degree n is a polynomial of degree (𝑛 − 1).
Solution:
Let us consider a polynomial of degree ‘n’,
𝑦 = 𝑓(𝑥) = 𝑎𝑥 𝑛 + 𝑏𝑥 𝑛−1 + ⋯ … + 𝑘𝑥 + 𝑙 … … … . (1)
Again let,
∆𝑥 = ℎ i.e., 𝑥0 + ℎ = 𝑥0 + ∆𝑥0 = 𝑥1
Page |8

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

Interpolation and Extrapolation

𝑥 𝑥0 𝑥1 𝑥2 ……………….. 𝑥𝑛
𝑓(𝑥) 𝑦0 𝑦1 𝑦2 …………………. 𝑦𝑛

Interpolation is the process of finding the value of 𝑓(𝑥) corresponding to any untabulated value
of 𝑥 between 𝑥0 𝑎𝑛𝑑 𝑥𝑛 .
Page |9

The process of finding the value of 𝑓(𝑥) for some value of 𝑥 outside the given range [𝑥0 , 𝑥𝑛 ] is
called extrapolation.
There are several methods of interpolating data points within a given range, depending upon the
location where the value is to be interpolated as given below;

Interpolation with equal interval


1. Newton’s Newtons-Gregory for forward interpolation
2. Newton’s Newtons-Gregory for backward interpolation

Interpolation with unequal interval


Newton’s general interpolation
Lagrange’s interpolation
Central differences
Gauss’s forward difference formula
Gauss’s backward difference formula
Stirling’s central formula
Bessel’s interpolation

Newtons-Gregory for forward interpolation


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

𝑥1 𝑥2 𝑥3 𝑥𝑛−1 𝑥𝑛
𝑥0 ……….
𝑥0 + ℎ 𝑥1 + ℎ 𝑥2 + ℎ 𝑥𝑛−2 + ℎ 𝑥𝑛−1 + ℎ
𝑦0 𝑦1 𝑦2 𝑦3 ………… 𝑦𝑛−1 𝑦𝑛

Let us consider a polynomial


∅(𝑥)≡𝑓(𝑥)
P a g e | 10

∅(x)=𝑎0 +𝑎1 (𝑥 − 𝑥0 ) + 𝑎2 (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )+𝑎3 (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )+....𝑎𝑛 (𝑥 − 𝑥0 )(𝑥 −


𝑥1 ) … . (𝑥 − 𝑥𝑛−1 )…… (1)

Putting 𝑥 = 𝑥0 , 𝑥1 , 𝑥2 … . 𝑥𝑛 successively in (1) we get

𝑦0 = 𝑎0

𝑦1 = 𝑎0 + 𝑎1 (𝑥1 − 𝑥0 )
∆𝑦0 = 𝑦1 − 𝑦0
∆𝑦0 = 𝑎1 (𝑥1 − 𝑥0 )
∆𝑦0 = 𝑎1 ℎ
∆y0
a1 =
1! h
putting (x = x2 ) and ∅(x2 ) = y2 in (1),
∅(𝑥2 ) = 𝑎0 + 𝑎1 (𝑥2 − 𝑥0 ) + 𝑎2 (𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )
(𝑦0 + (𝑦1 − 𝑦0 ))
𝑦2 =
ℎ .2ℎ + 𝑎2 . 2ℎ. ℎ
𝑦2 −2𝑦1 +𝑦0
𝑎1 = .
2ℎ2

∆2 𝑦0
𝑎2 = .
2!ℎ2

Substituting all these values in equation (1) We get,

∆𝑛 𝑦0
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … . (𝑥 − 𝑥𝑛−1 )………… (2)
𝑛!ℎ𝑛

Let,
∆𝑛 𝑦0
𝑎𝑛 = .
𝑛!ℎ𝑛

(x − x0 )
=𝑢
h
𝑥 = 𝑥0 + ℎ𝑢
(x − x0 ) (x0 + hu − x1 )
=
h h
P a g e | 11

(hu − h)
=
h
=𝑢−1

Hence the equation (2) become as


∆𝑦0 ∆2 ∆3
𝑓(𝑥) = ∅(𝑥) = 𝑦0 + 𝑢 + 𝑦0 . 𝑢(𝑢 − 1) + 𝑦0 . 𝑢(𝑢 − 1)(𝑢 − 2)
1! 2! 3!
∆𝑛 𝑦0
+ ⋯..+ … {𝑢 − (𝑛 − 1)}
(𝑛! ℎ𝑛 )𝑢(𝑢 − 1)(𝑢 − 2)

This is known as Newton-Gregory’s formula for forward interpolation with equal intervals.

Question-1: Find the cubic polynomial with given set of points


X 0 1 2 3
𝑓(𝑥) 5 6 3 14
Also evaluate 𝑓(0.5)

Solution:

Newton’s forward difference table –

𝑥 𝑓(𝑥) ∆𝑦 ∆2 𝑦 ∆3 𝑦
0 5
1
1 6 -4
-3 18
2 3 14
11
3 14

For finding 𝑓(𝑥),

ℎ = 1;
(x − x0 )
=𝑢
h
P a g e | 12

(x − 0)
=𝑢
h
𝑢=𝑥
∆𝑦0 = 1; ∆2 𝑦0 = −4; ∆3 𝑦0 = 18
Newton's forward difference interpolation formula is –
∆𝑦0 ∆2 ∆3
𝑓(𝑥) = 𝑦0 + 𝑢 + 𝑦0 . 𝑢(𝑢 − 1) + 𝑦0 . 𝑢(𝑢 − 1)(𝑢 − 2)
1! 2! 3!
= 5 + 𝑥 − 2𝑥 2 + 2𝑥 + 3𝑥(𝑥 2 − 3𝑥 + 3)
= 3𝑥 3 − 11𝑥 2 + 9𝑥 + 5
∴ 𝑓(0.5) = 3(0.5)3 − 11(0.5)2 + +9(0.5) + 5
= 7.125
Question-2: The following table gives the pollution of a town during the last six census.
Estimate using any suitable interpolation formula the increases in the population during the period
from 1946.
Year 1911 1921 1931 1941 1951 1961
Population 12 15 20 27 39 52

Solution:
Newton’s forward difference table –

Year Population ∆𝑦 ∆2 𝑦 ∆3 𝑦 ∆4 𝑦 ∆5 𝑦

1911 12
3

1921 15 2
5 0

1931 20 2 3
7 3 -10

1941 27 5 -7
12 -4

1951 39 1
13
P a g e | 13

1961 52

(𝐱−𝐱𝟎 )
𝐿𝑒𝑡, =𝑢
h
(1946−1911)
=𝑢
10

𝑢 = 3.5
∆𝑦0 = 3; ∆2 𝑦0 = 2; ∆3 𝑦0 = 0; ∆4 𝑦0 = 3; ∆5 𝑦0 = −10

Newton's forward difference interpolation formula is –


∆𝑦0 ∆2 ∆3
𝑓(𝑥) = 𝑦0 + 𝑢 + 𝑦0 . 𝑢(𝑢 − 1) + 𝑦0 . 𝑢(𝑢 − 1)(𝑢 − 2)
1! 2! 3!
∆4 ∆5
+ 𝑦0 . 𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) + 𝑦0 . 𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3)(𝑢 − 4)
4! 5!
𝑓(1946) = 12 + 3(3.5) + 3.5(2.5) + 0 + 1/8(3.5 × 2.5 × 1.5 × 0.5)
+ ((−1)/12 ){3.5 × 2.5 × 1.5 × 0.5 × (−.5)}
= 12 + 10.5 + 8.75 + 0.82 + 0.27
= 32.34 ≈ 33

Viva Question

1. What is interpolation?
2. What is the definition of extrapolation?
3. The types of interpolation with equal interval
4. What do you mean by Newton’s Gregory for forward interpolation?
5. What is the type of interpolation with unequal interval?

Newton’s Gregory for backward Interpolation:


𝑦 = 𝑓(𝑥) denotes a function which takes the value 𝑦0 , 𝑦1 , 𝑦3 . . 𝑦𝑛 for the equidistant value
𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 … 𝑥𝑛 respectively of the independent variable 𝑥.
P a g e | 14

𝑦(𝑥0 ) = 𝑦0 , 𝑦(𝑥1 ) = 𝑦1 , … 𝑦(𝑥𝑛 ) = 𝑦𝑛


𝑥0 𝑥1 𝑥2 𝑥3 … 𝑥𝑛−1 𝑥𝑛
(𝑥0 + ℎ) (𝑥1 + ℎ) (𝑥2 + ℎ) (𝑥𝑛−2 + ℎ) (𝑥𝑛−1 + ℎ)

𝑦0 𝑦1 𝑦2 𝑦3 … 𝑦𝑛−1 𝑦𝑛

, Let ∅(𝑥) be a polynomial in x of degree n,


∅(𝑥) = 𝑎0 + 𝑎1(𝑥 − 𝑥𝑛) + 𝑎2(𝑥 − 𝑥𝑛)(𝑥 − 𝑥𝑛−1) + 𝑎3(𝑥 − 𝑥𝑛)(𝑥 − 𝑥𝑛−1)(𝑥 − 𝑥𝑛−2) +
⋯ + 𝑎𝑛(𝑥 − 𝑥𝑛)(𝑥 − 𝑥𝑛−1)(𝑥 − 𝑥𝑛−2) + ⋯ + (𝑥 − 𝑥1 (1)
Where, 𝑎0, 𝑎1, 𝑎2, … 𝑎𝑛 are the coefficients.
Consider,(𝑥𝑛 − 𝑥𝑛−1) = ℎ, (𝑥𝑛 − 𝑥𝑛−2) = 2ℎ , (𝑥𝑛 − 𝑥𝑛−3) = 3ℎ & so on

Now, putting (𝒙 = 𝒙𝒏) in (1) and also putting ∅(𝒙𝒏) = 𝒚𝒏 ,


∅(𝑥𝑛) = 𝑎0 + 0
⇒ 𝑎0 = 𝑦𝑛
putting (𝒙 = 𝒙𝒏−𝟏) and ∅(𝒙𝒏−𝟏) = 𝒚𝒏−𝟏 in (1),
∅(𝑥𝑛−1) = 𝑎0 + 𝑎1(𝑥𝑛−1 − 𝑥𝑛)
⇒ 𝑦𝑛−1 = 𝑦𝑛 + 𝑎1. (−ℎ )
𝑦𝑛 − 𝑦𝑛−1
⇒ 𝑎1 =

∇𝑦𝑛
⇒ 𝑎1 =
1! ℎ
putting (𝒙 = 𝒙𝒏−𝟐) and ∅(𝒙𝒏−𝟐) = 𝒚𝒏−𝟐 in (1),
∅(𝒙𝒏 − 𝟐) = 𝒂𝟎 + 𝒂𝟏(𝒙𝒏 −𝟐 − 𝒙𝒏 ) + 𝒂𝟐(𝒙𝒏 −𝟐 − 𝒙𝒏 )(𝒙𝒏 −𝟐 − 𝒙𝒏 −𝟏)
𝑦𝑛−1)
⇒ 𝑦𝑛−2 = 𝑦1 + (𝑦𝑛 − (−2ℎ) + 𝑎. (−2ℎ). (−ℎ)

𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2 2
⇒ 𝑎2 = .ℎ
2.1
P a g e | 15

∇2 𝑦𝑛
⇒ 𝑎2 =
2! ℎ2
putting (𝒙 = 𝒙𝒏−𝟑) and ∅(𝒙𝒏−𝟑) = 𝒚𝒏−𝟑 in equation (1),
∅(𝑥𝑛−3 ) = 𝑎0 + 𝑎1 (𝑥𝑛−3 − 𝑥𝑛 ) + 𝑎2 (𝑥𝑛−3 − 𝑥𝑛 )(𝑥𝑛−3 − 𝑥𝑛−1 )
+ 𝑎3 (𝑥𝑛−3 − 𝑥𝑛 )(𝑥𝑛−3 − 𝑥𝑛−1 )(𝑥𝑛−3 − 𝑥𝑛−2 )
𝑦𝑛 − 𝑦𝑛−1 𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2
⇒ 𝑦𝑛−3 = 𝑦𝑛 + + . (−3ℎ). (−2ℎ). (−ℎ) + 𝑎3 . (−3ℎ). (−2ℎ). (−ℎ)
ℎ . (−3ℎ) 2ℎ2
∇3 yn
⇒ a3 =
3! h3
…… ……… ……..………
…… ……… ……..………
(∇n yn )
an =
n! hn
Substituting all these values in equation (1) We get,
𝛻 𝑦𝑛 𝛻 2 𝑦𝑛
∅(𝑥) = 𝑦𝑛 + (𝑥 − 𝑥𝑛 ) + (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 )
ℎ 2! ℎ2
3
𝛻 𝑦𝑛
+ (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 )(𝑥 − 𝑥𝑛−2 ) + ⋯
3! ℎ3
𝛻 𝑛 𝑦𝑛
+ (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 ) … . (𝑥 − 𝑥1 ) … … … … … … … … (2)
𝑛! ℎ𝑛

𝑥𝑛
Let, 𝑥 − = 𝑢

⇒ 𝑥 = 𝑥𝑛 + ℎ𝑢
𝑥 − 𝑥𝑛−1 𝑥 − (𝑥𝑛 − ℎ) 𝑥 − 𝑥𝑛 ℎ
∴ = = + = 𝑢 + 1
ℎ ℎ ℎ ℎ
𝑥 – 𝑥𝑛−2 𝑥 −(𝑥𝑛 − 2ℎ) 𝑥−𝑥𝑛 2ℎ
And, = = + = 𝑢+ 2
ℎ ℎ ℎ ℎ

……………………………………………….…………
… … … … … … … … … … … … … ….
𝑥 − 𝑥1 𝑥 − (𝑥𝑛 − (𝑛 − 1)ℎ) 𝑥 − 𝑥𝑛
= = + (𝑛 − 1) = 𝑢 + (𝑛 − 1)
ℎ ℎ ℎ
Substituting these values in (2), We get,
P a g e | 16

𝑢(𝑢 + 1) 2 𝑢 (𝑢 + 1)(𝑢 + 2) 3
∅(𝑥) = 𝑦𝑛 + 𝑢𝛻𝑦𝑛 + 𝛻 𝑦𝑛 + 𝛻 𝑦𝑛 + ⋯
2! 3!
𝑢 + 𝑛 − 1 𝑛
+ 𝑢(𝑢 + 1)(𝑢 + 2) … . 𝛻 𝑦𝑛
𝑛!
This is known as Newton-Gregory’s formula for backward interpolation with equal intervals.

MATHEMATICAL PROBLEMS
Question-1: Compute 𝒔𝒊𝒏(𝟓𝟕°) by Newton’s Backward Interpolation Formula.
𝒙: 𝟒𝟓° 𝟓𝟎° 𝟓𝟓° 𝟔𝟎°
𝒔𝒊𝒏(𝒙): 0.7071 𝟎. 𝟕𝟔𝟔𝟎 𝟎. 𝟖𝟏𝟗𝟐 𝟎. 𝟖𝟔𝟔𝟎
Solution:
The difference Table for the problem given below:
𝒙 𝒚 = 𝒇(𝒙) 𝜵𝒇(𝒙) 𝜵𝟐𝒇(𝒙) 𝜵𝟑𝒇(𝒙)
45 0.7071
0.0589
50 0.7600 -0.0057
0.0532 -0.0007
55 0.8192 -0.0064
0.0468
60 0.8660
Here,
ℎ = 5, 𝑥 = 57, 𝑥𝑛 = 60
𝑥−𝑥𝑛 57−60
So, 𝑢 = = = −0.6
ℎ 6

We know from the Newton’s Backward Interpolation formula,


𝑢 (𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
𝑦 = 𝑦𝑛 + 𝑢𝛻𝑦𝑛 + 𝛻 𝑦𝑛 + 𝛻 𝑦𝑛
2! 3!
= 0.8660 + (−0.6) × 0.0468 + (−0.6)(−0.6 + 1) 2 (−0.0064) + (−0.6)(−0.6 + 1)(−0.6 + 2) 6 ×
(−0.0057)
= 0.83872 (approximately)
P a g e | 17

Question-2: Compute 𝒇(𝟑. 𝟐) from the following table, using Newton's Backward
difference formula.
𝒙 0 1 2 3
𝒚 1 2 11 34
Solution:
Newton's backward difference table:
𝑥 𝑦 𝛻𝑦 𝛻2 𝑦 𝛻3 𝑦
0 1
1 2 1
2 11 9 8
3 34 23 14 6
The value of 𝑦 at 𝑥 = 3.2,
ℎ = 𝑥1 − 𝑥0 = 1 − 0 = 1
𝑥 − 𝑥𝑛 3.2 − 3
𝑢= = =1
ℎ 1
Newton's backward difference interpolation formula is –
𝑢 (𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
𝑦 = 𝑦𝑛 + 𝑢𝛻𝑦𝑛 + 𝛻 𝑦𝑛 + 𝛻 𝑦𝑛
2! 3!
0.2(0.2 + 1) 0.2(0.2 + 1)(0.2 + 2)
⇒ 𝑦 = 34 + 0.2 × 23 + × 14 + × 6
2 6
⇒ 𝑦 = 34 + 4.6 + 1.68 + 0.528
⇒ 𝑦 = 40.808

Question-3: Find 𝑓(67) by Newton Backward interpolation formula.

𝒙 55 60 65 70
𝑓 (𝑥) 46 66 81 93

Solution:
P a g e | 18

Newton's backward difference table:


𝑥 𝑦 𝛻𝑦 𝛻2 𝑦 𝛻3 𝑦
55 46
60 66 20
65 81 15 -5
70 93 12 -3 2

ℎ = 𝑥1 − 𝑥0 = 60 − 55 = 5
𝑥 − 𝑥𝑛 67 − 70
𝑢= = = −0.6
ℎ 5
Newton's backward difference interpolation formula is –
𝑢 (𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
𝑦 = 𝑦𝑛 + 𝑢𝛻𝑦𝑛 + 𝛻 𝑦𝑛 + 𝛻 𝑦𝑛
2! 3!
(−0.6) × (−0.6 + 1)
𝑦(67) = 93 + (−0.6) × 12 + × (−3)
2
−0.6 × (−0.6 + 1) × (−0.6 + 2)
+ ×2
6
= 86.048
Question-4:
Let 𝑦(0) = 1, 𝑦(1) = 0, 𝑦(2) = 1 𝑎𝑛𝑑 𝑦(3) = 10.
𝐹𝑖𝑛𝑑 𝑦(4) 𝑏𝑦 𝑢𝑠𝑖𝑛𝑔 𝑁𝑒𝑤𝑡𝑜𝑛′ 𝑠 𝑏𝑎𝑐𝑘𝑤𝑎𝑟𝑑 𝑖𝑛𝑡𝑒𝑟𝑝𝑜𝑙𝑎𝑡𝑖𝑜𝑛 𝑓𝑜𝑟𝑚𝑢𝑙𝑎.
P a g e | 19

Solution:
𝑥 𝑦 𝛻𝑦 𝛻2 𝑦 𝛻3 𝑦
0 1
1 0 -1
2 1 1 2
3 10 9 8 6

ℎ = 𝑥1 − 𝑥0 = 1 − 0 = 1
𝑥 − 𝑥𝑛 4 − 3
𝑢= = =1
ℎ 1
Newton's backward difference interpolation formula is –
𝑢 (𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
𝑦 = 𝑦𝑛 + 𝑢𝛻𝑦𝑛 + 𝛻 𝑦𝑛 + 𝛻 𝑦𝑛
2! 3!
𝑦(4) = 10 + 9 + 8 + 6 = 33

Let 𝑦 = 𝑓(𝑥) is a function of 𝑥. 𝑥0, 𝑥1, 𝑥2, … , 𝑥𝑛 are the values of 𝑥 with unequal interval
and 𝑦0, 𝑦1, 𝑦2, … , 𝑦𝑛 are the corresponding values of 𝑦.
From the definition of divided difference, we have
𝑦 − 𝑦0
𝛿(𝑥, 𝑥0 ) =
𝑥 − 𝑥0

⇒ 𝑦 = 𝑦0 + (𝑥 − 𝑥0 ) 𝛿 (𝑥, 𝑥0 ) → (𝑖)
2 nd divided difference,
𝛿 (𝑥, 𝑥0 ) − 𝛿 (𝑥0 , 𝑥1 )
𝛿 (𝑥, 𝑥0 , 𝑥1 ) =
𝑥 − 𝑥1
⇒ 𝛿(𝑥, 𝑥0 ) = 𝛿(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥1 )𝛿(𝑥, 𝑥0 , 𝑥1 ) → (𝑖𝑖)
Similarly,
𝛿(𝑥, 𝑥0, 𝑥1) = 𝛿(𝑥0, 𝑥1, 𝑥2) + (𝑥 − 𝑥2)𝛿(𝑥, 𝑥0, 𝑥1, 𝑥2) → (𝒊𝒊𝒊)
………………………………………
P a g e | 20

………………………………………
𝛿(𝑥, 𝑥0, . . . 𝑥𝑛−1) = 𝛿(𝑥0, 𝑥1, . . . 𝑥𝑛) + (𝑥 − 𝑥𝑛)𝛿(𝑥, 𝑥0, 𝑥1, . . , 𝑥𝑛) → (𝒊𝒗)

𝑥 𝑦 = 𝑓(𝑥) 1ST 2ND DIFFERENCE 𝛿 2 3RD DIFFERENCE 𝛿 3


DIFFERENCE
𝛿
𝑥0 𝑦0
𝑦1 − 𝑦0
𝑥1 − 𝑥0
= 𝛿 (𝑥1 , 𝑥0 )

𝑥1 𝑦1 𝛿 (𝑥2 , 𝑥1 ) − 𝛿 (𝑥1 , 𝑥0 )
𝑥2 − 𝑥0
= 𝑓(𝑥2 , 𝑥1 , 𝑥0 )
𝑦2 − 𝑦1 𝛿 (𝑥3 , 𝑥2 , 𝑥1 ) − 𝛿 (𝑥2 , 𝑥1 , 𝑥0 )
𝑥2 − 𝑥1 𝑥3 − 𝑥0
= 𝛿 (𝑥2 , 𝑥1 ) = 𝑓(𝑥3 , 𝑥2 , 𝑥1 , 𝑥0 )

𝑥2 𝑦2 𝛿 (𝑥3 , 𝑥2 ) − 𝛿 (𝑥2 , 𝑥1 )
𝑥3 − 𝑥1
= 𝑓(𝑥3 , 𝑥2 , 𝑥1 )
𝑦3 − 𝑦2
𝑥3 − 𝑥2
= 𝛿 (𝑥3 , 𝑥2 )

𝑥3 𝑦3

Question:
Establish the relation between the divided difference for the equal and unequal interval
P a g e | 21

Solution:
Relation between divided difference and ordinary difference—
Let the arguments 𝑥0 , 𝑥1 , 𝑥2 … 𝑥𝑛 be the equally spaced
i.e ℎ = 𝑥1 − 𝑥0 = 𝑥2 − 𝑥1 = ⋯ = 𝑥𝑛 − 𝑥𝑛−1
and let 𝑥 = 𝑥0 + 𝑢ℎ, 𝑡ℎ𝑒𝑛
𝑓(𝑥1 ) − 𝑓(𝑥0 ) 1
𝑓(𝑥0 , 𝑥1 ) = = Δ𝑓 (𝑥0 )
𝑥1 − 𝑥0 ℎ
𝑓(𝑥0 , 𝑥1 ) − 𝑓(𝑥1 , 𝑥0 )
𝑓(𝑥0 , 𝑥1 , 𝑥2 ) =
𝑥0 − 𝑥1
1 1
Δ𝑓(𝑥0 ) − Δ𝑓(𝑥1 ) 1
=ℎ ℎ = Δ2𝑓(𝑥0)
−2ℎ 2! ℎ
Similarly
1
𝑓(𝑥0 , 𝑥1 , . . 𝑥𝑛 ) = 𝑛
Δ𝑛 𝑓 (𝑥0 )
𝑛! ℎ
Substituting these values of the divided difference in the newtons formula we get-
𝑢ℎ 𝑢ℎ(𝑢ℎ − 1) 2
𝑓(𝑥0 + 𝑢ℎ) = 𝑓(𝑥0 ) + Δ f(x0 ) + Δ 𝑓 (𝑥0 ) + ⋯
1! ℎ 2! ℎ
𝑢ℎ(𝑢ℎ − ℎ)(𝑢ℎ − 2ℎ) … (𝑢ℎ − (𝑛 − 1)ℎ) 𝑛
+ Δ 𝑓(𝑥0 )
𝑛! ℎ
𝑢 (𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) … (𝑢 − 𝑛 − 1) n
= 𝑓(𝑥0 ) + 𝑢 Δ f(x0 ) + Δ 𝑓(𝑥0 ) + ⋯ + Δ 𝑓(𝑥0 )
2! 𝑛!

2. Show that the divided differences are symmetrical in all their arguments i.e. the value of
any difference is independent of the order of the arguments.
Solution:
We have
𝑓(𝑥1 ) − 𝑓 (𝑥0 ) 𝑓(𝑥0 ) − 𝑓(𝑥1 )
𝑓 (𝑥0 , 𝑥1 ) = = = 𝑓(𝑥1 , 𝑥0 )
𝑥1 − 𝑥0 𝑥0 − 𝑥1
𝑓(𝑥0 ) 𝑓 (𝑥1 ) 𝑓(𝑥0 )
= + =∑ , 𝑠ℎ𝑜𝑤𝑖𝑛𝑔 𝑡ℎ𝑎𝑡 (𝑓(𝑥0 , 𝑥1 )𝑖𝑠 𝑠𝑦𝑚𝑚𝑒𝑡𝑟𝑖𝑐𝑎𝑙 𝑖𝑛 𝑥0 , 𝑥1
𝑥0 − 𝑥1 𝑥1 − 𝑥0 𝑥0 − 𝑥1
P a g e | 22

𝑓(𝑥1 ,𝑥0 )−𝑓(𝑥0 ,𝑥1 )


Again, 𝑓(𝑥0 , 𝑥1 , 𝑥2 ) =
𝑥2 −𝑥0

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


[{ + }−{ + }]
𝑥2 − 𝑥0 𝑥1 − 𝑥2 𝑥2 − 𝑥1 𝑥0 − 𝑥1 𝑥1 − 𝑥0
𝑓 (𝑥0 ) 𝑓(𝑥1 ) 𝑓 (𝑥2 )
= + +
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥2 )(𝑥1 − 𝑥2 ) (𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )
𝑜𝑟 𝑓(𝑥0 , 𝑥1 , 𝑥2 )
𝑓 (𝑥0 )
=∑ , 𝑠ℎ𝑜𝑤𝑖𝑛𝑔 𝑡ℎ𝑎𝑡 𝑓(𝑥0 , 𝑥1 , 𝑥2 ) 𝑖𝑠 𝑠𝑦𝑚𝑚𝑒𝑡𝑟𝑖𝑐𝑎𝑙 𝑖𝑛 𝑥0 , 𝑥1 , 𝑥2
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 )

Let us assume similar symmetrical expressions for the (𝑛 − 1)𝑡ℎ divided differences i.e. let’s
assume that
𝑓 (𝑥0 ) 𝑓(𝑥1 )
𝑓(𝑥0 , 𝑥1 , 𝑥2 ) = + +⋯
(𝑥0 − 𝑥1 ) … (𝑥0 − 𝑥𝑛−1 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛−1 )
𝑓(𝑥0 )
+
(𝑥𝑛−1 − 𝑥0 )(𝑥𝑛−1 − 𝑥1 ) … (𝑥𝑛−1 − 𝑥𝑛−2 )
𝑓(𝑥0 )
=∑
(𝑥0 − 𝑥1 ) … (𝑥0 − 𝑥𝑛−1 )

Similarly expression for the other (𝑛 − 1)𝑡ℎ divided difference


𝑓(𝑥0 ,…,𝑥𝑛−1 )−𝑓(𝑥1 ,…𝑥𝑛 )
Then 𝑓(𝑥0 , 𝑥1 , … , 𝑥𝑛 ) =
𝑥0 −𝑥𝑛

1 𝑓 (𝑥𝑛 ) 𝑓(𝑥1 )
= [{ +
𝑥0 − 𝑥1 (𝑥0 − 𝑥1 ) … (𝑥0 − 𝑥𝑛−1 ) (𝑥1 − 𝑥0 ) … (𝑥1 − 𝑥𝑛−1 )
𝑓(𝑥𝑛−1 )
+ }
(𝑥𝑛−1 − 𝑥0 ) … (𝑥𝑛−1 − 𝑥𝑛−2 )
𝑓(𝑥1 ) 𝑓 (𝑥2 )
−{ +
(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 ) (𝑥2 − 𝑥1 ) … (𝑥2 − 𝑥𝑛 )
𝑓(𝑥𝑛 )
+ }]
(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 )
𝑓(𝑥0 ) 𝑓(𝑥1 ) 𝑓 (𝑥𝑛 )
= + +⋯+
(𝑥0 − 𝑥1 ) … (𝑥0 − 𝑥𝑛 ) (𝑥1 − 𝑥0 ) … (𝑥1 − 𝑥𝑛 ) (𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 )
𝑓(𝑥0 )
=∑
(𝑥0 − 𝑥1 ) … (𝑥0 − 𝑥𝑛 )
P a g e | 23

Showing that the nth divided difference 𝑓((𝑥0 , 𝑥1 , 𝑥2 ) is also symmetrical in the 𝑥0 , 𝑥1 , … 𝑥𝑛
and thus completing the proof of the problem by mathematical induction.

Viva Questions:
1. What Newton’s Gregory for Backward Interpolation?
2. When Newton’s Gregory for Backward Interpolation formula can be used?
3. What is equal & unequal divided difference?
4. What is the relation between the equal & unequal divided difference?

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 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,
f ( x) − f ( x0 )
f ( x, x0 ) =
x − x0

Or f ( x) = f ( x0 ) + ( x − x0 ) f ( x, x0 ) … (1)

f ( x, x0 ) − f ( x0 , x1 )
Also f ( x, x0 , x1 ) =
x − x1
P a g e | 24

Or f ( x, x0 ) = f ( x0 , x1 ) + ( x − x1 ) f ( x, x0 , x1 ) … (2)

Similarly, f ( x, x0 , x1 ) = f ( x0 , x1 , x2 ) + ( x − x2 ) f ( x, x0 , x1 , x2 ) … (3)

… … … … … … …
… … … … … … …

f ( x, x0 , x1 ,..., xn−1 ) = f ( x0 , x1 ,..., xn ) + ( x − xn ) f ( x, x0 , x1 ,..., xn ) … (4)

Multiplying the equation (2) by ( x − x0 ) ,(3) by ( x − x0 )( x − x1 ) and so on and finally the equation
(4) by ( x − x0 )( x − x1 )...( x − xn−1 ) and adding to the equation (1),we have

f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1 , x2 ) + ...
+( x − x0 )( x − x1 )...( x − xn −1 ) f ( x0 , x1 ,..., xn ) + Rn ,

Where the remainder Rn is given by

Rn = ( x − x0 )( x − x1 )...( x − xn ) f ( x, x0 , x1 ,..., xn ).
Assuming that f ( x) is a polynomial of degree n,

f ( x, x0 , x1 ,..., xn ) vanishes so that

f ( x) = f ( x0 ) + ( x − x0 ) f ( x0 , x1 ) + ( x − x0 )( x − x1 ) f ( x0 , x1 , x2 ) + ...
… (5)
+( x − x0 )( x − x1 )...( x − xn −1 ) f ( x0 , x1 ,..., xn )

This formula is called Newton’s divided difference interpolation formula

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 𝑓(𝑥)
P a g e | 25

3 3

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

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

(15 − 12) (−7 + 3)


1 15 = −3 =1
(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
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 𝑓(𝑥)
P a g e | 26

0 4
(26 − 4)
= 11
(2 − 0)
2 26 (32 − 11)
(3 − 0)
(58 − 26) =7 (11 − 7)
= 32 (4 − 0)
(2 − 3)
=1 0
3 58 (54 − 32)
(4 − 2)
(112 − 58) = 11 (16 − 11)
= 54 (7 − 2)
(4 − 3)
4 112 =1
(1 − 1)
(118 − 54) (9 − 3)
(7 − 3) =0
(466 − 112) = 16
= 118 (22 − 16)
(7 − 4)
(9 − 4)
7 466
=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
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:
P a g e | 27

The difference table:


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

2 10 (96 − 10)
= 43
(4 − 2)
(100 − 43)
4 96 = 19
(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

𝑓(𝑥) = 𝑓(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
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:
P a g e | 28

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)
(10 − 7) (27 − 21)
10 900 =1
= 202 (11 − 5)
(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
Question 5:
Find the polynomial from following data by using newton general interpolation formula for
divided difference
𝑥 0 1 2 5
P a g e | 29

𝑓(𝑥) 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 | 30

Central Difference Interpolation


Newton’s difference formulas are fundamental and applicable to almost all cases of
interpolation, but in general they do not converge as rapidly as central difference formula. The
central difference formulas are used for interpolating of the function near the middle of tabulated
set.

Central Difference Interpolation Formulation:


𝑥 𝑦 First Second Third Forth
Difference Difference Difference Difference

𝑥0 − 2ℎ 𝑦−2

𝑥0 − ℎ 𝑦−1 Δ𝑦−2

Δ2 𝑦−2
𝑥0 𝑦0 Δ𝑦−1
Δ3 𝑦−2
Δ2 𝑦−1
P a g e | 31

𝑥0 + ℎ 𝑦1 Δ𝑦0 Δ4 𝑦−2
3
Δ 𝑦−1
Δ2 𝑦0
𝑥0 + 2ℎ 𝑦2 Δ𝑦1

Gauss’s forward interpolation Formula:


From Newton’s General Interpolation Formulae,
𝑦 = 𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0)𝑓(𝑥0, 𝑥1) + (𝑥 − 𝑥0)(𝑥 − 𝑥1)𝑓(𝑥0, 𝑥1, 𝑥2)+ (𝑥 − 𝑥0)(𝑥 − 𝑥1)(𝑥 −
𝑥2)𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3)+ (𝑥 − 𝑥0)(𝑥 − 𝑥1)(𝑥 − 𝑥2)(𝑥 − 𝑥3)𝑓(𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4) + ⋯
…………………… (1)

Let,
𝑥0 = 𝑥0,
𝑥1 = 𝑥0 + h
𝑥2 = 𝑥0 − ℎ
𝑥3 = 𝑥0 + 2ℎ
𝑥4 = 𝑥0 − 2ℎ
𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0) 𝑓(𝑥0, 𝑥0 + ℎ) + (𝑥 − 𝑥0)(𝑥 − 𝑥0 − ℎ) 𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ)+ (𝑥 − 𝑥0)(𝑥 −
𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ) 𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ, 𝑥0 + 2ℎ)+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − 2ℎ)
𝑓(𝑥0, 𝑥0 + ℎ, 𝑥0 − ℎ,𝑥0 + 2ℎ, 𝑥0 − 2ℎ)+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − 2ℎ)(𝑥 − 𝑥0
)+……….(2)
Now, Let 𝑢 = 𝑥−𝑥

0

Then, we have,
𝑓(𝑥) = 𝑓(𝑥0) + ℎ𝑢 𝑓 (𝑥0, 𝑥0 + ℎ) + ℎ 𝑢 (ℎ𝑢 − ℎ) 𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) + ℎ𝑢 (ℎ𝑢 − ℎ) (ℎ𝑢+
ℎ) 𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) + ℎ 𝑢 (ℎ𝑢 − ℎ) (ℎ𝑢 + ℎ) (ℎ𝑢 − 2ℎ) 𝑓 (𝑥0 − 2ℎ, 𝑥0 −
ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) + ℎ 𝑢 (ℎ𝑢 − ℎ) (ℎ𝑢 + ℎ) (ℎ𝑢 − 2ℎ) (ℎ𝑢 + 2ℎ) 𝑓 (𝑥0 − 2ℎ, 𝑥0 −
ℎ, 𝑥0, 𝑥0 + ℎ, 𝑥0 + 2ℎ) (𝑥0 + 3ℎ) + ⋯ ................................... (2)
But the symmetric property of divided difference we have,

∆𝑦0
𝑓 (𝑥0, 𝑥0 + ℎ) = ℎ
P a g e | 32

𝛥2 𝑦−1
𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) = 2! ℎ2
𝛥3 𝑦
𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + h, 𝑥0 +2ℎ) = 3! ℎ−2
3

𝛥4 𝑦−2
𝑓 (𝑥0 −2ℎ, 𝑥0-h, 𝑥0, 𝑥0 +ℎ, 𝑥0 + 2ℎ) = 4! ℎ4
𝛥5 𝑦−2
𝑓 (𝑥0 −2ℎ, 𝑥0-h, 𝑥0, 𝑥0 +ℎ, 𝑥0 + 2ℎ, 𝑥0 +3ℎ) = 5! ℎ5

Substituting these values in (2), We get,

∆𝑦0 𝛥2 𝑦−1 𝛥3 𝑦−2


𝑦 = 𝑓(𝑥) = 𝑦0+ ℎ𝑢 + ℎ2 𝑢(𝑢 − 1) +h3(𝑢 − 1)(𝑢 + 1) + ℎ4 𝑢(𝑢 − 1)(𝑢 +
ℎ 2! ℎ2 3! ℎ3
𝛥4 𝑦−2 𝛥5 𝑦−2
1)(𝑢 − 2) + ℎ5 𝑢(𝑢 − 1)(𝑢 + 1)(𝑢 − 2)(𝑢 + 2) + . . ..
4! ℎ4 5! ℎ5
u(u − 1) u(𝑢2 − 1) u(𝑢2 − 1)(u − 2)
⇒ 𝒚 = 𝒇(𝒙) = 𝑦0 + u∆𝑦0 + ∆2 y-1 + ∆3 𝑦−1 + ∆4 𝑦−2+
2! 3! 4!
u(𝑢2 − 1)(u − 22 )
∆5 𝑦−2+………….
5!
This formula is known as Gauss’s forward interpolation formula for equal
intervals.

Mathematical Problem
Question-1: Find 𝒇 (𝟑𝟎) using Gauss Forward formula.

Solution:
From difference table,

𝒙 𝒚 𝜟𝒚 𝜟𝟐𝒚 𝜟𝟑𝒚 𝜟𝟒𝒚

21 18.4708
-0.6564

25 17.8144 -0.051
-0.7074 -0.0054
P a g e | 33

29 17.107 -0.0564 -0.0022


-0.7638 -0.0076
33 16.3432 -0.064
-0.8278

37 15.5154
Here,
h=25-21=4 and 𝑥 = 30
Taking 𝑥0 = 29,
𝑦0 = 17.107, 𝛥𝑦0 = −0.7638, 𝛥2𝑦−1 = −0.0564, 𝛥3𝑦−1 = −0.0076, 𝛥4𝑦−2 = −0.0022
𝑢 = 𝑥−𝑥

0

30−29
= =.25
4

Gauss forward interpolation formula,


∆𝑥0 𝛥2 𝑦−1 𝛥3 𝑦−2
𝑦 = 𝑓(𝑥) = 𝑦0+ ℎ𝑢 + ℎ2 𝑢 (𝑢 − 1) +h3(𝑢 − 1)(𝑢 + 1) + ℎ4 𝑢(𝑢 − 1)(𝑢 + 1)(𝑢 − 2)
ℎ 2! ℎ2 3! ℎ3
𝛥4 𝑦−2
4! ℎ4

Putting the values in the equation,


= 17.107 − 0.19095 + 0.0052875 + 0.000296875 − 0.0000375977
= 16.92159678

Gauss Backward Interpolation Formula:


We know, Newton’s general interpolation formula is,

𝑦 = 𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0) 𝑓 (𝑥0, 𝑥1) + (𝑥 − 𝑥0) (𝑥 − 𝑥1) 𝑓 (𝑥0, 𝑥1, 𝑥2) + (𝑥 − 𝑥0) (𝑥 − 𝑥1) (𝑥 −
𝑥2) 𝑓 (𝑥0, 𝑥1, 𝑥2, 𝑥3) + (𝑥 − 𝑥0) (𝑥 − 𝑥1) (𝑥 − 𝑥2) (𝑥 − 𝑥3) 𝑓 (𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4)
+…………………… (1)
Substituting,
𝑥0 = 𝑥0, 𝑥1 = 𝑥0 − ℎ, 𝑥2 = 𝑥0 + ℎ, 𝑥3 = 𝑥0 − 2ℎ, 𝑥4 = 𝑥0 + 2ℎ, 𝑥5 = 𝑥0 − 3ℎ,
𝑥6 = 𝑥0 + 3ℎ etc.
𝑓(𝑥) = 𝑓(𝑥0) + (𝑥 − 𝑥0) 𝑓(𝑥0, 𝑥0 − ℎ) + (𝑥 − 𝑥0)(𝑥 − 𝑥0 + ℎ) 𝑓(𝑥0, 𝑥0 − ℎ, 𝑥0 + ℎ)+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 +
ℎ)(𝑥 − 𝑥0 − ℎ) 𝑓(𝑥0, 𝑥0 − ℎ, 𝑥0 + ℎ, 𝑥0 − 2ℎ)+ (𝑥 − 𝑥0)(𝑥 − 𝑥0 + ℎ)(𝑥 − 𝑥0 − ℎ)(𝑥 − 𝑥0 + 2ℎ) 𝑓(𝑥0, 𝑥0
− ℎ, 𝑥0 + ℎ,𝑥0 − 2ℎ, 𝑥0 + 2ℎ)+ ………
Now, Let 𝑢 = 𝑥−𝑥

0
P a g e | 34

i.e. 𝑥−𝑥0=hu
Then, we have,
But we have, from the relation between simple and divided difference,
∆𝑦−1
𝑓 (𝑥0, 𝑥0 - ℎ) = ℎ
𝛥2 𝑦−1
𝑓 (𝑥0 − ℎ, 𝑥0, 𝑥0 + ℎ) = 2! ℎ2
𝛥3 𝑦
𝑓 (𝑥0 − 2ℎ, 𝑥0 -h, 𝑥0, 𝑥0 +ℎ) = 3! ℎ−2
3

𝛥4 𝑦−2
𝑓 (𝑥0 −2ℎ, 𝑥0-h, 𝑥0, 𝑥0 +ℎ, 𝑥0 + 2ℎ) = 4! ℎ4
𝛥5 𝑦−2
𝑓 (𝑥0 −3ℎ, 𝑥0-2h, 𝑥0, 𝑥0 +ℎ, 𝑥0 + 2ℎ) = etc
5! ℎ5
Substituting these values in (2), We get,
∆𝑦−1 𝛥2 𝑦−1 𝛥3 𝑦−2
𝑦 = 𝑓(𝑥) = 𝑦0+ 𝑢 + ℎ2 𝑢(𝑢 + 1) +h3(𝑢 − 1)(𝑢 + 1) + ℎ4 𝑢(𝑢 − 1)(𝑢 +
ℎ 2! ℎ2 3! ℎ3
𝛥4 𝑦−2 𝛥5 𝑦−2
1)(𝑢 − 2) + ℎ5 𝑢(𝑢 − 1)(𝑢 + 1)(𝑢 − 2)(𝑢 + 2) + . . ..
4! ℎ4 5! ℎ5
u(u+ 1) u(𝑢2 − 1) u(𝑢2 − 1)(u − 2)
⇒ 𝒚 = 𝒇(𝒙) = 𝑦0 + u ∆𝑦−1 + ∆2 y-1 + ∆3 𝑦−2+ ∆3 𝑦−2 +
2! 3! 4!
u(𝑢2 − 1)(u − 22 )
+ ∆3 𝑦−3 + +…….
5!
This formula is known as Gauss’s Backward Interpolation formula for equal
intervals.

Mathematical Problem
Question-1: By using Gauss’s backward formula find the population for the year 1936, from the
following table:

Solution :
Take 1931 as the origin and interval = 10,
the population is to be estimated for 1936.
1936−1931
So, 𝑢 = = 0.5
10

The difference table is given below:


𝒙 𝒚𝒖 ∆𝐲𝐮 ∆𝟐𝒚𝒖 ∆𝟑𝒚𝒖 ∆𝟒𝒚𝒖 ∆𝟓𝒚𝒖
P a g e | 35

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’s backward formula is,

u(u+ 1) u(𝑢2 − 1) u(𝑢2 − 1)(u − 2)


⇒ 𝒚 = 𝒇(𝒙) = 𝑦0 + u ∆𝑦−1 + ∆2 y-1 + ∆3 𝑦−2+ ∆3 𝑦−2 +
2! 3! 4!
u(𝑢2 − 1)(u − 22 )
+ ∆3 𝑦−3 + +…….
5!

= 27 + 3.5 + 1.875 − 0.1875 + 0.2734 − 0.1172 = 32.3437 thousand.


So, the estimated population for 1936 is 32.3437 thousand.

Viva Question:
1.What is Newton’s forward Interpolation?
2. What is Newton’s backward Interpolation?
3.Figure out the interpolated point in a graph.
P a g e | 36

Stirling’s interpolation formula:

We have gauss’s forward interpolation formula –

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


𝑦(𝑥) = 𝑦0 + 𝑢𝛥𝑦0 + 𝛥 𝑦−1 + 𝛥 𝑦−1 + 𝛥 𝑦−2 + ⋯
2! 3! 4!
→ (𝟏)

And gauss’s backward interpolation formula –

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


𝑦(𝑥) = 𝑦0 + 𝑢𝛥𝑦−1 + 𝛥 𝑦−1 + 𝛥 𝑦−2 + 𝛥 𝑦−2 + ⋯
2! 3! 4!
→ (𝟐)
𝑥−𝑥0
Where, 𝑢 = ℎ

Adding (1) and (2) we get,

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


2y(x) = 2𝑦0 +𝑢[Δ𝑦0 + Δ𝑦−1 ] + [ + ] Δ 𝑦−1 + [Δ 𝑦−1 + Δ3 𝑦−2 ]
2! 2! 3!
𝑢(𝑢2 − 1)(𝑢 − 2) 𝑢(𝑢2 − 1)(𝑢 + 2) 4
+[ + ] Δ 𝑦−2 + ⋯
4! 4!
2𝑢2 2 𝑢(𝑢2 − 1) 3
⇒ 2𝑦(𝑥) = 2𝑦0 +𝑢[Δ𝑦0 + Δ𝑦−1 ] + Δ 𝑦−1 + [Δ 𝑦−1 + Δ3 𝑦−2 ]
2! 3!
2𝑢2 (𝑢2 − 1) 4
+ Δ 𝑦−2 + ⋯
4!
[Δ𝑦0 + Δ𝑦−1 ] 𝑢2 2 𝑢(𝑢2 − 1) [Δ3 𝑦−1 + Δ3 𝑦−2 ] 𝑢2 (𝑢2 − 1) 4
⇒ y(x) = 𝑦0 +𝑢 + Δ 𝑦−1 + + Δ 𝑦−2
2 2! 3! 2 4!
+⋯

which is the Stirling's interpolation formula.


P a g e | 37

The more general form of Stirling’s formula is

[𝛥𝑦0 + 𝛥𝑦−1 ] 𝑢2 2 𝑢(𝑢2 − 1)[𝛥3 𝑦−1 + 𝛥3 𝑦−2 ] 𝑢2 (𝑢2 − 1) 4


𝑦(𝑥) = 𝑦0 + 𝑢 + 𝛥 𝑦1 + + 𝛥 𝑦−2
2 2! 3! 2 4!
𝑢2 (𝑢2 − 12 )(𝑢2 − 22 ) … … .. (𝑢2 − (𝑘 − 1)2 ) 𝛥2𝑘−1 𝑦−𝑘+1 + 𝛥2𝑘−1 𝑦−𝑘
+ ⋯. +
(2𝑘 − 1)! 2
2( 2 2 2 2 2 2
𝑢 𝑢 − 1 )(𝑢 − 2 ) … … .. (𝑢 − (𝑘 − 1) ) 2𝑘
+ 𝛥 𝑦−𝑘
(2𝑘)!

The difference table is shown as like bellow:

𝒚 𝜟y 𝜟𝟐 𝒚 𝜟𝟑 𝒚 𝜟𝟒 𝒚

𝜟𝒚−𝟏 𝜟𝟑 𝒚−𝟐

𝒚𝟎 𝜟𝟐 𝒚−𝟏 𝜟𝟒 𝒚−𝟐

𝜟𝒚𝟎 𝜟𝟑 𝒚−𝟏

Example: From the following table find 𝑒 0.644 by applying Stirling’s formula
x 0.61 0.62 0.63 0.64 0.65 0.66 0.67
y 1.840431 1.858928 1.87761 1.896481 1.911554 1.943792 1.954237

Solution:

Here, 𝑥 = 0.644 𝑥0 = 0.64 𝑎𝑛𝑑 ℎ = 0.001


P a g e | 38

𝑥 − 𝑥0 0.644 − 0.64
𝑢= = = 0.1
ℎ 0.01

The difference table:


𝒙 𝒚 𝜟y 𝜟𝟐 𝒚 𝜟𝟑 𝒚 𝜟𝟒 𝒚
0.61 1.840431
0.018497

0.62 1.858928 0.000185

0.018682 0.000004

0.63 1.87761 0.000189 -0.000004

0.018871 0. 0.00000

0.64 1.896481 0.000189 0.000002

0.01906 0.00002

0.65 1.911554 0.000191 0.000001

0.01925 0.000003

0.66 1.943792 0.000194

0.019445

0.67 1.954237

The Stirling's interpolation formula:

[𝛥𝑦0 +𝛥𝑦−1 ] 𝑢2 𝑢(𝑢2 −1)[𝛥3 𝑦−1 +𝛥3 𝑦−2 ] 𝑢2 (𝑢2 −1)


𝑦(𝑥) = 𝑦0 + 𝑢 + 𝛥2 𝑦1 + + 𝛥4 𝑦−2
2 2! 3!2 4!

0.4(0.018871 + 0.01906) (0.4)2


𝑦(0.644) = 1.896481 + + (0.000189)
2 2!
0.4(0.42 − 1) 0 + 0.00002 0.42 (0.42 − 1)
+ [ ]+ (0.000002)
3! 2 4!

= 1.896481 + 0.0075862 + 0.00001512 − 0.00000056 −


0.0000000112

= 1.909082253
P a g e | 39

So, the value of 𝑦(0.644) 𝑜𝑟 𝑒 0.644 is 1.909082253 (𝐴𝑛𝑠𝑤𝑒𝑟)

❖ Now Find the error?

The actual value of 𝑒 0.644 = 1.904081995

The value (Stirling’s) of 𝑒 0.644 = 1.904081995

𝐸𝑟𝑟𝑜𝑟 = (1.904081995 − 1.904081995)

= 0.000000525

𝐸𝑟𝑟𝑜𝑟 𝑜𝑓 𝑝𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 = 0.000000525 × 100%

= 2.25 × 10−5 %

Bessel's interpolation formula:

We have gauss's forward interpolation formula -

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


y(x) = 𝑦0 + 𝑢Δ𝑦0 + Δ 𝑦−1 + Δ 𝑦−1 + Δ 𝑦−2 + ⋯
2! 3! 4!
→ (1)

The third formula due to Gauss -

𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3


y(x) = 𝑦1 + (𝑢 − 1)Δ𝑦0 + Δ 𝑦0 + Δ 𝑦−1
2! 3!
𝑢(𝑢2 − 1)(𝑢 − 2) 4
+ Δ 𝑦−1 + ⋯ → (2)
4!
𝑥−𝑥0
Where 𝑢 =

P a g e | 40

Adding (1) and (2) we get,

𝑢(𝑢 − 1) 2
2y(x) = 𝑦0 + 𝑦1 + (2𝑢 − 1)Δy0 + [Δ 𝑦−1 + Δ2 𝑦0 ]
2!
𝑢(𝑢2 − 1) 𝑢(𝑢 − 1)(𝑢 − 2) 3 𝑢(𝑢2 − 1)(𝑢 − 2) 4
+[ + ] Δ 𝑦−1 + [ ] [Δ 𝑦−2
3! 3! 4!
+Δ4 𝑦−1 ] + ⋯
1
𝑦0 + 𝑦1 1 𝑢(𝑢 − 1) [Δ2 𝑦−1 + Δ2 𝑦0 ] 𝑢 (𝑢 − 2) (𝑢 − 1) 3
⇒ y(x) = + (𝑢 − ) Δy0 + + Δ 𝑦−1
2 2 2! 2 3!
𝑢(𝑢2 − 1)(𝑢 − 2) [Δ4 𝑦−2 + Δ4 𝑦−1 ]
+ +⋯
4! 2

which is Bessel's interpolation formula

The another forms of Bessel’s interpolation formula is:

1
𝑢(𝑢 − 1) [𝛥2 𝑦1 + 𝛥2 𝑦0 ] 𝑢 (𝑢 − 2) (𝑢 − 1) 3
𝑦(𝑥) = 𝑦0 + 𝑢∆𝑦0 + + Δ 𝑦−1
2 2! 3!
1 2
𝑢(𝑢2 − 1)(𝑢 − 2) [Δ4 𝑦−2 + Δ4 𝑦−1 ] 𝑢(𝑢 − 2)(𝑢 − 1)(𝑢 − 2) 5
+ + ∆ 𝑦−2 + ⋯
4! 2 5!
Here first two terms transforming to 𝑦0 + 𝑢∆𝑦0 as because ∆𝑦0 = 𝑦1 − 𝑦0

Example: From the following table find 𝑒 0.644 by applying Bessel’s formula

x 0.61 0.62 0.63 0.64 0.65 0.66 0.67


y 1.840431 1.858928 1.87761 1.896481 1.911554 1.943792 1.954237

Solution:

Here, 𝑥 = 0.644 𝑥0 = 0.64 𝑎𝑛𝑑 ℎ = 0.001

𝑥 − 𝑥0 0.644 − 0.64
𝑢= = = 0.1
ℎ 0.01
P a g e | 41

The difference table:


𝒙 𝒚 𝜟y 𝜟𝟐 𝒚 𝜟𝟑 𝒚 𝜟𝟒 𝒚
0.61 1.840431
0.018497

0.62 1.858928 0.000185

0.018682 0.000004

0.63 1.87761 0.000189 -0.000004

0.018871 0. 0.00000

0.64 1.896481 0.000189 0.000002

0.01906 0.00002

0.65 1.911554 0.000191 0.000001

0.01925 0.000003

0.66 1.943792 0.000194

0.019445

0.67 1.954237

1
𝑦0 + 𝑦1 1 𝑢(𝑢 − 1) [Δ2 𝑦−1 + Δ2 𝑦0 ] 𝑢 (𝑢 − 2) (𝑢 − 1) 3
y(x) = + (𝑢 − ) Δy0 + + Δ 𝑦−1
2 2 2! 2 3!
𝑢(𝑢2 − 1)(𝑢 − 2) [Δ4 𝑦−2 + Δ4 𝑦−1 ]
+
4! 2

𝑦(0.644) = 1.906011 − 0.001906 − 0.000228 + 0.0000008 + 0.00000056


= 1.904082336
P a g e | 42

❖ Now Find the error?

The actual value of 𝑒 0.644 = 1.904081995

The value (Bessel’s) of 𝑒 0.644 = 1.904082336

𝐸𝑟𝑟𝑜𝑟 = (1.904081995 − 1.904082336)

= 0.000000341

𝐸𝑟𝑟𝑜𝑟 𝑜𝑓 𝑝𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 = 0.000000341 × 100%

= 3.41 × 10−5 %

NUMERICAL INTEGRATION:

The process of computing the value of a definite integral from a set of numerical values of the
integrand is called Numerical Integral. When applied to the integration of a function of a single
variable, the process is known as Quadrature.
A General Quadrature Formula for Equidistant Ordinates:
𝑏
Let 𝐼 = ∫𝑎 𝑦𝑑𝑥 𝑤ℎ𝑒𝑟𝑒 𝑦 = 𝑓(𝑥) Let 𝑓(𝑥) be given for certain equidistant values of 𝑥 say
𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, … . Let the range (𝑎, 𝑏) be divided into 𝑛 equal parts, each of width h so that
𝑏 − 𝑎 = 𝑛ℎ.
Let 𝑥0 = 𝑎, 𝑥1 = 𝑥0 + ℎ = 𝑎 + ℎ, 𝑥2 = 𝑥0 + 2ℎ = 𝑎 + 2ℎ, … , 𝑥𝑛 = 𝑎 + 𝑛ℎ = 𝑏 . We have
assumed that the 𝑛 + 1 ordinates 𝑦0 , 𝑦1 , … , 𝑦𝑛 are at equal intervals.
𝑏 𝑥 +𝑛ℎ 𝑛
⸫ 𝐼 = ∫𝑎 𝑦𝑑𝑥 = ∫𝑥 0 𝑦𝑥 𝑑𝑥 = ∫0 𝑦𝑥0+𝑢ℎ ℎ𝑑𝑢
0

𝑥+𝑥0
𝑤ℎ𝑒𝑟𝑒 𝑢 = , 𝑑𝑥 = ℎ𝑑𝑢

𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
or 𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 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 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠] … … … … … … . . (1)
2 3 4!

This is the general quadrature formula.


P a g e | 43

The Trapezoidal Rule:

Putting 𝑛 = 1 in the formula (1) i.e.,


𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 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 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting second and higher order differences, we get,


𝑥0 +ℎ 1 ℎ
∫𝑥0 𝑦𝑑𝑥 = ℎ [𝑦0 + 2 ∆𝑦0 ] = 2 [2𝑦0 + (𝑦1 − 𝑦0 )] ( ∵ ∆𝑦0 = 𝑦1 − 𝑦0 )

= 2 [𝑦0 + 𝑦1 ] …………… (2)

Formula (2) gives the area of the one strip bounded by the ordinates 𝑥 = 𝑥0 and 𝑥 = 𝑥0 + ℎ.
Now by using the formula (2), we find that

0 𝑥 +2ℎ ℎ
∫𝑥0+ℎ 𝑦𝑑𝑥 = 2 [𝑦1 + 𝑦2 ]

0 𝑥 +3ℎ ℎ
∫𝑥0+2ℎ 𝑦𝑑𝑥 = 2 [𝑦2 + 𝑦3 ]

…………………………………
𝑥 +𝑛ℎ
0 ℎ
∫𝑥0+(𝑛−1)ℎ 𝑦𝑑𝑥 = 2 [𝑦(𝑛−1) + 𝑦𝑛 ]

Adding these n integrals, we get


𝑏 𝑥 +𝑛ℎ
⸫ 𝐼 = ∫𝑎 𝑦𝑑𝑥 = ∫𝑥 0 𝑦𝑑𝑥
0

𝑥 +ℎ 𝑥 +2ℎ 𝑥 +3ℎ 𝑥 +𝑛ℎ


= ∫𝑥 0 𝑦𝑑𝑥 + ∫𝑥 0+ℎ 𝑦𝑑𝑥 + ∫𝑥 0+2ℎ 𝑦𝑑𝑥 + ⋯ + ∫𝑥 0+(𝑛−1)ℎ 𝑦𝑑𝑥
0 0 0 0

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

= 2 [(𝑦0 + 𝑦𝑛 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−1 )]
1
= ℎ [2 (𝑦0 + 𝑦𝑛 ) + (𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−1 )]
P a g e | 44

= distance between two consecutive ordinates × [(mean of the first and last
ordinates) + (sum of all the intermediate ordinates)].
This rule is known as the Trapezoidal rule.
In trapezoidal rule we find the area of each strip separately and then add.
In other words, we evaluate the integral on each interval (𝑥𝑖 + 𝑥𝑖+1 ) separately.

• Problem Solving using Trapezoidal rule Formula:

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 , where
6
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 | 45

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 ∫4 𝑙𝑛𝑥 𝑑𝑥 = [𝑥(ln 𝑥 − 1)]5.2
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. Hence
12
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
P a g e | 46

𝑥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

By Trapezoidal rule, we get,


1.4 ℎ
∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 = 2 [(𝑦0 + 𝑦12 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 + 𝑦7 + 𝑦8 + 𝑦9 +
𝑦10 + 𝑦11 )]
0.1 0.1
= [7.73368 + 2(36.69481)] = (81.1233)
2 2

= 4.05617
1.4
Now, the actual value of ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 = [−cos 𝑥 − 𝑥(𝑙𝑛𝑥 − 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:
First we divide the range of integration into ten equal parts by taking the interval of differencing
𝜋
−0 𝜋
h=210 = 20 and then we compute the values of the function 𝑓(𝑥) = sin 𝑥 for each point of sub-
division. These computed values are as shown in the following table.
P a g e | 47

𝑥 𝑦 = 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

By Trapezoidal rule, we have,


𝜋

∫0 sin 𝑥 𝑑𝑥 = 2 [(𝑦0 + 𝑦10 ) + 2(𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 + 𝑦6 + 𝑦7 + 𝑦8 + 𝑦9 )]
2

(𝜋⁄20) 𝜋
= [1.00000 + 2(5.85311)] = [12.70622]
2 40

= 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


P a g e | 48

• Simpson’s one third rule:


Putting n=2 in formula (1) i.e.,
𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 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 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting the third and higher order differences, we obtain


𝑥0 +2ℎ 22 23 22 ∆2 𝑦0
∫𝑥0 𝑦𝑑𝑥 = ℎ [2𝑦0 + ∆𝑦0 + ( 3 − ) ]
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,
𝑥 +4ℎ
0 ℎ
∫𝑥0+2ℎ 𝑦𝑑𝑥 = 3 [𝑦2 + 4𝑦3 + 𝑦4 ]
𝑥 +6ℎ
0 ℎ
∫𝑥0+4ℎ 𝑦𝑑𝑥 = 3 [𝑦4 + 4𝑦5 + 𝑦9 ]

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

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 )]
P a g e | 49


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

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.

• Problem Solving using Simpson’s one third Formula:

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

Solution:
1−0 1
Divide the range of integration (0,1) into 6 equal parts each of width = . The values of 𝑓(𝑥)
6 6
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
P a g e | 50

𝑥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 ∫0 = [tan−1 𝑥]01 = tan−1 1 − tan−1 0 = … … … … … … (2)
1+𝑥 2 4

Now from (1) and (2) we get,


𝜋
= 0.7853979 or, 𝜋 = 3.1415916
4

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

Solution:
3−(−3)
Divide the range of integration (-3,3) into six equal parts each of width= = 1. Hence h=1.
6
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
P a g e | 51

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

Question 3:
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= = 0.05. Hence
4
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 | 52

1
0.7 ℎ
∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 = 3 [(𝑦0 + 𝑦4 ) + 4(𝑦1 + 𝑦3 ) + 2𝑦2 ]
0.05
= [0.8443548 + 3.3950564 + 0.8502152]
3

= 0.0848271

• Simpson’s three- eighth rule:

Putting n=3 in formula


𝑛 𝑢(𝑢−1) 𝑢(𝑢−1)(𝑢−2)
𝐼 = ℎ ∫0 [𝑦0 + 𝑢∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯ ] 𝑑𝑢
2! 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 𝑦0
+( 5 − + − 3𝑛2 ) + ⋯ 𝑢𝑝𝑡𝑜 (𝑛 + 1) 𝑡𝑒𝑟𝑚𝑠]
2 3 4!

And neglecting fourth and higher order differences, we obtain


𝑥0 +3ℎ 32 33 32 ∆2 𝑦0 34 ∆3 𝑦0
∫𝑥0 𝑦𝑑𝑥 = ℎ [3𝑦0 + ∆𝑦0 + ( 3 − ) + ( 4 − 33 + 32 ) ]
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

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
𝑥 +6ℎ
0 3ℎ
∫𝑥0+3ℎ 𝑦𝑑𝑥 = [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
8

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

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
P a g e | 53

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 by using Simpson’s ‘8’ rule.
1+𝑥 2

Solution:
6−0
Divide the range of integration (0, 6) into six equal parts each of width= = 1. Hence h=1.
6
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
P a g e | 54

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

6 𝑑𝑥 3ℎ
∫0 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
1+𝑥 2 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= = 1. Hence h=1.
6
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
P a g e | 55

1
By Simpson’s ‘3’ 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 ∫0 𝑑𝑥 by using Simpson’s ‘8’ rule and compare it with the actual value.
1+𝑥

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

1
By Simpson’s ‘3’ rule, we get,
P a g e | 56

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

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

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

• 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.


P a g e | 57

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
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
P a g e | 58

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.
P a g e | 59

4 R(2,1) − R(1,1)
R(2, 2) =
4 −1 42 R(3, 2) − R(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 for n=4.
1+𝑥

Solution:
𝑏−𝑎 1 𝑏−𝑎 1
Here, 𝑎 = 0, 𝑏 = 1, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4,
2 22
𝑏−𝑎 1
ℎ4 = =8
23

Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75

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

𝑅(2,1) = 0.708331
P a g e | 60

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 = [ln (1 + 𝑥)]10 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718
1+𝑥

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:
P a g e | 61

𝑏−𝑎 1 𝑏−𝑎 1
Here, 𝑎 = 1, 𝑏 = 2, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4,
2 22
𝑏−𝑎 1
ℎ4 = =8
23

Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75

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 .


P a g e | 62

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,
2 22
𝑏−𝑎 𝜋
ℎ4 = =
23 8

Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
1
𝑅(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
P a g e | 63

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.

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
P a g e | 64

f (c ) = 0
3. c is the root of the given function if ;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

❖ Slowly Converges to a root.


P a g e | 65

• Problem Solving using Bisection Method Formula:

Question 1:
Determine the root of the given equation,
𝑥2 − 3 = 0 𝑓𝑜𝑟 𝑥 ∈ [1, 2] by Bisection Method.

Solution:
𝐺𝑖𝑣𝑒𝑛: 𝑥2 − 3 = 0
P a g e | 66

𝐿𝑒𝑡 𝑓(𝑥) = 𝑥2 − 3
Now, find the value of f(x) a𝑡 𝑎 = 1 𝑎𝑛𝑑 𝑏 = 2.
𝑓 (1) = 12 − 3 = 1 – 3 = −2 < 0
𝑓 (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.
1+2
𝑖. 𝑒. , 𝑡 =
2
3
𝑡 =
2
𝑡 = 1.5
Therefore, the value of the function at “t” is:
𝑓(𝑡) = 𝑓 (1.5) = (1.5)2 − 3 = 2.25 – 3 = −0.75 < 0
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
a f(a) b f(b) 𝒕 f(t)
Iteration
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 -0.0189

So, at the seventh iteration, we get the final interval [1.7266, 1.7344]
Hence, 1.7344 is the approximated solution.
Question 2:
Find a root of an equation 𝑓(𝑥) = 𝑥 3 − 𝑥 − 1 using Bisection method.

Solution:
Here 𝑥 3 − 𝑥 − 1 = 0

Let 𝑓(𝑥) = 𝑥 3 − 𝑥 − 1

Here
P a g e | 67

x 0 1 2
f(x) -1 -1 5

1𝑠𝑡 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛:

𝐻𝑒𝑟𝑒 𝑓 (1) = −1 < 0 𝑎𝑛𝑑 𝑓 (2) = 5 > 0

∴ Now, Root lies between 1 and 2


1+2
⇒t= =1.5
2

Therefore, the value of the function at “t” is


𝑓(𝑡) = 𝑓 (1.5) = (1.5)3 − 1.5 − 1 = 0.875
f(t) is positive, so b is replaced with t= 1.5 for the next iterations.
The iterations for the given functions are:

No of 𝒂+𝒃
a f(a) b f(b) 𝒇(𝒕) = f(t)
Iteration 2
1 1 -1 2 5 1.5 0.875
2 1 -1 1.5 0.875 1.25 -0.29688
3 1.25 -0.29688 1.5 0.875 1.375 0.22461
4 1.25 -0.29688 1.375 0.22461 1.3125 -0.05151
5 1.3125 -0.05151 1.375 0.22461 1.34375 0.08261
6 1.3125 -0.05151 1.34375 0.08261 1.32812 0.01458
7 1.3125 -0.05151 1.32812 0.01458 1.32031 -0.01871
8 1.32031 -0.01871 1.32812 0.01458 1.32422 -0.00213
9 1.32422 -0.00213 1.32812 0.01458 1.32617 0.00621
10 1.32422 -0.00213 1.32617 0.00621 1.3252 0.00204
11 1.32422 -0.00213 1.3252 0.00204 1.32471 -0.00005

Approximate root of the equation x3-x-1=0 using Bisection method is 1.32471.

Question 3:
Find a root of an equation f(x)=2x3-2x-5 using Bisection method.
P a g e | 68

Solution:
Here, 2x3-2x-5=0

Let f(x)=2x3-2x-5

Here,
x 0 1 2
f(x) -5 -5 7
st
1 iteration:

Here f (1) =-5<0 and f (2) =7>0

∴ Now, Root lies between 1 and 2


1+2
⇒t= =1.5
2

f(t) =f (1.5) =2⋅1.53-2⋅1.5-5=-1.25<0

Therefore, the value of the function at “t” is


𝑓(𝑡) = 𝑓 (1.5) = 2. (1.5)3 − 2.1.5 − 5 = −1.25
f(t) is negative, so b is replaced with t= 1.5 for the next iterations.
The iterations for the given functions are:

𝒂+𝒃
n a f(a) b f(b) t= f(t)
2
1 1 -5 2 7 1.5 -1.25
2 1.5 -1.25 2 7 1.75 2.21875
3 1.5 -1.25 1.75 2.21875 1.625 0.33203
4 1.5 -1.25 1.625 0.33203 1.5625 -0.49561
5 1.5625 -0.49561 1.625 0.33203 1.59375 -0.09113
6 1.59375 -0.09113 1.625 0.33203 1.60938 0.1181
7 1.59375 -0.09113 1.60938 0.1181 1.60156 0.0129
8 1.59375 -0.09113 1.60156 0.0129 1.59766 -0.03926
9 1.59766 -0.03926 1.60156 0.0129 1.59961 -0.01322
10 1.59961 -0.01322 1.60156 0.0129 1.60059 -0.00017

Approximate root of the equation 2x3-2x-5=0 using Bisection method is 1.60059.


P a g e | 69

Question 4:
Find a root of an equation f(x)=x3+2x2+x-1 using Bisection method

Solution:
Here x3+2x2+x-1=0

Let f(x)= x3+2x2+x-1


Here,
x 0 1
f(x) -1 3
st
1 iteration:

Here f(0)=-1<0 and f(1)=3>0

∴ Now, Root lies between 0 and 1


0+1
⇒t = =0.5
2

f(t)=f(0.5)=0.53+2⋅0.52+0.5-1=0.125>0
Therefore, the value of the function at “t” is
f(t) =f (0.125) = (0.125)3-2.0.1252-+0.125-1 = -0.6230
f(t) is negative, so b is replaced with t= 0.5 for the next iterations.
The iterations for the given functions are:

𝑎+𝑏
n a f(a) b f(b) 𝑡= f(t)
2
1 0 -1 1 3 0.5 0.125
2 0 -1 0.5 0.125 0.25 -0.6094
3 0.25 -0.6094 0.5 0.125 0.375 -0.291
4 0.375 -0.291 0.5 0.125 0.4375 -0.0959
5 0.4375 -0.0959 0.5 0.125 0.4688 0.0112
6 0.4375 -0.0959 0.4688 0.0112 0.4531 -0.0432
7 0.4531 -0.0432 0.4688 0.0112 0.4609 -0.0162
8 0.4609 -0.0162 0.4688 0.0112 0.4648 -0.0026
9 0.4648 -0.0026 0.4688 0.0112 0.4668 0.0043
10 0.4648 -0.0026 0.4668 0.0043 0.4658 0.0009
11 0.4648 -0.0026 0.4658 0.0009 0.4653 -0.0008
12 0.4653 -0.0008 0.4658 0.0009 0.4656 0
P a g e | 70

Approximate root of the equation x3+2x2+x-1=0 using Bisection method is 0.4656 (After 12
iterations).

• 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 root
then 𝑥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 | 71

𝑓(𝑥𝑛 )
⇒ 𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )

Which is known as the Newton-Raphson Method formula.

• 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

Question 2:

By using Newton- Raphson method, find the root √12 to five place of decimal.

Solution:
P a g e | 72

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
P a g e | 73

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
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

𝑾𝒆𝒅𝒅𝒍𝒆’𝒔 𝑹𝒖𝒍𝒆:
𝑥0 +𝑛ℎ
3
∫ 𝑓(𝑥)𝑑𝑥 = ℎ{𝑓(0) + 5𝑓(ℎ) + 𝑓(2ℎ) + 6𝑓(3ℎ) + 𝑓(4ℎ) + 5𝑓(5ℎ) + 𝑓(6ℎ)}
𝑥0 10
Example: Find the approximate value of
1
𝑑𝑥

0 1 + 𝑥2

Using Weddle’s theorem

Here h=1/6 and y=1/x^2

x y Weddle factor Product

0 1 1 1
P a g e | 74

1/6 0.973 5 4.865

1/3 0.9 1 0.9

1/2 0.8 6 4.8

2/3 0.6923 1 0.6923

5/6 0.5902 5 2.95

1 0.5 1 0.5

Total=15.70
P a g e | 75

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 root
then 𝑥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 ) + ℎ 1!
+ ℎ2 2!
+ ⋯ = 0.

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 )
…………………………………
…………………………………
𝑓(𝑥𝑛 )
⇒ 𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )
P a g e | 76

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
P a g e | 77

∴ 𝑓 ′ (𝑥) = 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

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:
P a g e | 78

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
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:
P a g e | 79

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.

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.
P a g e | 80

𝑓(𝑥)

[𝑥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
Hence the first approximation to the root 𝑓(𝑥) = 0 is giving by
𝑓(𝑥1 )
𝑥3 = 𝑥1 − (𝑥 − 𝑥1 ) … … … … … … … (2)
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2
P a g e | 81

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 and hence the root lies between 2.059 and 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.

You might also like