Group 06
Group 06
Contents
Rounding of Numbers:
If 27.73 is rounded off to three decimal places, the result is 27.7. If 9.20Ω is rounded off to three
decimal places the value 9.21.
Computation of Errors:
Let 𝑉𝑇 = 𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒
𝑉𝐴 = 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑎 𝑛𝑢𝑚𝑏𝑒𝑟
The error is 𝐸 = 𝑉𝑇 − 𝑉𝐴
The absolute error is 𝐸𝐴 = |𝑉𝑇 − 𝑉𝐴 |
𝐸 |𝑉𝑇 −𝑉𝐴 |
The relative error is 𝐸𝑅 = 𝑉𝐴 =
𝑇 𝑉𝑇
The percentage error is 𝐸𝑃 = 𝐸𝑅 × 100%
|𝑉𝑇 − 𝑉𝐴 |
= × 100%
𝑉𝑇
Operators:
The Operator E: This is known usually as shifting or shift operator.
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ) → 𝐼𝑛𝑐𝑟𝑒𝑚𝑒𝑛𝑡 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥
𝑤ℎ𝑒𝑟𝑒 𝑦 = 𝑓(𝑥) 𝑏𝑒 𝑎𝑛𝑦 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑥
Suppose 𝑦 = 𝑓(𝑥) denotes a function which takes the value 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 for the equidistant value
𝑥0 , 𝑥1 , 𝑥2 , … , 𝑥𝑛 respectively of the independent variable of x.
𝑥0 𝑦0
∆𝑦0 = 𝑦1 − 𝑦0
𝑥1 𝑦1 ∆2 𝑦0 = ∆𝑦1 − ∆𝑦0
(𝑥0 + ℎ)
∆𝑦1 = 𝑦2 − 𝑦1 ∆3 𝑦0 = ∆2 𝑦1 − ∆2 𝑦0
𝑥2 𝑦2 ∆2 𝑦1 = ∆𝑦2 − ∆𝑦1
(𝑥0 + 2ℎ)
∆𝑦2 = 𝑦3 − 𝑦2
𝑥3 𝑦3
(𝑥0 + 3ℎ
𝑥0 𝑦0
𝑥1 𝑦1 ∇𝑦1 = 𝑦1 − 𝑦0
(𝑥0 + ℎ)
𝑥0 𝑦0
∇𝑦1 = 𝑦1 − 𝑦0
𝑥1 𝑦1 ∇2 𝑦2 = ∇𝑦2 − ∇𝑦1
(𝑥0 + ℎ)
∇𝑦2 = 𝑦2 − 𝑦1 ∇3 𝑦3 = ∇2 𝑦3 − ∇2 𝑦2
𝑥2 𝑦2 ∇2 𝑦3 = ∇𝑦3 − ∇𝑦2
(𝑥0 + 2ℎ)
∇𝑦3 = 𝑦3 − 𝑦1 Page |6
𝑥3 𝑦3
(𝑥0 + 3ℎ)
Solution:
We know from forward difference,
∆ 𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
And backward difference,
∇ 𝑓(𝑥) = 𝑓(𝑥) − 𝑓(𝑥 − ℎ)
So, ∆. ∇𝑓(𝑥) = ∆[𝑓(𝑥) − 𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − ∆𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − {𝑓(𝑥) − 𝑓(𝑥 − ℎ)
= ∆𝑓(𝑥) − ∇𝑓(𝑥)
Or, (∆. ∇)𝑓(𝑥) = ∆𝑓(𝑥) − ∇𝑓(𝑥)
Or, (∆. ∇)𝑓(𝑥) = (∆ − ∇)𝑓(𝑥)
∴ ∆. ∇= ∆ − ∇
(Proved)
Solution:
We know, Shifting operator
𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
The forward difference: ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
Or, ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
Or, ∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
∴ ∆= 𝐸 − 1
(Proved)
Example: If h is very small then prove that, ∆𝑛+1 𝑓(𝑥0 ) = ℎ𝑛+1 𝑓 𝑛+1 (𝑥0 )
Solution:
From the definition of derivative that,
𝑓(𝑥0 + ℎ) − 𝑓(𝑥0 )
lim = 𝑓 ′ (𝑥0 )
ℎ→0 ℎ
∆𝑓(𝑥0 )
lim = 𝑓 ′ (𝑥0 )
ℎ→0 ℎ
∆𝑓(𝑥0 ) = ℎ𝑓 ′ (𝑥0 )
Home Work:
Solution:
Proof: From shifting operator, we know that,
𝐸 = 1 + ∆ 𝑎𝑛𝑑 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
Or, ∆ = 𝐸 − 1
So, we get
∆𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥) − 𝑓(𝑥)
⇒ ∆𝑓(𝑥) = 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥)
Also, for ∆2 𝑓(𝑥) = ∆{∆𝑓(𝑥)}
= ∆{𝑓(𝑥 + ℎ) − 𝑓(𝑥)}
= ∆𝑓(𝑥 + ℎ) − ∆𝑓(𝑥)
= (𝐸 − 1)𝑓(𝑥 + ℎ) − (𝐸 − 1)𝑓(𝑥)
= 𝐸𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) − 𝐸𝑓(𝑥) + 𝑓(𝑥)
= 𝑓(𝑥 + 2ℎ) − 𝑓(𝑥 + ℎ) − 𝑓(𝑥 + ℎ) + 𝑓(𝑥)
∆2 𝑓(𝑥) = 𝑓(𝑥 + 2ℎ) − 2𝑓(𝑥 + ℎ) + 𝑓(𝑥)
Similarly,
∆3 𝑓(𝑥) = (𝐸 − 1)3 𝑓(𝑥)
= (𝐸 3 − 3𝐸 2 + 3𝐸 − 1)𝑓(𝑥)
= 𝐸 𝑓(𝑥) − 3𝐸 2 𝑓(𝑥) + 3𝐸𝑓(𝑥) − 𝑓(𝑥)
3
𝑖=0
(Proved)
Page |8
st
Question-2: Show that the 1 difference polynomial of degree n is a polynomial of degree (n-1).
Solution:
Let us consider a polynomial of degree ‘n’,
𝑦 = 𝑓(𝑥) = 𝑎𝑥 𝑛 + 𝑏𝑥 𝑛−1 + ⋯ … + 𝑘𝑥 + 𝑙 … … … . (1)
Again let,
∆𝑥 = ℎ i.e., 𝑥0 + ℎ = 𝑥0 + ∆𝑥0 = 𝑥1
Now,
𝑦 + ∆𝑦 = 𝑓(𝑥 + ∆𝑥)
= 𝑎(𝑥 + ℎ)𝑛 + 𝑏(𝑥 + ℎ)𝑛−1 + ⋯ … + 𝑘(𝑥 + ℎ) + 𝑙 … … (2)
Subtracting (1) from (2) we get,
∆𝑦 = 𝑦 + ∆𝑦 − 𝑦
= 𝑎[(𝑥 + ℎ) − 𝑥 + 𝑏[(𝑥 + ℎ)𝑛−1 − 𝑥 𝑛−1 ] + ⋯ … + 𝑘(𝑥 + ℎ − 𝑥) + 𝑙 − 𝑙
𝑛 𝑛]
Question-3: Show that, the 𝑛𝑡ℎ difference of polynomial of degree n is a constant and
(𝑛 + 1)𝑡ℎ difference is zero.
Solution:
let a polynomial of 𝑛𝑡ℎ degree,
𝑓(𝑥) = 𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + ⋯ + 𝑘𝑥 𝑛 Where 𝑘 ≠ 0
We know, ∆𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
∴ ∆𝑓(𝑥) = [𝑎 + 𝑏(𝑥 + ℎ) + 𝑐(𝑥 + ℎ)2 + ⋯ + 𝑘(𝑥 + ℎ)𝑛 ] − [𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + ⋯ + 𝑘𝑥 𝑛 ]
= 𝑏ℎ + 𝑐[(𝑥 + ℎ)2 − 𝑥 2 ] + ⋯ + 𝑘[(𝑥 + ℎ)𝑛 − 𝑥 𝑛 ]
= 𝑏ℎ + 𝑐[𝑥 + 2𝑥ℎ + ℎ2 − 𝑥 2 ] + ⋯ + 𝑘[𝑥 𝑛 + 𝑛𝐶 1 𝑥 𝑛−1 ℎ + 𝑛𝐶 2 𝑥 𝑛−2 ℎ2 + ⋯ ) − 𝑥 𝑛 ]
2
So, the 𝑛𝑡ℎ difference of polynomial of degree n is a constant and (𝑛 + 1)𝑡ℎ difference is zero.
(Showed)
Solution:
We have (𝐸∇)𝑓(𝑥) = 𝐸{∇𝑓(𝑥)}
= 𝐸{𝑓(𝑥) − 𝑓(𝑥 − ℎ)}
= 𝐸𝑓(𝑥) − 𝐸𝑓(𝑥 − ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥) … … … … (1)
Also,
(∇𝐸)𝑓(𝑥) = ∇{𝐸𝑓(𝑥)}
= ∇𝑓(𝑥 + ℎ)
= 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ∆𝑓(𝑥)… … … … (2)
From (1) and (2), We have
𝐸∇≡ ∆ 𝑎𝑛𝑑 ∇𝐸 ≡ ∆
Thus 𝐸∇≡ ∇𝐸 ≡ ∆
(Proved)
Solution:
(i) 𝐸 ≡ 𝑒 𝜆𝐷 ≡ 1 + ∆, where D is the differential operator of differential calculus.
We have 𝐸𝑓(𝑥) = 𝑓(𝑥 + ℎ)
ℎ2 ′′
= 𝑓(𝑥) + ℎ𝑓 ′ (𝑥) + 𝑓 (𝑥) + ⋯
2!
ℎ2 2
= 1. 𝑓(𝑥) + ℎ𝐷𝑓(𝑥) + 𝐷 𝑓(𝑥) + ⋯
2!
ℎ2 𝐷 2
= {1 + ℎ𝐷 + + ⋯ } 𝑓(𝑥)
2!
= 𝑒 𝜆𝐷 𝑓(𝑥)
𝜆𝐷
Thus 𝐸𝑓(𝑥) = 𝑒 𝑓(𝑥), for any function 𝑓(𝑥).
∴ 𝐸 = 𝑒 𝜆𝐷
(𝑃𝑟𝑜𝑣𝑒𝑑)
(ii) Again, we have 𝑒 𝜆𝐷 ≡ 1 + ∆
⇒ ℎ𝐷 ≡ log(1 + ∆)
∆2 ∆3 ∆4
≡ (∆ − + − + ⋯ )
2 3 4
1 ∆2 ∆3 ∆4
Or 𝐷 = ℎ (∆ − 2 + 3 − 4 + ⋯ )
Viva Questions
Ans: To estimate integrals when analytical solutions are complex or impossible, using methods like
trapezoidal or Simpson’s rule.
P a g e | 11
Similarly we can calculate third and higher order differences from the table. Here we have
taken forward differences therefore this table is known as forward difference table.
P a g e | 12
Similarly we can calculate third and higher order differences from the table. Here we have
taken backward differences therefore this table is known as backward difference table.
Theory:
Let the function y f(x) who takes the values y0 , y1 , , yn corresponding to the values x0,
x1, , xn of x.
X: 𝑥0 𝑥1 𝑥2, … , xn
Y: 𝑦0 𝑦1 𝑦2, … , 𝑦𝑛
Let these values of x are in equidistance, such that xi x0 ih (i 0,1,). Assuming y(x) to
be a polynomial of the nth degree in x such that y(x0) =y0, y(x1)=y1, ... , y(xn)=yn. Then we can
write,
P a g e | 13
(𝑥) =a0 +a1(x-x0) +a2(x-x0) (x-x1) +a3(x-x0) (x-x1) (x-x2) +…+an(x-x0) (x-
x1)…(x-xn-1)................................... (1)
Putting x=x0, x1, …,xn successively in (1), we get that
𝑦0=a0, y1=a0+a1(x1-x0), y2=a0+a1(x2-x0) + a2(x2-x0) (x2-x1) ........ and so on.
1 3
Similarly a3 = ∆ y0 and so on.
3!h3
1 3
∆ y0(x-x0)(x-x1)(x-x2)+............................... (2)
3!h3
Question 1:
A second degree polynomial passes through (0,1), (1,3), (2,7), (3,13). Find the polynomial.
Solution:
The difference table:
x f (x) f (x) 2 f (x) 3 f (x)
0 1
2
1 3 2
4 0
2 7 2
6
3 13
=1+2x+x2-x
= x2+x+1
This is the required polynomial.
Question 2:
The following table is given:
x 0 1 2 3 4
f(x) 3 6 11 18 27
P a g e | 15
=x2+2x+3
This is the required polynomial.
Question 3:
The population of a country in the decennial census were as under. Estimate the population
for the year 1925.
Years: 1891 1901 1911 1921 1931
Population: 46 66 81 93 101
Solution:
1925 1891
Here, u 3.4
10
P a g e | 16
Then to n 1 observations, we can fit a polynomial of nth degree. Let the polynomial be
f (x) A0 A1 (x a nh) A2 (x a nh)(x a (n 1)h) ... An (x a nh)(x a n 1h)...(x a h)
Where A0 , A1, A2 ,..., An are determined in such a way that f (x) gives the observed values for
P a g e | 17
f (a nh) A0
f (a n 1h) A0 A1(h)
Similarly,
2 f (a nh)
A2
2h2
……………..
n f (a nh)
An
hn.n!
𝛻𝑛𝑦
𝑌(𝑥) = 𝑦𝑛 + 𝛻𝑦𝑛 (𝑥 − 𝑥𝑛 ) + 𝛻 2 𝑦𝑛 (𝑥 − 𝑥𝑛 )(𝑥 − 𝑥𝑛−1 ) + ⋯ … … … … … . 𝑛!ℎ𝑛𝑛 𝛻 𝑛 𝑦𝑛 (𝑥 − 𝑥𝑛 )(𝑥 −
𝑥𝑛−1 ) … … . (𝑥 − 𝑥1 ) … … … … . … (2)
𝑥−𝑥𝑛
Now, let =𝑢
ℎ
𝑜𝑟, 𝑥 = 𝑥𝑛 + 𝑢ℎ
𝛻𝑦 𝛻2 𝑦 𝛻3 𝑦
𝑓(𝑥) = 𝑦𝑛 + 1!𝑛 𝑢 + 2! 𝑛 𝑢(𝑢 − 1) + 3! 𝑛 𝑢(𝑢 − 1)(𝑢 − 2) … … … … … … … ..This is called the
Newton’s backward interpolation formula or Newton-Gregory formula for backward difference.
P a g e | 18
Question 1:
A second degree polynomial passes through (0,1), (1,3), (2,7), (3,13). Find the polynomial.
Solution:
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!
𝑥(𝑥 − 1) 2
𝑓(𝑥) = 𝑓(0) + 𝑥∆𝑓(0) + ∆ 𝑓(0)
2!
=1+2x+x2-x
= x2+x+1
Question 2:
X 0 1 2 3 4
F(x) 3 6 11 18 27
What is the form of the function? P a g e | 19
Solution:
1 6 2
5 0
2 11 2
7 0
3 18 2
9
4 27
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!
𝑥(𝑥 − 1) 2
𝑓(𝑥) = 𝑓(0) + 𝑥∆𝑓(0) + ∆ 𝑓(0)
2!
=x2+2x+3
Question 3:
The population of a country in the decennial census were as under. Estimate the population for the year 1925.
Years: 1891 1901 1911 1921 1931
Population: 46 66 81 93 101
Solution: P a g e | 20
1925−1891
Here, u = 10
= 3.4
The difference table:
1891 46
20
1901 66 -5
15 2
1911 81 -3 -3
12 -1
1921 93 -4
8
1931 101
𝑓(𝑎 + 𝑛ℎ − 𝑢ℎ)
𝑢(𝑢 − 1) 2 𝑢(𝑢 − 1)(𝑢 − 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∆𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 − 1)(𝑢 − 2)(𝑢 − 3) 4
+ ∆ 𝑓(𝑎 + 𝑛ℎ)
4!
Now suppose we are given (n+1) values for the function f(x) and independent variable x is at equal intervals
i.e.,
x = a,a+h ,a+2h,...,a+nh
Then to ̅̅̅̅̅̅̅
𝑛 + 1 observations, we can fit a polynomial of n th degree. Let the polynomial be
𝑓(𝑥) = 𝐴0 + 𝐴1 (𝑥 − ̅̅̅̅̅̅̅̅̅ 𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ) + 𝐴2 (𝑥 − ̅̅̅̅̅̅̅̅̅ 𝑎 + (𝑛 − 1)ℎ) + ⋯
+ 𝐴𝑛 (𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ)(𝑥 − ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛 − 𝑙ℎ) … (𝑥 − 𝑎ℎ ̅̅̅̅)
P a g e | 21
Where 𝐴0 , 𝐴1 , 𝐴2 , … 𝐴𝑛 are determined in such way that f(x) gives the observed values for
𝑥 = 𝑎 + 𝑛ℎ, 𝑎 + ̅̅̅̅̅̅̅̅̅
𝑛 − 𝑙ℎ, … 𝑎𝑛𝑑 𝑎
𝑓(𝑎 + 𝑛ℎ) = 𝐴0
𝑓(𝑎 + ̅̅̅̅̅̅̅̅̅
𝑛 − 𝑙ℎ) = 𝐴0 + 𝐴1 (−ℎ)
∇2 𝑓(𝑎 + 𝑛ℎ)
𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦, 𝐴2 =
2ℎ2
…………………………………
∇𝑛 𝑓(𝑎 + 𝑛ℎ)
𝐴𝑛 =
𝑛! ℎ𝑛
̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
𝑢(𝑢 + 1)(𝑢 + 2)(𝑢 + 3) 4 𝑢(𝑢 + 1) … (𝑢 + 𝑛 − 1) 𝑛
+ ∇ 𝑓(𝑎 + 𝑛ℎ) + ⋯ + ∇ 𝑓(𝑎 + 𝑛ℎ)
4! 𝑛!
Question 1: Given
x 1 2 3 4 5 6 7 8
Estimate f(7.5)
Solution: P a g e | 22
The value to be interpolated lies at the end of the given observations i.e. near 8. So in this case Newton’s
Here,
𝑥 − ̅̅̅̅̅̅̅̅̅
𝑎 + 𝑛ℎ 7.5 − 8
𝑢= = = −0.5
ℎ 1
1 1
7
2 8 12
19 6
3 27 18
37 6
4 64 24
61 6
5 125 30
91 6
6 216 36
127 6
7 343 42
169
8 512
̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
Question 2: Given
sin60=0.8660
Solution:
Here, we have
x: 45 50 55 60
45 .7071
.0589
50 .7660 -.0057
.0532 -.0007
55 .8192 -.0064
.0468
60 .8660
52−45
Here,𝑢 = 5
= 1.4
̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
= .7786512 𝑎𝑝𝑝𝑟𝑜𝑥
P a g e | 24
Question 3:
Using Newton’s formula for interpolation, estimate the population for the year 1905:
Year Population
1891 98, 752
1901 132,285
1911 168,076
1921 195,690
246,050
1931
Solution:
1891 98752
33533
1901 132285 2258
35791 -10435
1911 168076 -8177 41358
27614 30923
1921 195690 22746
50360
1931 246050
1905−1891
Here,𝑢 = 10
= 1.4
̅̅̅̅̅̅̅̅̅̅̅̅
𝑓(𝑎 − ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2 𝑢(𝑢 + 1)(𝑢 + 2) 3
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∆ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2! 3!
Divided Differences:
A divided difference is defined to be the difference between two successive values of the entry divided by
the difference between the corresponding value of the arguments e.g given the following values of the
P a g e | 25
function y = f (x)
x a b c d e
F(x) f(a) f(b) f(c) f(d) f(e)
𝑓(𝑏)−𝑓(𝑎)
the first divided difference at x(a)= is 𝑏−𝑎
𝑓(𝑐)−𝑓(𝑏)
the first divided difference at x(b)= is
𝑐−𝑏
Let f (x0), f(x1),... f(xn) be the values of f(x) corresponding to the arguments x0, x1,...xn, not necessarily equally
spaced. From the definition of divided differences
𝑓(𝑥) − 𝑓(𝑥0 )
𝑓(𝑥, 𝑥0 ) =
𝑥 − 𝑥0
𝑓(𝑥, 𝑥0 ) − 𝑓(𝑥0 , 𝑥1 )
𝐴𝑙𝑠𝑜 𝑓(𝑥, 𝑥0 , 𝑥1 ) =
𝑥 − 𝑥1
………………………………………………………………………………..
Multiplying the equation (2) by (𝑥 − 𝑥0 ) ,(3) by (𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) and so on and finally the equation (4)
Viva Question:
Answer:
𝑓(𝑎 − ̅̅̅̅̅̅̅̅̅̅̅̅
ℎ(𝑢 + 𝑛))
𝑢(𝑢 + 1) 2
= 𝑓(𝑎 + 𝑛ℎ) + 𝑢∇𝐹(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
2!
𝑢(𝑢 + 1)(𝑢 + 2) 3 𝑢(𝑢 + 1)(𝑢 + 2)(𝑢 + 3) 4
+ ∇ 𝑓(𝑎 + 𝑛ℎ) + ∇ 𝑓(𝑎 + 𝑛ℎ)
3! 4!
𝑢(𝑢 + 1) … (𝑢 + 𝑛 − 1) 𝑛
+⋯+ ∇ 𝑓(𝑎 + 𝑛ℎ)
𝑛!
Question 1:
Find the polynomial from the given values using Newton’s divided difference formula:
X 3 2 1 -1
F(x) 3 12 15 -21
Solution:
The difference table:
x f(x) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
3 3
(12 − 3)
= −9
(2 − 3)
2 12 (−3 + 9)
= −3
(1 − 3)
Question 2:
Find the polynomial using Newton’s divided difference formula from the following table
x 0 2 3 4 7 9
F(x) 4 26 58 112 466 922
Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥) ∆ 4𝑓(𝑥)
0 4
(26 − 4)
= 11
(2 − 0)
2 26 (32 − 11)
(3 − 0)
(58 − 26) =7 (11 − 7)
= 32
(2 − 3) (4 − 0)
=1 0
3 58 (54 − 32)
(4 − 2)
(112 − 58) = 11 (16 − 11)
= 54
(4 − 3) (7 − 2)
4 112 (1 − 1)
=1
(118 − 54) (9 − 3)
(7 − 3) =0
(466 − 112) = 16
= 118 (22 − 16)
(7 − 4)
7 466 (9 − 4)
=1
Question 3:
Find the polynomial from following data by using newton general interpolation formula for
divided difference and hence find y at x=3,x=9
x 2 4 5 6 8 10
f(x) 10 96 196 350 868 1746
Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥) ∆3𝑓(𝑥)
2 10 (96 − 10)
= 43
(4 − 2)
(100 − 43)
= 19
4 96 (5 − 2)
(26 − 4) (27 − 19)
= 100 =2
(5 − 4) (6 − 2)
5 196 (154 − 100) 0
(6 − 4)
350 − 196 = 27 (35 − 27)
=2
(6 − 5) (8 − 4)
6 350
= 154
(259 − 154) 0
(8 − 5) (45 − 35)
=2
(868 − 350) = 35 (10 − 5)
8 868 (8 − 6)
= 259
(439 − 259)
(10 − 6)
(1746 − 868) = 45
(10 − 8)
10 1746 = 439
Question 4:
Find the polynomial from following data by using newton general interpolation formula for
divided difference and find f(8),f(15).
𝑥 4 5 7 10 11 13
𝑓(𝑥) 48 100 294 900 1210 2028
Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥) ∆ 4𝑓(𝑥)
4 48
(100 − 48)
= 52
(5 − 4)
5 100 (97 − 52)
= 15
(7 − 4)
(294 − 100) (21 − 15)
= 97 =1
(10 − 5) (10 − 4)
7 294 (202 − 47)
= 21 0
(10 − 5)
(900 − 294)
(27 − 21)
(10 − 7) =1
10 900 (11 − 5)
= 202
(310 − 202)
= 27 0
(11 − 7)
(1210 − 900)
11 1210 (33 − 27)
(11 − 10) =1
= 310 (13 − 10)
(404 − 310)
= 33
(13 − 10)
Question 5:
Find the polynomial from following data by using newton general interpolation formula for
divided difference
𝑥 0 1 2 5
𝑓(𝑥) 2 3 12 147
Solution:
The difference table :
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆ 2𝑓(𝑥) ∆ 3𝑓(𝑥)
0 2
(3 − 2)
(1 − 0)
1 3 =1 (9 − 1)
=4
(2 − 0)
(12 − 3) (9 − 4)
=1
(2 − 1) (5 − 0)
2 12 =9 (45 − 9)
=9
(5 − 1)
(147 − 12)
5 147
(5 − 2)
= 45
Let, (𝑥) denotes a polynomial of the n-th degree which takes the values 𝑦0 , 𝑦1 , 𝑦2 , … . 𝑦𝑛
We know that the (n+1)th differences of this polynomial are zero and hence we have
𝑓(𝑥0 , 𝑥1 , 𝑥2 , … . , 𝑥𝑛 ) = 0 … … … … … … … … (1)
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
𝑦= 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) … . (𝑥0 − 𝑥𝑛 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … . (𝑥1 − 𝑥𝑛 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 )
+ 𝑦
(𝑥2 − 𝑥0 )(𝑥1 − 𝑥2 ) … . (𝑥2 − 𝑥𝑛 ) 2
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 )
+ ⋯….+ 𝑦 … … . (2)
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥1 ) … . (𝑥𝑛 − 𝑥𝑛−1 ) 𝑛
This is also the Lagrange’s formula of interpolation for unequal interval. Now,by interchanging x
and y in (2) we have: 𝑥
(𝑦 − 𝑦1 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 ) (𝑦 − 𝑦0 )(𝑦 − 𝑦𝑛 ) … (𝑦 − 𝑦𝑛 )
𝑥= 𝑥0 + 𝑥
(𝑦0 − 𝑦1 )(𝑦0 − 𝑦2 ) … . (𝑦0 − 𝑦𝑛 ) (𝑦1 − 𝑦0 )(𝑦1 − 𝑦2 ) … . (𝑦1 − 𝑦𝑛 ) 1
(𝑦 − 𝑦0 )(𝑦 − 𝑦2 ) … (𝑦 − 𝑦𝑛 )
+ 𝑥
(𝑦2 − 𝑦0 )(𝑦1 − 𝑦2 ) … . (𝑦2 − 𝑦𝑛 ) 2
(𝑦 − 𝑦0 )(𝑦 − 𝑦1 ) … (𝑦 − 𝑦𝑛−1 )
+ ⋯….+ 𝑥 … … . (2)
(𝑦𝑛 − 𝑦0 )(𝑦𝑛 − 𝑦1 ) … . (𝑦𝑛 − 𝑦𝑛−1 ) 𝑛
Question 1:
Solution:
Question 2:
The following values of the function (𝑥) for values of x are given:
(1) = 4, (2) = 5, 𝑓(7) = 5, 𝑓(8) = 4.
Solution:
4 5 5
⇒ 𝑦 = − 42 (6 − 2)(6 − 7)(6 − 8) + 30 (6 − 1)(6 − 7)(6 − 8) − 30 (6 − 1)(6 − 2)(6 − 8) +
4
(6 − 1)(6 − 2)(6 − 7)
42
4 5 5 4
⇒ 𝑦 = − 42 × 8 + 30 × 10 − 30 × (−40) + 42 × (−20)
16 5 20 40
⇒ 𝑦 = − 21 + 3 + − 21
3
17 P a g e | 34
∴𝑦= ≈ 5.66
3
Question 3:
For the following table find the form of the function (𝑥).
𝒙 𝟎 𝟏 𝟐 𝟓
𝒇(𝒙) 2 3 12 147
Solution:
Here, 𝑥0 = 0, 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 5
𝑓(𝑥) 1 3 2 49
⇒ 𝑥(𝑥−1)(𝑥−2)(𝑥−5) = − 5𝑥 + 4(𝑥−1) − 𝑥−2 + 20(𝑥−5)
Question 4:
Using interpolation estimate the output of a factory in 1986 from the following data:
Year 1974 1978 1982 1990
Output in 1000
25 60 80 170
tones
Solution:
The divided difference is a recursive method used to calculate coefficients for polynomial
interpolation,particularly Newton’s form of the interpolating polynomial.
Divided difference is a way of generalizing finite differences to handle unequal spacing between
data points.It’s allow us to contruct interpolation polynomials in a straightforward way,even when
the x-value are not values are not equally spaced.
Divided difference are used in constructing Newton’s interpolating polynomial,which has the
form:
Where each term involves a divide difference and the product of terms (𝑥 − 𝑥𝑖 ) for all previous
points.
Lagrange interpolation is a method for constructing a polynomial that passes through a given set
of points. It is commonly used in numerical analysis to estimate unknown values within a certain
range of known data points.
………………………………..
y= y0+(x- x0) f (x0 , x0+h) +(x- x0) (x- x0-h) f (x0 , x0+h, x0-h) +(x- x0) (x- x0-h) (x- x0+h) f (x0 , x0+h, x0 –
h,x0 +2h)+………..(1)
Let ,u=(𝑥 − 𝑥0)/h
Or, x-x0=hu
y= y0+hu f (x0 , x0+h) +hu (hu-h) f (x0 , x0+h, x0-h) + hu (hu-h) (hu+h) f (x0 , x0+h, x0 –h,x0
+2h)+………..(2)
Similarly ,
f(x0 , x0+h) =(y1-y0)/(x1-x0)= Δ y0 /((x0+h)-x0)= Δ y0/1! h= f(x0+h, x0)
Again,
P a g e | 37
f(x0 , x0+h,x0-h)= f(x0-h , x0,x0+h)=1/(2h)[ (y1-y0)/(x1-x0)- (y0-y1)/(x0-x1)] [since x0-h= x-1 ,x0+h= x1 ]
=1/(2h)[( Δy0/h)-( Δy-1/h)]
=1/(2h2)[ Δy0- Δy-1]
= Δ2y-1/2h2
= Δ2y-1/2! h2
Similarly,
f(x0-h , x0, x0+h,x0+2h)= Δ3y-1/3! h3
f(x0-2h ,x0-h, x0, x0+h,x0+2h)= Δ4y-2/4! h4 and so on
From (2) ,We have :
y= y0+hu Δ y0/1! h +hu (hu-h) Δ2y-1/2! h2
+ hu (hu-h) (hu+h) Δ3y-1/3! h3 +……..
y=f(x)= y0+u Δ y0/1! +u (u-1) Δ2y-1/2!
+ u (u-1) (u+1) Δ3y-1/3! +u(u2-1)(u-2) Δ4y-2/4! +…….
This is known as the Gauss’s Forward Interpolation Formula for Equal Interval.
Example:
Use Gauss’s Forward Formula to evaluate y30, given that y21=18.4708, y25=17.8144, y29=17.1070,
y33=16.3432 and y37=15.5154
Solution:
Taking x0=29, h=4, we require the value of y for x=30 , i.e. for u=(x-x0)/h=(30-29)/4=0.25
Similarly ,
f(x0-h , x0) = Δ y-1/1! h
Again,
Similarly,
f(x0-2h , x0-h, x0,x0+h)= Δ3y-1/3! h3
f(x0-2h ,x0-h, x0, x0+h,x0+2h)= Δ4y-2/4! h4 and so on
From (2) ,We have :
y= y0+hu Δ y0/1! h +hu (hu-h) Δ2y-1/2! h2
+ hu (hu-h) (hu+h) Δ3y-1/3! h3 +……..
y=f(x)= y0+u Δ y-1/1! +u (u+1) Δ2y-1/2!
+ u (u-1) (u+1) Δ3y-2/3! +u(u2-1)(u+2) Δ4y-2/4! +…….
This is known as the Gauss’s Backward Interpolation Formula for Equal Interval.
Example 1:
Using Gauss’s Backward Difference formula , find y(8) from the following table:
x 0 5 10 15 20 25
y 7 11 14 18 24 32
SOLUTION:
Taking x0=10 , h=5 , we have to find y for x=8 , i.e. for u=(x-x0)/h=(8-10)/5= -0.4
Question 2:
Interpolate by means of Gauss’s backward formula the population for the year 1936, given
the following table:
Year 1901 1911 1921 1931 1941 1951
Population 12 15 20 27 39 52
Solution:
Taking 1931 as the origin and 10 years as the unit, then the population is to be estimated for
1936 1931
u =.5
10
x yu yu 2 y 3 y 4 y 5 y
u u u u
1901 12
3
1911 15 2
5 0
1921 20 2 3
7 3 -10
1931 27 5 -7
12 -4
1941 39 1
13
1951 52
Taking 1970 as the origin and 10 years as the unit, then the population is to be estimated for
1976−1970
u= = 0.6
10
The difference table is given below:
x f(x) ∆y ∆ 2y ∆ 3y ∆ 4y ∆ 5y
1940 17
1950 20 4
7 -6
1960 27 -2 7
5 1 -9
1970 32 -1 -2
4 -1
1980 36 -2
1990 38
𝑢(𝑢+1) 2 𝑢(𝑢+1)(𝑢−1) 3
Now Gauss Backward Formula is: 𝑦𝑢 = 𝑦0 + 𝑢∆𝑦−1 +
2
∆ 𝑦−1 + 3!
∆ 𝑦−2 +
𝑢(𝑢+1)(𝑢−1)(𝑢+2) 4 𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2) 5
4!
∆ 𝑦−2 + 5!
∆ 𝑦−3 + ⋯
y=32+3-0.48-0.064+0.0832-0.104832
y=34.43437 approx.
P a g e | 41
What is the difference between the forward difference Δ and backward difference ∇?
Answer: Forward difference Δ is calculated as: Δyi=yi+1−yi
While backward difference ∇ is calculated as: ∇yi=yi−yi−1
What would you do if the point to be interpolated lies near the middle of the data set?
Answer: We might consider using central interpolation methods like Gauss Central Interpolation, which
balances between forward and backward.
What type of data is suitable for Gauss forward and backward interpolation?
Answer: Gauss Forward and Backward formula methods are suited for equidistant data points.
We know that the Gauss’s forward interpolation formula for equal interval:
𝑢(𝑢−1) 𝑢(𝑢+1)(𝑢−1) 3 𝑢(𝑢+1)(𝑢−1)(𝑢−2) 4
: 𝑦𝑢 = 𝑦0 + 𝑢∆𝑦0 + 2 ∆2 𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2 +
3! 4!
𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2)
∆5 𝑦−2 + ⋯
5!
We also know that the Gauss’s forward interpolation formula for equal interval:
𝑢(𝑢+1) 𝑢(𝑢+1)(𝑢−1) 3 𝑢(𝑢+1)(𝑢−1)(𝑢+2) 4
𝑦𝑢 = 𝑦0 + 𝑢∆𝑦−1 + 2 ∆2 𝑦−1 + ∆ 𝑦−2 + ∆ 𝑦−2 +
3! 4!
𝑢(𝑢+1)(𝑢−1)(𝑢+2)(𝑢−2)
∆5 𝑦−3 + ⋯
5!
Taking the mean of Gauss’s forward formula and Gauss’s backward formula, we get
𝑢(∆𝑦0 + ∆𝑦−1 ) 𝑢2 2 𝑢(𝑢2 − 1) (∆3 𝑦−1 + ∆3 𝑦−2 ) 𝑢2 (𝑢2 − 1) 4
𝑦 = 𝑦0 + + ∆ 𝑦−1 + + ∆ 𝑦−2
2 2! 3! 2 4!
2 (𝑢 2 2 2) 5 5
𝑢 − 1)(𝑢 − 2 (∆ 𝑦−3 + ∆ 𝑦−4 )
+ +⋯
5! 2
This is known as the Stirling’s formula.
𝒚 ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚 ∆𝟒 𝒚 ….
∆𝑦−1 ∆3 𝑦−2 ….
𝑦0 ∆2 𝑦−1 ∆4 𝑦−2 ….
∆𝑦0 ∆3 𝑦−1 ….
Solution:
Taking x=30 as the origin and h=5 as the unit, the value of y required will be for
28− 30
𝑢 = 5 = −0.4
x y ∆y ∆ 2y ∆ 3y ∆ 4y
20 49225
-909
25 48316 -171
-1080 -59
30 47236 -230 -21
-1310 -80
35 45926 -310
-1620
40 44306
P a g e | 43
Putting the values in Stirling’s formula, we get
=47692 approx.
Solution:
35−30
Taking x=30 as the origin and h=10 as the unit, the value of y requied will be for u = =0.5
10
The difference table is given below:
X y y ∆²y ∆³y
20 512
-73
30 439 -20
-93 10
40 346 -10
-103
50 243
Question 3:
Apply Stirling’s formula to find the value of F(1.34) from the following table
Solution:
1.34−1
Here, u = = .60
.5
The difference table is given below: P a g e | 44
=409.80 approx.
Question 4:
Find f(x) at x=7 from following data
X 2 4 6 8 10
F(x) 5 49 181 449 901
Solution:
The difference table is given below:
x y ∆y ∆ 2y ∆ 3y ∆ 4y
2 5
44
5 49 88
132 48
6 181 136 0
268 48
8 449 184
452
10 901
7−6
Here u = 2 = 0.5.
Stirling Formula:
u(∆y0 + ∆y−1 ) u2 2 u(u2 − 1) (∆3 y−1 + ∆3 y−2 )
y = y0 + + ∆ y−1 + +⋯
2 2! 2
3! 2
132+168 136 ((0.5 )−1) 48+48 0
y7 = 181+0.5 2 + (0.52 ) 2! + 0.5 + 0.5((0.52 ) − 1) 41
2 3!
=295 approx.
Question 5: P a g e | 45
Solution:
The Central difference table for the given table is:
x y ∆y ∆ 2y ∆3y ∆ 4y
0 14
10
4 24 -2
8 -3
8 32 -5 10
3 7
12 35 2
16 40
(9−8)
Here , u = = 0.25
4
u(∆y0 + ∆y−1 ) u2 2 u(u2 − 1) (∆3 y−1 + ∆3 y−2 )
y = y0 + + ∆ y−1 + +⋯
2 2! 3! 2
(.25)² 2
.25(.25) −1 2 2
(.25) (.25) −1)
Y9 = 32 + (.25)(5.5) + 2 (-5) + (2) + (10)
3! 4!
= =33.116 approx.
• Bessel's Interpolation :
Solution:
x−x 6.36−6.3
Here u = h 0 = .1 = 0.6
The difference table
u X y ∆y ∆ 2y ∆ 3y ∆4y
-2 6.1 226.981
11.347
-1 6.2 238.328 0.372
11.719 0.006
0 6.3 250.047 0.372 0
12.097 0.006
1 6.4 262.144 0.384
12.481
2 6.5 274.625
By Bessel’s formula,
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
1
𝑦 = (250.047 + 262.141) + (0.6 − 0.5)(12.097) +
2
0.6(0.6 − 1)1 1 (0.6 − 0.5)(0.6)(0.6 − 1)
( ) (0.378 + 0.384) + (0.006)
2 2 6
=257.259
P a g e | 47
Question 2:
Apply Bessel’s formula to obtain 𝑦32 from the following data
f(25)=0.2707,f(35)=0.3388,f(30)=0.3027,f(40)=0.3794
Solution:
The difference table is given below:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
25 0.2707
0.032
30 0.3027 0.0041
0.004
0.0361
35 0.3388 0.0045
0.0406
40 0.3794
𝑥−𝑥0
Here 𝑝 = =32−30=0.4
ℎ 5
By Bessel’s formula
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
1 (0.4−0)(0.4−1) 1
(𝑃) = (0.3027 + 0.3388) + (0.4 − 0.5)(0.0361) + ( )(0.0041 +
2 2 2
(0.4−0)(0.4−1)(0.4+1)(0.4−2) (0.4−0.5)(0.4−0)(0.4−1)
0.0045) + (0) + (0.0004)
24 24
Question 3:
Apply Bessel’s formula to obtain y25 from the following data f(20)=24, f(28)=35, f(24)=32,
f(32)=40
P a g e | 48
Solution:
The difference table is given below:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
20 24
8
24 32 -5
7
3
28 35 2
32 40
𝑥−𝑥0
Here 𝑝 = =25−24=0.25
ℎ 4
Question 4:
Apply Bessel’s formula to obtain y9
24 , y8 = 32, 𝑦12 = 35 , 𝑦16 = 40
Solution:
The difference table is given below:
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
=33.5-0.75+0.140625+0.0546875+0.085449218
=33.03076
Question 5:
Apply Bessel’s formula to obtain given the following data are given that,
f(20)=2854, f(28)=3544 , f(24)=3162, f(32)=3992
Solution:
The difference table:
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
20 2854
308
24 3162 74
-8
382
28 3544 66
448
32 3992
𝑥−𝑥0
Here 𝑝 = =25−24=0.25
h 4
1
y0 + y1 1 u(u − 1) (∆2 y−1 + ∆2 y0 ) u(u − 1) (u − 2) 3
y= + (u − ) Δy0 + + ∆ y−1
2 2 2! 2 3!
2 1
u(u2 − 1)(u − 2) (∆4 y−2 + ∆4 y−1 ) u(u − 1)(u − 2) (u − 2) 5
+ + ∆ y−2 + ⋯
4! 2 5!
4
f(x)
a b x
Question 1:
5.2
Calculate the value of the integral ∫4 𝑙𝑛𝑥 𝑑𝑥 by Trapezoidal rule and also find the error
with comparing the actual integral value.
Solution:
5.2−4
Divided the range of the integration (4, 5.2) equal parts each of width, ℎ = = 0.2 ,
6
where f(x)= ln(x)=y. The values of ln(x) for each point of sub-division are given below:
𝑥 𝑦 = 𝑙𝑛𝑥
𝑥𝑜 = 4.0 𝑦𝑜 = 1.3862944
𝑥1 = 𝑥𝑜 + ℎ = 4.0 + 0.2 = 4.2 𝑦1 = 1.4350845
𝑥2 = 𝑥𝑜 + 2ℎ = 4.4 𝑦2 = 1.4816045
𝑥3 = 𝑥𝑜 + 3ℎ = 4.6 𝑦3 = 1.5260563
𝑥4 = 𝑥𝑜 + 4ℎ = 4.8 𝑦4 = 1.5686159
𝑥5 = 𝑥𝑜 + 5ℎ = 5.0 𝑦5 = 1.6094379
𝑥6 = 𝑥𝑜 + 6ℎ = 5.2 𝑦6 = 1.6486586
P a g e | 51
0.2
= [3.034953 + 2 × 7.6207991]
2
= 0.1 × 18.276551
= 1.8276551
5.2
Actual value of ∫ 𝑙𝑛𝑥 𝑑𝑥 = [(ln 𝑥 − 1)]5.2
4 4
= 3.3730249 − 1.5451774
= 1.8278475
Hence the error is: 1.8278475 − 1.8276551 = 0.0001924
Question 2:
1.4
Evaluate the value of the integral ∫0.2 (sin 𝑥 − 𝑙𝑛𝑥 + 𝑒𝑥)𝑑𝑥 by Trapezoidal rule. After
finding the true value of the integral, calculate the error.
Solution:
1.4−0.2
Divide the range of integration (0.2, 1.4) into 12 equal parts each of width = = 0.1.
12
Hence h=0.1. the values of the function at each point of sub-division are given below:
. (s 𝑥
− +
4 in 𝑙𝑛
By Trapezoidal rule, 𝑥we get, 1 ∫ℎ 𝑥
1.4
∫.2 (𝑠𝑖𝑛𝑥 − 𝐼𝑛𝑥 + 𝑒 𝑥 ) = 4.05617
Question 3:
𝜋
Calculate an approximate value of ∫02 sin 𝑥 𝑑𝑥 by the Trapezoidal rule using 11 ordinates.
Solution:
𝜋
−0
2
First we divide the range of integration into ten equal parts by taking the interval of differencing h= 10 =
𝜋
and then we compute the values of the function 𝑓(𝑥) = sin 𝑥 for each point of sub-division. These
20
computed values are as shown in the following table.
𝑥 𝑦 = sin 𝑥
𝑥0 = 0 𝑦0 = 0.00000
𝜋 𝑦1 = 0.15643
𝑥1 = 𝑥0 + ℎ =
20
2𝜋 𝑦2 = 0.30902
𝑥2 = 𝑥0 + 2ℎ =
20
3𝜋 𝑦3 = 0.45399
𝑥3 = 𝑥0 + 3ℎ =
20
4𝜋 𝑦4 = 0.58778
𝑥4 = 𝑥0 + 4ℎ =
20
5𝜋 𝑦5 = 0.70711
𝑥5 = 𝑥0 + 5ℎ =
20
6𝜋 𝑦6 = 0.80902
𝑥6 = 𝑥0 + 6ℎ =
20
7𝜋 𝑦7 = 0.89101
𝑥7 = 𝑥0 + 7ℎ =
20
8𝜋 𝑦8 = 0.95106
𝑥8 = 𝑥0 + 8ℎ =
20
9𝜋 𝑦9 = 0.98769
𝑥9 = 𝑥0 + 9ℎ =
20
10𝜋 𝑦10 = 1.00000
𝑥10 = 𝑥0 + 10ℎ =
20
P a g e | 53
Clearly (3) determines the area of two strips, bounded by the ordinates at
𝑥0 , 𝑥0 + ℎ 𝑎𝑛𝑑 𝑥0 + 2ℎ , at a time. Now by using (3), if n is a multiple of 2 i.e.
n is an even positive integer, we obtain,
𝑥0 +4ℎ ℎ
∫𝑥 +2ℎ 𝑦𝑑𝑥 = [𝑦2 + 4𝑦3 + 𝑦4 ]
3
0
𝑥0 +6ℎ ℎ
∫𝑥 +4ℎ 𝑦𝑑𝑥 = 3 [𝑦4 + 4𝑦5 + 𝑦9 ]
0
………………………………………
𝑥0 +𝑛ℎ ℎ
∫𝑥 +(𝑛−2)ℎ 𝑦𝑑𝑥 = 3 [𝑦(𝑛−2) + 4𝑦(𝑛−1) + 𝑦𝑛 ]
0
Solution:
1−0 1
Divide the range of integration (0,1) into 6 equal parts each of width 6 = 6. The values of 𝑓(𝑥) at
each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥𝑜 = 0 1
𝑦𝑜 = = 1.0000000
1
1 1 36
𝑥1 = 𝑥𝑜 + ℎ = 0 + = 𝑦1 = = 0.9729729
6 6 37
2 36
𝑥2 = 𝑥𝑜 + 2ℎ = 𝑦2 = = 0.9000000
6 40
3 36
𝑥3 = 𝑥𝑜 + 3ℎ = 𝑦3 = = 0.8000000
6 45
4 36
𝑥4 = 𝑥𝑜 + 4ℎ = 𝑦4 = = 0.6923076
6 52
5 36
𝑥5 = 𝑥𝑜 + 5ℎ = 𝑦5 = = 0.5901639
6 61
𝑥6 = 𝑥𝑜 + 6ℎ = 1 1
𝑦6 = = 0.5000000
2
1
By Simpson’s ‘3’ rule, we get,
1 𝑑𝑥 ℎ
∫0 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦6 ) + 2(𝑦2 + 𝑦4 )]
1+𝑥 2
1
= 18 [1.5000000 + 4(2.3631369) + 2(1.5923077)]
1
= 18 (14.137163) = 0.7853979 … … … … … … (1)
1 𝑑𝑥 𝜋
But = [tan−1 𝑥]01 = tan−1 1 − tan−1 0 =
∫0 1+𝑥 2 4
… … … … … … (2)
Now from (1) and (2) we get,
𝜋
= 0.7853979 or, 𝜋 = 3.1415916
4
Question 2:
1
0.7 1
Evaluate ∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 approximately by using Simpson’s ‘3’ rule.
Solution:
0.7−0.5
Divide the range of integration (0.5, 0.7) into 4 equal parts each of width= 4 = 0.05. Hence
h=0.05. The values of the function for each point of sub-division are given below:
1
𝑥
𝑦 = 𝑥 2 𝑒 −𝑥
𝑥0 = 0.50 𝑦0 = 0.4288818
𝑥1 = 𝑥0 + ℎ = 0.55 𝑦1 = 0.4278774
𝑥2 = 𝑥0 + 2ℎ = 0.60 𝑦2 = 0.4251076
𝑥3 = 𝑥0 + 3ℎ = 0.65 𝑦3 = 0.4208867
𝑥4 = 𝑥0 + 4ℎ = 0.70 𝑦4 = 0.4154730
1
By Simpson’s ‘3’ rule, we get,
P a g e | 55
0.7 1 ℎ
∫0.5 𝑥 2 𝑒 −𝑥 𝑑𝑥 = 3 [(𝑦0 + 𝑦4 ) + 4(𝑦1 + 𝑦3 ) + 2𝑦2 ]
0.05
= [0.8443548 + 3.3950564 + 0.8502152]
3
= 0.0848271
Question 3:
1 3
Calculate by Simpson’s ‘3’ rule, an approximation value of ∫−3 𝑥 4 𝑑𝑥 by taking seven equidistant
ordinates. Compare it with the exact value.
Solution:
3−(−3)
Divide the range of integration (-3,3) into six equal parts each of width= 6 = 1. Hence h=1. The
values of the function for each point of sub-division are given below:
𝑥 𝑦 = 𝑥4
𝑥0 = −3 𝑦0 = 81
𝑥1 = 𝑥0 + ℎ = −2 𝑦1 = 16
𝑥2 = 𝑥0 + 2ℎ = −1 𝑦2 = 1
𝑥3 = 𝑥0 + 3ℎ = 0 𝑦3 = 0
𝑥4 = 𝑥0 + 4ℎ = 1 𝑦4 = 1
𝑥5 = 𝑥0 + 5ℎ = 2 𝑦5 = 16
𝑥6 = 𝑥0 + 6ℎ = 3 𝑦6 = 81
1
By Simpson’s ‘3’ rule, we get,
3 ℎ
∫−3 𝑥 4 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
1
= 3 [162 + 4 × 32 + 2 × 2]
1
= 3 × 294 = 98
3
3 𝑥5 1 1
Now the exact value is: ∫−3 𝑥 4 𝑑𝑥 = [ 5 ] = 5 [(3)5 − (−3)5 ] = 5 × 486 = 97.2
−3
Hence the error is: 97.2 − 98 = −0.8
𝑥0 +6ℎ 3ℎ
∫𝑥 +3ℎ 𝑦𝑑𝑥 = 8 [𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ]
0
………………………………………………………
𝑥0 +𝑛ℎ 3ℎ
∫𝑥 +(𝑛−3)ℎ 𝑦𝑑𝑥 = [𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ]
8
0
Question 1:
6 𝑑𝑥 3
Evaluate ∫0 1+𝑥 2 by using Simpson’s ‘8’ rule.
Solution:
6−0
Divide the range of integration (0, 6) into six equal parts each of width= 6 = 1. Hence h=1. The
values of the function for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥0 = 0 1
𝑦0 = = 1.0000000
1
𝑥1 = 𝑥0 + ℎ = 1 1
𝑦1 = = 0.5000000
2
𝑥2 = 𝑥0 + 2ℎ = 2 1
𝑦2 = = 0.2000000
5
𝑥3 = 𝑥0 + 3ℎ = 3 1
𝑦3 = = 0.1000000
10
𝑥4 = 𝑥0 + 4ℎ = 4 1
𝑦4 = = 0.0588235
17
𝑥5 = 𝑥𝑜 + 5ℎ = 5 1
𝑦5 = = 0.0384615
26
𝑥6 = 𝑥𝑜 + 6ℎ = 6 1
𝑦6 = = 0.0270270
37
3
By Simpson’s ‘8’ rule, we get,
P a g e | 57
6 𝑑𝑥 3ℎ
∫0 1+𝑥 2 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
8
3
= 8 [1.0270270 + 2.391855 + 0.200000
3
= 8 × 3.618882 = 1.3570808
Question 2:
3 7 𝑑𝑥
Use Simpson’s ‘8’ rule to find the value of ∫1 𝑥 approximately and compare it with the actual value.
Solution:
7−1
Divide the range of integration (1, 7) into six equal parts each of width= 6 = 1. Hence h=1. The
values of y for each point of sub-division are given below:
1
𝑥 𝑦 = 1+𝑥 2
𝑥0 = 1 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 2 1
𝑦1 =
2
𝑥2 = 𝑥0 + 2ℎ = 3 1
𝑦2 =
3
𝑥3 = 𝑥0 + 3ℎ = 4 1
𝑦3 =
4
𝑥4 = 𝑥0 + 4ℎ = 5 1
𝑦4 =
5
𝑥5 = 𝑥𝑜 + 5ℎ = 6 1
𝑦5 =
6
𝑥6 = 𝑥𝑜 + 6ℎ = 7 1
𝑦6 =
7
3
By Simpson’s ‘8’ rule, we get,
7 𝑑𝑥 3ℎ
∫1 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2𝑦3 ]
𝑥 8
3
= 8 [1.1429 + (3 × 1.2) + (2 × 0.25)]
3
= 8 × 5.2429 = 1.9661
7 𝑑𝑥
Now the actual value is: ∫1 = [𝑙𝑛𝑥]17 = ln 7 − ln 1 = 1.9459
𝑥
Question 3:
3 1 3
Evaluate ∫ 𝑑𝑥 by using Simpson’s ‘ ’ rule and compare it with the actual value.
0 1+𝑥 8
P a g e | 58
Solution:
3−0
Divide the range of integration (0, 3) into six equal parts each of width= = 0.5. Hence
6
h=0.5. The values of y for each point of sub-division are given below:
𝑥 1
𝑦= 1+𝑥
𝑥0 = 0 𝑦0 = 1
𝑥1 = 𝑥0 + ℎ = 0.5 𝑦1 = 0.6667
𝑥2 = 𝑥0 + 2ℎ = 1 𝑦2 = 0.5
𝑥3 = 𝑥0 + 3ℎ = 1.5 𝑦3 = 0.4
𝑥4 = 𝑥0 + 4ℎ = 2 𝑦4 = 0.3333
𝑥5 = 𝑥𝑜 + 5ℎ = 2.5 𝑦5 = 0.2857
𝑥6 = 𝑥𝑜 + 6ℎ = 3 𝑦6 = 0.25
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
Ans: The Simpson's One-Third Rule is a numerical method for approximating the definite integral of
a function. It is particularly useful when the function is difficult to integrate analytically.
Ans:Simpson's One-Third Rule is necessary in numerical analysis for several reasons.Those are
Analytical Complexity, Efficiency, Accuracy, Flexibility, Foundation for Higher Methods.
Ans: Simpson's Three-Eighths Rule is another numerical method for approximating definite integrals,
similar to Simpson's One-Third Rule but generally more accurate for certain types of functions.
Ans: Simpson's Three-Eighths Rule is necessary in numerical analysis for several important
reasons.Those are Complex Integrands, Increased Accuracy, Flexibility in Application, Foundation
for More Advanced Techniques, Error Management.
Romberg Integration:
Romberg Integration is an extrapolation of two results of the trapezoid method applied to a regular
partition cut into subintervals of sizes that are consecutive powers of 2.
In generally we get,
1 𝑘−2
Ak = 2 [Ak-1+ℎk-1∑2𝑖=1 𝑓(𝑎 + (2𝑖 − 1) ℎk)]
For each 𝑘 = 2,3,4 … …
A1
4 A2 A1
B1 =
3
16 B2 B1
A2 C1 =
15
4 A3 A2 P a g e | 60
B2 =
3
16 B3 B2
A3 C2 =
15
4 A4 A3
B3 =
3
A4
. . .
. . .
. . .
The values for Romberg’s Method of integration con be arranged in a triangular matrix.
1 2 3 4 5 6
1 A1
2 A2 B1
3 A3 B2 C1
4 A4 B3 C2 D1
5 A5 B4 C3 D2 E1
6 A6 B5 C4 D3 E2 F1
The best possible estimate in each row is the right most entry: A1, B1 ,C1 ,D1 ,E1 ,F1.
Since we will run out of letters after 6 rows we express this with R(i,j).
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)
The best possible estimate in each row is the right most entry: R(i,i) .
The R(i,j) can be obtained in the following way:
R(i,1) is always the trapezoid method applied with a partition size of 2i .
1 2 3 4 5 6
1 R(1,1)
2 R(2,1) R(2,2)
3 R(3,1) R(3,2) R(3,3)
4 R(4,1) R(4,2) R(4,3) R(4,4)
5 R(5,1) R(5,2) R(5,3) R(5,4) R(5,5)
6 R(6,1) R(6,2) R(6,3) R(6,4) R(6,5) R(6,6)
4𝑗−1 𝑅(𝑖,𝑗−1)−𝑅(𝑖−1,𝑗−1)
R(i,j) = ; i,j= 2,3,4….
4𝑗−1 −1
For the rest of them a triangular pattern exist as how one fill in the other entries.
4 R(2,1) R(1,1) P a g e | 61
R(2, 2)
4 1 4 R(3, 2) R(2, 2)
2
R(3,3)
4 R(3,1) R(2,1) 42 1 43 R(4,3) R(3,3)
R(3, 2) R(4, 4)
4 1 42 R(4,1) R(3, 2) 43 1
R(4,3)
4 R(4,1) R(3,1) 42 1 43 R(5,3) R(4,3)
R(4, 2) R(5, 4) .......
4 1 42 R(5, 2) R(4, 2) 43 1
R(5,3)
4 R(5,1) R(4,1) 42 1 43 R(6,3) R(5,3)
R(5, 2) R(6, 4) .......
4 1 42 R(6, 2) R(3, 2) 43 1
4 R(6,1) R(5,1) R(6,3)
R(6, 2) 42 1
4 1
Question 1:
1 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫0 1+𝑥 for n=4.
Solution:
𝑏−𝑎 1 𝑏−𝑎 1 𝑏−𝑎
Here, 𝑎 = 0, 𝑏 = 1, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = = 2, ℎ3 = = 4, ℎ4 = =
2 22 23
1
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = 4 = 0.75
1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝑅(2,1) = 0.708331
1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 0.697024
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 0.694122
4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444; 𝑅(3,3) = = 0.693176
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.693255; 𝑅(4,3) = = 0.693148
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.693155; 𝑅(4,4) = = 0.693148
4−1 43 −1
𝑅(1,1) = 0.75
𝑅(2,1) = 0.708331 𝑅(2,2) = 0.69444
𝑅(3,1) = 0.697024 𝑅(3,2) = 0.693255 𝑅(3,3) = 0.693176
𝑅(4,1) = 0.694122 𝑅(4,2) = 0.693155 𝑅(4,3) = 0.693148 𝑅(4,4) = 0.693148
Question 2:
2 𝑑𝑥
Apply Romberg Extrapolation to get the best possible estimate for: ∫1 𝑥 for n=4.
Solution:
𝑏−𝑎 1 𝑏−𝑎 1 𝑏−𝑎
Here, 𝑎 = 1, 𝑏 = 2, ℎ1 = (𝑏 − 𝑎) = 1, ℎ2 = 2 = 2, ℎ3 = 22 = 4, ℎ4 = =
23
1
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
3
𝑅(1,1) = = 0.75
4
1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝑅(2,1) = 0.70833333
1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 0.69702381
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 0.69412185
4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 0.69444444; 𝑅(3,3) = = 0.69317461
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 0.69325397; 𝑅(4,3) = = 0.6931479
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 0.69315453; 𝑅(4,4) = = 0.69314748
4−1 43 −1
𝑅(1,1) = 0.75
𝑅(2,1) = 0.70833333 𝑅(2,2) = 0.69444444
𝑅(3,1) = 0.69702381 𝑅(3,2) = 0.69325397 𝑅(3,3) = 0.69317461
𝑅(4,1) = 0.69412185 𝑅(4,2) = 0.69315453 𝑅(4,3) = 0.6931479 𝑅(4,4) = 0.69314748
Question 3:
𝜋
Use Romberg Extrapolation to get the best possible estimate for: ∫0 𝑓(𝑥)𝑑𝑥 where 𝑓(𝑥) = sin 𝑥, for n =
4.
Solution:
𝑏−𝑎 𝜋 𝑏−𝑎 𝜋 𝑏−𝑎
Here, 𝑎 = 0, 𝑏 = 𝜋, ℎ1 = (𝑏 − 𝑎) = 𝜋, ℎ2 = = 2, ℎ3 = = 4, ℎ4 = =
2 22 23
𝜋
8
Now,
1
𝑅(1,1) = 2 (𝑏 − 𝑎)(𝑓(𝑎) + 𝑓(𝑏))
1 P a g e | 63
𝑅(1,1) = 2 × 𝜋 × (sin 0 + sin 𝜋) = 0
1
𝑅(2,1) = 2 [𝑅(1,1) + ℎ1 𝑓(𝑎 + ℎ2 )]
𝜋
𝑅(2,1) = = 1.5708
2
1
𝑅(3,1) = 2 [𝑅(2,1) + ℎ2 {𝑓(𝑎 + ℎ3 ) + 𝑓(𝑎 + 3ℎ3 )}]
𝑅(3,1) = 1.8961
1
𝑅(4,1) = 2 [𝑅(3,1) + ℎ3 {𝑓(𝑎 + ℎ4 ) + 𝑓(𝑎 + 3ℎ4 ) + 𝑓(𝑎 + 5ℎ4 ) + 𝑓(𝑎 + 7ℎ4 )}]
𝑅(4,1) = 1.9742
4𝑅(2,1)−𝑅(1,1) 42 𝑅(3,2)−𝑅(2,2)
𝑅(2,2) = = 2.0944; 𝑅(3,3) = = 1.9986
4−1 42 −1
4𝑅(3,1)−𝑅(2,1) 42 𝑅(4,2)−𝑅(3,2)
𝑅(3,2) = = 2.0046; 𝑅(4,3) = = 2.0000
4−1 42 −1
4𝑅(4,1)−𝑅(3,1) 43 𝑅(4,3)−𝑅(3,3)
𝑅(4,2) = = 2.0003; 𝑅(4,4) = = 2.0000
4−1 43 −1
𝑅(1,1) = 0
𝑅(2,1) = 1.5708 𝑅(2,2) = 2.0944
𝑅(3,1) = 1.8961 𝑅(3,2) = 2.0046 𝑅(3,3) = 1.9986
𝑅(4,1) = 1.9742 𝑅(4,2) = 2.0003 𝑅(4,3) = 2.0000 𝑅(4,4) = 2.0000
𝜋
Here, the exact value is: ∫0 sin 𝑥 𝑑𝑥 = [−cos 𝑥]0𝜋 = 2
Question-1: Find the root of the following polynomial function using the Bisection method:
𝑥 3 − 4𝑥 − 9.
Solution:
Let, (𝒙) = 𝒙𝟑 − 𝟒𝒙 − 𝟗
(𝟐) = 𝟖 − 𝟖 − 𝟗 = −𝟗
(𝟑) = 𝟐𝟕 − 𝟏𝟐 − 𝟗 = 𝟔
First iteration:
𝟐+𝟑
𝒙𝟏 = = 𝟐. 𝟓
𝟐
Second iteration:
𝟐. 𝟓 + 𝟑
𝒙𝟐 = = 𝟐. 𝟕𝟓
𝟐
Now. (𝒙𝟐 ) = 𝟐. 𝟕𝟓𝟑 − 𝟒(𝟐. 𝟕𝟓) − 𝟗 = 𝟎. 𝟕𝟗𝟔𝟗
Then (𝒙𝟐 ). (𝟐. 𝟓) < 𝟎
So, the root lies in [2.5, 2.75]
P a g e | 65
Iterations 𝑎 𝑏 𝒙𝒏 𝒇(𝒂) 𝒇(𝒃) 𝒇(𝒙𝒏)
1 2 3 2.5 −9 6 −3.375
2 2.5 3 2.75 −3.375 6 0.7969
3 2.5 2.75 2.625 −3.375 0.7969 −1.4121
4 2.625 2.75 2.6875 −1.4121 0.7969 −0.3391
5 2.6875 2.75 2.71875 −0.3391 0.7969 0.2209
6 2.6875 2.71875 2.703125 −0.3391 0.2209 −0.0615
7 2.703125 2.71875 2.7109 0.2209 −0.0615 0.0787
8 2.703125 2.7109 2.707 −0.0615 0.0787 0.00849
Here, (𝑥) = 𝑥 2 − 5
(2) = 4 − 5 = −1
(3) = 9 − 5 = 4
So the root lies in [2,3]
First iteration
𝟐+𝟑
𝒙𝟏 = = 𝟐. 𝟓
𝟐
Now, 𝑥1 ) = 2.52 − 5 = 1.25
Then, ((𝑥1 ) 2) < 0
So, the root lies [2,2.5]
1 2 3 2.5 −1 4 1.25
Viva Question:
1. Question: What is the main application of the Basel problem in finance?
Answer: It helps in modeling risk and return using series convergence.
5. Question: What type of function does the Trapezoidal Rule work best for?
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
5. Pick that interval [a, c] or [c, b] and repeat 2,3 and 4 procedure until stop
criteria satisfied, i.e f (c) 0 .
c (a b) / 2
P a g e | 68
Solution:
Given: x2-3 = 0
Let f(x) = x2-3
Now, find the value of f(x) at a= 1 and b=2.
f (1) = 12-3 = 1 – 3 = -2 < 0
f (2) = 22-3 = 4 – 3 = 1 > 0
The given function is continuous, and the root lies in the interval [1, 2].
Let “t” be the midpoint of the interval.
I.e., t = (1+2)/2
t =3 / 2
t = 1.5
Therefore, the value of the function at “t” is
1 1 -2 2 1 1.5 -0.75
2 1.5 -0.75 2 1 1.75 0.062
3 1.5 -0.75 1.75 0.0625 1.625 -0.359
4 1.625 -0.3594 1.75 0.0625 1.6875 -0.1523
5 1.685 -0.01523 1.75 0.0625 1.7188 -0.0457
6 1.7188 -0.0457 1.75 0.0625 1.7344 0.0081
7 1.7188 -0.0457 1.7344 0.0081 1.7266 -o.0189
So, at the seventh iteration, we get the final interval [1.7266, 1.7344]
Hence, 1.7344 is the approximated solution.
Now, if h is the sufficiently small, we may neglected the terms containing 2nd and higher power of h and
get simple relation,
𝑓 ′ (𝑥0 )
𝑓(𝑥0 ) + ℎ =0
1!
𝑓(𝑥 )
⇒ ℎ = − 𝑓′ (𝑥0 )
0
here 𝑓 ′ (𝑥0 ) ≠ 0.
Putting the value of h in (1) we get that
𝑥 = 𝑥0 + ℎ
𝑓(𝑥0 )
⇒ 𝑥 = 𝑥0 − ′
𝑓 (𝑥0 )
Successive approximation are given by 𝑥0 , 𝑥1 , 𝑥2 , … … 𝑥𝑛+1
Similarly,
𝑓(𝑥0 )
⇒ 𝑥1 = 𝑥0 − ′
𝑓 (𝑥0 )
𝑓(𝑥0 )
⇒ 𝑥2 = 𝑥1 − ′
𝑓 (𝑥0 )
…………………………………
…………………………………
P a g e | 70
𝑓(𝑥𝑛 )
⇒ 𝑥𝑛+1 = 𝑥𝑛 − ′
𝑓 (𝑥𝑛 )
𝑦 = 𝑓(𝑥)
𝑦
𝑓(𝑥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
∴ 𝑓 ′ (𝑥) = 4𝑥 3 − 1
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛 4 − 𝑥𝑛 − 10 3𝑥𝑛 4 + 10
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 4𝑥𝑛 3 − 1 4𝑥𝑛 3 − 1
The approximate value of the root is given to be 2. Taking 𝑥0 = 2 , we get
3𝑥0 4 + 10 3.24 + 10
𝑥1 = = = 1.871
4𝑥0 3 − 1 4.23 − 1
3𝑥1 4 + 10 3. (1.871)4 + 10
𝑥2 = = = 1.856
4𝑥1 3 − 1 4. (1.871)2 − 1
3𝑥2 4 + 10 3. (1.856 )4 + 10
𝑥3 = = = 1.856
4𝑥2 3 − 1 4. (1.856 )3 − 1
Since 𝑥2 = 𝑥3 , so the required root is 1.856
P a g e | 71
Question 2:
By using Newton- Raphson method, find the root √12 to five place of decimal.
Solution:
Let x=√12 ⇒ x2 =12 ⇒ x2 – 12= 0.
The given equation is f(x)=0.
Here, 𝑓(𝑥) = 𝑥 2 − 12
∴ 𝑓 ′ (𝑥) = 2𝑥
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛2 − 12 𝑥𝑛2 + 12
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 2𝑥𝑛 2𝑥𝑛
Here f (3) =-3 & f (4) =4.
The approximate value of the root lies between 3 & 4. Taking 𝑥0 = 3.5 , we get
𝑥0 2 + 12 3.52 + 12
𝑥1 = = = 3.4642
2𝑥0 2 (3.5)
𝑥1 2 + 12 (3.4642)2 + 12
𝑥2 = = = 3.4641
2𝑥1 2(3.4642)
𝑥2 2 + 12 (3.4641)2 + 12
𝑥3 = = = 3.4641
2𝑥2 2(3.4641)
Since 𝑥2 = 𝑥3 , so the required root is 3.4641.
Question 3:
By using Newton- Raphson method, Solve the equation 3𝑥 − cos 𝑥 − 1 = 0, which is nearer to x =
2.
Solution:
Here, 𝑓(𝑥) = 3𝑥 − cos 𝑥 − 1
∴ 𝑓 ′ (𝑥) = 3 + sin 𝑥
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 3𝑥𝑛 − cos 𝑥𝑛 − 1 𝑥𝑛 sin 𝑥𝑛 + cos 𝑥𝑛 + 1
𝑥𝑛+1= 𝑥𝑛 – ′ = 𝑥𝑛 – =
𝑓 (𝑥𝑛 ) 3 + sin 𝑥𝑛 3 + sin 𝑥𝑛
The approximate value of the root is given to be 2. Taking 𝑥0 = 0.60 , we get
𝑥0 sin 𝑥0 + cos 𝑥0 + 1 0.6(sin 0.6) + cos 0.6 + 1
𝑥1 = = = 0.60701
3 + sin 𝑥0 3 + sin 0.6
𝑥1 sin 𝑥1 + cos 𝑥1 + 1 0.60701(sin 0.60701) + cos 0.60701 + 1
𝑥2 = = = 0.60701
3 + sin 𝑥1 3 + sin 0.60701
Since 𝑥1 = 𝑥2 , so the required root is 0.60701
Question 4:
By using Newton- Raphson method, find the root 𝑥 3 − 3x − 5 = 0, which is nearer to 𝑥0 = 3.
Solution:
Here, 𝑓(𝑥) = 𝑥 3 − 3𝑥 − 5
∴ 𝑓 ′ (𝑥) = 3𝑥 2 − 3
By using Newton-Rapson method,
𝑓(𝑥𝑛 ) 𝑥𝑛 3 − 3𝑥𝑛 − 5 2𝑥𝑛 3 + 5
𝑥𝑛+1= 𝑥𝑛 – = 𝑥𝑛 – =
𝑓 ′ (𝑥𝑛 ) 3𝑥𝑛 2 − 3 3𝑥𝑛 2 − 3
The approximate value of the root is given to be 3. Taking 𝑥0 = 3 , we get
P a g e | 72
2𝑥0 3 + 5 2.33 + 5
𝑥1 = = = 2.4583
3𝑥0 2 − 3 3.32 − 3
2𝑥1 3 + 5 2. (2.4583)3 + 5
𝑥2 = = = 2.2943
3𝑥1 2 − 3 3. (2.4583)2 − 3
2𝑥2 3 + 5 2. (2.2943)3 + 5
𝑥3 = = = 2.2791
3𝑥2 2 − 3 3. (2.2943)2 − 3
Now, 𝑓(2.2791) = 0.0010 , so the required root is 2.2791.
Question 5:
Find the real root of the equation −4𝑥 + 𝑐𝑜𝑠𝑥 + 2 = 0 , by Newton-Rapshon method up to four
decimal places.
Solution:
𝑓 ′ (𝑥) = −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.
P a g e | 73
𝑓(𝑥)
[𝑥1 , 𝑓(𝑥1 )]
𝑦 = 𝑓(𝑥)
𝑥2
𝑥1 𝑥
[𝑥2 , 𝑓(𝑥2 )]
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.
𝑓(𝑥1 )
x = 𝑥1 − (𝑥 − 𝑥1 )
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2
P a g e | 74
𝑓(𝑥1 )
𝑥3 = 𝑥1 − (𝑥 − 𝑥1 ) … … … … … … … (2)
𝑓(𝑥2 ) − 𝑓(𝑥1 ) 2
If now 𝑓(𝑥3 ) and 𝑓(𝑥1 ) are at opposite signs, then the roots lies between 𝑥1 and 𝑥3 and we replace 𝑥2
by 𝑥3 in (2) and obtain the nextr approximation. Otherwise we replace 𝑥2 by 𝑥3 and generate the next
approximation.
Question 1:
Solution:
We observe that,
𝑓(2) = −1 𝑎𝑛𝑑 𝑓(3) = 16
Hence a root lies between 2 and 3 .we have,
𝑓(𝑥1 )
𝑥 = 𝑥1 − 𝑓(𝑥 (𝑥2 -𝑥1 ) …………………..(1)
2 )−𝑓(𝑥1 )
−1
= 2 − 16+1 (3 − 2) = 2.059
i.e 𝑥3 = 2.059
Now 𝑓(𝑥3 ) = −0.38 𝑎𝑛𝑑 ℎ𝑒𝑛𝑐𝑒 𝑡ℎ𝑒 𝑟𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 2.059 𝑎𝑛𝑑 3.0
Using equation(1) again,
0.386
𝑥4 = 2.059 + (3 − 2.059)
16.386
VIVA QUESTION :
1.What is the Newton-Raphson method?
Explain that it is an iterative method for finding successively better approximations to the roots (or
zeros) of a real-valued function.
It is based on the tangent line approximation. Starting from an initial guess, we use the tangent at that
point to approximate the function's root.
The function should be differentiable, and the initial guess should be close enough to the actual root.
Convergence can be rapid if the function is well-behaved near the root.
Used in solving nonlinear equations in engineering, physics, finance, and other fields.
It has a high rate of convergence (quadratic), making it faster than other methods, like the bisection
method, for functions that meet its requirements.