Group 05
Group 05
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
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.
|𝑉𝑇 −𝑉𝐴 |
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
𝑥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
𝑥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?
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 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 )
… … … … … … … … … … … … … … … ….
… … … … … … … … … … … … … … … ….
[Proved]
Home Work
Solution:
Proof: From shifting operator we know that,
𝐸 = 1 + ∆ 𝑎𝑛𝑑 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
⇒∆=𝐸−1
So we get,
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
Page |7
= 𝐸 𝑘 𝑓(𝑥) − 𝑘𝐶1 𝐸 𝑘−1 𝑓(𝑥) + 𝑘𝐶2 𝐸 𝑘−2 𝑓(𝑥) − 𝑘𝐶3 𝐸 𝑘−3 𝑓(𝑥) … … + (−1)𝑘 𝑓(𝑥)
= 𝑓(𝑥 + 𝑘ℎ) − 𝑘𝐶1 𝑓{𝑥 + (𝑘 − 1)ℎ} + 𝑘𝐶2 𝑓{𝑥 + (𝑘 − 2)ℎ} … … + (−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]
𝑥 𝑥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;
𝑥1 𝑥2 𝑥3 𝑥𝑛−1 𝑥𝑛
𝑥0 ……….
𝑥0 + ℎ 𝑥1 + ℎ 𝑥2 + ℎ 𝑥𝑛−2 + ℎ 𝑥𝑛−1 + ℎ
𝑦0 𝑦1 𝑦2 𝑦3 ………… 𝑦𝑛−1 𝑦𝑛
𝑦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
∆𝑛 𝑦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
This is known as Newton-Gregory’s formula for forward interpolation with equal intervals.
Solution:
𝑥 𝑓(𝑥) ∆𝑦 ∆2 𝑦 ∆3 𝑦
0 5
1
1 6 -4
-3 18
2 3 14
11
3 14
ℎ = 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
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?
𝑦0 𝑦1 𝑦2 𝑦3 … 𝑦𝑛−1 𝑦𝑛
∇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
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
𝒙 55 60 65 70
𝑓 (𝑥) 46 66 81 93
Solution:
P a g e | 18
ℎ = 𝑥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, . . , 𝑥𝑛) → (𝒊𝒗)
𝑥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
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 )
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?
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 𝑐−𝑏
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)
… … … … … … …
… … … … … … …
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 ,
Rn = ( x − x0 )( x − x1 )...( x − xn ) f ( x, x0 , x1 ,..., xn ).
Assuming that f ( x) is a polynomial of degree n,
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 )
3 3
(12 − 3)
= −9
(2 − 3)
2 12 (−3 + 9)
= −3
(1 − 3)
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
Solution:
P a g e | 27
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
𝑓(𝑥) 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
𝑥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
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
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
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
𝑦 = 𝑓(𝑥) = 𝑓(𝑥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
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
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
𝒚 𝜟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:
𝑥 − 𝑥0 0.644 − 0.64
𝑢= = = 0.1
ℎ 0.01
0.018682 0.000004
0.018871 0. 0.00000
0.01906 0.00002
0.01925 0.000003
0.019445
0.67 1.954237
= 1.909082253
P a g e | 39
= 0.000000525
= 2.25 × 10−5 %
𝑢(𝑢 − 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
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
Solution:
𝑥 − 𝑥0 0.644 − 0.64
𝑢= = = 0.1
ℎ 0.01
P a g e | 41
0.018682 0.000004
0.018871 0. 0.00000
0.01906 0.00002
0.01925 0.000003
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.000000341
= 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!
𝑛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!
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) + 𝑦𝑛 ]
ℎ ℎ ℎ ℎ
= 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.
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
= 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:
= 4.05617
1.4
Now, the actual value of ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒 𝑥 )𝑑𝑥 = [−cos 𝑥 − 𝑥(𝑙𝑛𝑥 − 1) + 𝑒 𝑥 ]1.4
0.2
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
(𝜋⁄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
𝑛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!
2 1
=h [2y0 + 2(𝑦1 − 𝑦0 ) + (3 . 2) (𝑦2 − 2𝑦1 + 𝑦0 )]
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) + 𝑦𝑛 ]
ℎ ℎ
= 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.
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
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
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
𝑛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!
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
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 )]
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
𝑥
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+𝑥
• Romberg Integration:
. . .
. . .
. . .
In generally we get,
1 𝑘−2
Ak = 2 [Ak-1+ℎk-1∑2𝑖=1 𝑓(𝑎 + (2𝑖 − 1) ℎk)]
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
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
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
2 𝑑𝑥
Now, exact value is: ∫1 = [ln (𝑥)]12 = 𝑙𝑛2 − 𝑙𝑛1 = 0.69314718
𝑥
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
𝜋
Here, the exact value is: ∫0 sin 𝑥 𝑑𝑥 = [−cos 𝑥]0𝜋 = 2
• 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
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𝑠𝑡 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛:
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
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:
𝒂+𝒃
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
Question 4:
Find a root of an equation f(x)=x3+2x2+x-1 using Bisection method
Solution:
Here x3+2x2+x-1=0
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).
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 = 𝑥𝑛 −
𝑓 ′ (𝑥𝑛 )
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
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
0 1 1 1
P a g e | 74
1 0.5 1 0.5
Total=15.70
P a g e | 75
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
𝑦 = 𝑓(𝑥)
𝑦
𝑓(𝑥0 )
𝑓(𝑥1 )
𝑓(𝑥2 )
𝑥
𝑥2 𝑥1 𝑥0
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
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:
𝑓 ′ (𝑥) = −4 − 𝑠𝑖𝑛𝑥
f(0)= -4(0)+cos0+2=3 ˃ 0
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.
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.