Module 4 Numerical Methods 1
Module 4 Numerical Methods 1
NUMERICAL METHODS -1
Numerical method provides various technique to find approximate solution
to different problem using simple operation.
Numerical Solution of Polynomial and Transcendental Equations
Given an equation 𝑓(𝑥) = 0 it is generally not possible to find roots ′𝑥′
such that 𝑓(𝑥) becomes zero exactly. We discuss two numerical methods for the
solution of algebraic and transcendental equation.
Equation involving algebraic quantity like 𝑥,𝑥 2 , 𝑥 3 ,… are called algebraic
equation.
Eg: 𝑥 3 − 3𝑥 − 4 = 0 , 𝑥 4 + 𝑥 3 = 80
Equation involving non algebraic quantity like 𝑒 𝑥 , 𝑙𝑜𝑔𝑥, 𝑠𝑖𝑛𝑥, 𝑡𝑎𝑛𝑥, … are
called transcendental equation.
Eg: 𝑥𝑒 𝑥 − 2 = 0 , 𝑥𝑙𝑜𝑔𝑥 − 1.2 = 0, 𝑡𝑎𝑛𝑥 = 2𝑥
Numerical methods are often a repetitive nature. This consist repeated
execution of the same process where at each step to result of the previous step is
used. This is known as iterative process.
We discuss two numerical methods
1. Regula-Falsi method
2. Newton-Raphson method
Regula-Falsi method (or) Method of False position
Formula:
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
Problems
1. Using the method of false position find the real root correct to 3 decimal
places of the equation 𝑥 3 + 5𝑥 − 11 = 0.
Sol: Given 𝑓(𝑥) = 𝑥 3 + 5𝑥 − 11
𝑓(0) = −11
𝒙𝟏 = 𝟏. 𝟒𝟏𝟕
𝑓(1.417) = −1.070 < 0
𝑓(2) = 7 > 0
The root lies between (1.417,2).
Step-2: a = 1.417 b=2
𝑓(𝑎) = −1.070 𝑓(𝑏) = 7
(1.417).(7)−2.(−1.070)
𝑥2 = (7)−(−1.070)
𝒙𝟐 = 𝟏. 𝟒𝟗𝟒
𝑓(1.494) = −0.195 < 0
𝑓(2) = 7 > 0
The root lies between (1.417,2).
Step-3: a = 1.494 b=2
𝑓(𝑎) = −0.195 𝑓(𝑏) = 7
(1.494)(7)−2(−0.195)
𝑥3 = (7)−(−0.195)
𝒙𝟑 = 𝟏. 𝟓𝟎𝟖
𝑓(1.508) = −0.031 < 0
𝒙𝟒 = 𝟏. 𝟓𝟏𝟎
𝑓(1.510) = −0.007 < 0
𝑓(2) = 7 > 0
The root lies between (1.510,2).
Step-5: a = 1.510 b=2
𝑓(𝑎) = −0.007 𝑓(𝑏) = 7
(1.510)(7)−2(−0.007)
𝑥5 = (7)−(−0.007)
𝒙𝟓 = 𝟏. 𝟓𝟏𝟎
∴ The real root is 1.510
2. Using the method of false position find the real root correct to 3 decimal
places of the equation 𝑥 3 − 5𝑥 − 7 = 0.
Sol: Given 𝑓(𝑥) = 𝑥 3 − 5𝑥 − 7
𝑓(0) = −7
𝑓(1) = −1
𝑓(2) = −9 < 0
𝑓(3) = 5 > 0
The root lies between (2,3).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
𝒙𝟏 = 𝟐. 𝟔𝟒𝟑
𝑓(2.643) = −1.752 < 0
𝑓(3) = 5 > 0
The root lies between (2.643,3).
Step-2: a = 2.643 b =3
𝑓(𝑎) = −1.752 𝑓(𝑏) = 5
(2.643)(5)−3.(−1.752)
𝑥2 = (5)−(−1.752)
𝒙𝟐 = 𝟐. 𝟕𝟑𝟔
𝑓(2.736) = −0.199 < 0
𝑓(3) = 5 > 0
The root lies between (2.736,3).
Step-3: a = 2.736 b=3
𝑓(𝑎) = −0.199 𝑓(𝑏) = 5
(2.736)(5)−3.(−0.199)
𝑥3 = (5)−(−0.199)
𝒙𝟑 = 𝟐. 𝟕𝟒𝟔
𝑓(2.746) = −0.024 < 0
𝑓(3) = 5 > 0
The root lies between (2.746,3).
Step-4: a = 2.746 b=3
𝑓(𝑎) = −0.024 𝑓(𝑏) = 5
(2.746)(5)−3.(−0.024)
𝑥4 = (5)−(−0.024)
𝒙𝟒 = 𝟐. 𝟕𝟒𝟕
𝑓(2.747) = −0.006 < 0
𝑓(3) = 5 > 0
The root lies between (2.747,3).
𝒙𝟓 = 𝟐. 𝟕𝟒𝟕
∴ The real root is 2.747.
3. Find the real root of the equation 𝑥 log10 𝑥 = 1.2 by Regula falsi method.
Carry out 3 iterations.
Sol: Given 𝑓(𝑥) = 𝑥 log10 𝑥 − 1.2
𝑓(1) = −1.2 < 0
𝑓(2) = −0.5979 < 0
𝑓(3) = 0.2314 > 0
The root lies between (2,3).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
𝒙𝟏 = 𝟐. 𝟕𝟐𝟏𝟎
𝑓(2.7210) = −0.0171 < 0
𝑓(3) = 0.2314 > 0
The root lies between (2.7210,3).
Step-2: a = 2.7210 b=3
𝑓(𝑎) = −0.0171 𝑓(𝑏) = 0.2314
(2.7210)(0.2314 )−3(−0.0171)
𝑥2 = (0.2314)−(−0.0171)
𝒙𝟐 = 𝟐. 𝟕𝟒𝟎𝟐
𝒙𝟑 = 𝟐. 𝟕𝟒𝟎6
∴ The real root is 2.7406.
4. Find the real root of the equation 𝑐𝑜𝑠𝑥 = 3𝑥 − 1 upto 3 decimal places using
RF method.
Sol: Given 𝑓(𝑥) = 𝑐𝑜𝑠𝑥 − 3𝑥 + 1
𝑓(0) = 2 > 0
𝑓(1) = −1.460 < 0
The root lies between (0,1).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
𝒙𝟏 = 𝟎. 𝟓𝟕𝟖
𝑓(0.578) = 0.104 > 0
𝑓(1) = −1.460 < 0
The root lies between (0.578,1).
Step-2: 𝑎 = 0.578 b=1
𝑓(𝑎) = 0.104 𝑓(𝑏) = −1.460
𝒙𝟐 = 𝟎. 𝟔𝟎𝟔
𝑓(0.606) = 0. 004 > 0
𝑓(1) = −1.460 < 0
The root lies between (0.606,1).
Step-3: 𝑎 = 0.606 b=1
𝑓(𝑎) = 0.004 𝑓(𝑏) = −1.460
(0.606)(−1.460 )−1(0.004)
𝑥3 = (−1.460)−(0.004)
𝒙𝟑 = 𝟎. 𝟔𝟎𝟕
𝑓(0.607) = 0
∴ The real root is 0.607.
5. Find the real root of the equation 𝑥𝑒 𝑥 = 2 upto three decimal places using RF
method. Carryout 4 iterations.
Sol: Given 𝑓(𝑥) = 𝑥𝑒 𝑥 − 2
𝑓(0) = −2 < 0
𝑓(1) = 0.718 > 0
The root lies between (0,1).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
Step-1: 𝑎=0 𝑏=1
𝑓(𝑎) = −2 𝑓(𝑏) = 0.718
0(0.718)−1(−2)
𝑥1 = (0.718)−(−2)
𝒙𝟏 = 𝟎. 𝟕𝟑𝟔
𝑓(0.736) = −0.464 < 0
𝑓(1) = 0.718 > 0
The root lies between (0.736,1).
Step-2: 𝑎 = 0.736 𝑏=1
𝑓(𝑎) = −0.464 𝑓(𝑏) = 0.718
(0.736)(0.718)−1(−0.464)
𝑥2 = (0.718)−(−0.464)
𝒙𝟏 = 𝟎. 𝟑𝟏𝟒𝟕
𝑓(0.3147) = −0.5198 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.3147,1).
Step-2: 𝑎 = 0.3147 𝑏=1
𝑓(𝑎) = −0.5198 𝑓(𝑏) = 2.1780
𝒙𝟐 = 𝟎. 𝟒𝟒𝟔𝟕
𝑓(0.4467) = −0.2036 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.4467,1).
Step-3: 𝑎 = 0.4467 𝑏=1
𝑓(𝑎) = −0.2036 𝑓(𝑏) = 2.1780
(0.4467)(2.1780)−1(−0.2036)
𝑥3 = (2.1780)−(−0.2036)
𝒙𝟑 = 𝟎. 𝟒𝟗𝟒𝟎
𝑓(0.4940) = −0.0708 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.4940,1).
Step-4: 𝑎 = 0.4940 𝑏=1
𝑓(𝑎) = −0.0708 𝑓(𝑏) = 2.1780
(0.4940)(2.1780)−1(−0.0708)
𝑥4 = (2.1780)−(−0.0708)
𝒙𝟒 = 𝟎. 𝟓𝟎𝟗𝟗
𝑓(0.5099) = −0.0237 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.5099,1).
Step-5: 𝑎 = 0.5099 𝑏=1
𝑓(𝑎) = −0.0237 𝑓(𝑏) = 2.1780
(0.5099)(2.1780)−1(−0.0237)
𝑥5 = (2.1780)−(−0.0237)
𝒙𝟓 = 𝟎. 𝟓𝟏𝟓𝟐
𝑓(0.5152) = −0.0078 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.5152,1).
Step-6: 𝑎 = 0.5152 𝑏=1
𝑓(𝑎) = −0.0078 𝑓(𝑏) = 2.1780
(0.5152)(2.1780)−1(−0.0078)
𝑥6 = (2.1780)−(−0.0078)
𝒙𝟔 = 𝟎. 𝟓𝟏𝟔𝟗
𝒙𝟕 = 𝟎. 𝟓𝟏𝟕𝟓
𝑓(0.5175) = −0.0008 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.5175,1).
Step-8: 𝑎 = 0.5175 𝑏=1
𝑓(𝑎) = −0.0008 𝑓(𝑏) = 2.1780
(0.5175)(2.1780)−1(−0.0008)
𝑥8 = (2.1780)−(−0.0008)
𝒙𝟖 = 𝟎. 𝟓𝟏𝟕𝟕
𝑓(0.5177) = −0.0002 < 0
𝑓(1) = 2.1780 > 0
The root lies between (0.5177,1).
Step-9: 𝑎 = 0.5177 𝑏=1
𝑓(𝑎) = −0.0002 𝑓(𝑏) = 2.1780
(0.5177)(2.1780)−1(−0.0002)
𝑥9 = (2.1780)−(−0.0002)
𝒙𝟗 = 𝟎. 𝟓𝟏𝟕𝟕
∴ The real root is 0.5177.
7. Use RF method to find the real root of the equation 𝑡𝑎𝑛𝑥 + 𝑡𝑎𝑛ℎ𝑥 = 0, the
root
lies between 2 & 3. Carryout 3 iteration.
Sol: Given 𝑓(𝑥) = 𝑡𝑎𝑛𝑥 + 𝑡𝑎𝑛ℎ𝑥
𝑓(2) = −1.2210 < 0
𝑓(3) = 0.8525 > 0
The root lies between (2,3).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
𝒙𝟏 = 𝟐. 𝟓𝟖𝟖𝟗
𝑓(2.5889) = 0.3720 > 0
𝑓(2) = −1.2210 < 0
The root lies between (2,2.5889).
Step-2: 𝑎=2 𝑏 = 2.5889
𝑓(𝑎) = −1.2210 𝑓(𝑏) = 0.3720
2(0.3720)−(2.5889)(−1.2210)
𝑥2 = (0.3720)−(−1.2210)
𝒙𝟐 = 𝟐. 𝟒𝟓𝟏𝟒
𝑓(2.4514) = 0.1596 > 0
𝑓(2) = −1.2210 < 0
The root lies between (2,2.4514).
Step-3: 𝑎=2 𝑏 = 2.4514
𝑓(𝑎) = −1.2210 𝑓(𝑏) = 0.1596
2(0.1596)−(2.4514)(−1.2210)
𝑥3 = (0.1596)−(−1.2210)
𝒙𝟑 = 𝟐. 𝟑𝟗𝟗𝟐
∴ The real root is 2.3992.
8. Find the real root of the equation 𝑥 3 − 3𝑥 + 4 = 0 using RF method .Carry
out 3
iterations.
Sol: Given 𝑓(𝑥) = 𝑥 3 − 3𝑥 + 4
𝑓(0) = 4
𝑓(1) = 2
𝑓(2) = 6
𝑓(3) = 22
𝑓(−1) = 6 𝑓(−2) = 2 > 0 𝑓(−3) = −14 < 0
The root lies between (−3, −2).
Wkt,
𝑎𝑓(𝑏)−𝑏𝑓(𝑎)
𝑥𝑛 =
𝑓(𝑏)−𝑓(𝑎)
Step-1: 𝑎 = −3 𝑏 = −2
𝑓(𝑎) = −14 𝑓(𝑏) = 2
𝒙𝟏 = −𝟐. 𝟏𝟐𝟓𝟎
𝑓(−2.1250) = 0.7793 > 0
𝑓(−3) = −14 < 0
The root lies between (−3, −2.1250).
Step-2: 𝑎 = −3 𝑏 = −2.1250
𝑓(𝑎) = −14 𝑓(𝑏) = 0.7793
(−3)(0.7793)−(−2.1250)(−14)
𝑥2 = (0.7793)−(−14)
𝒙𝟐 = −𝟐. 𝟏𝟕𝟏𝟏
𝑓(−2.1250) = 0.2794 > 0
𝑓(−3) = −14 < 0
The root lies between (−3, −2.1711).
Step-3: 𝑎 = −3 𝑏 = −2.1711
𝑓(𝑎) = −14 𝑓(𝑏) = 0.2794
(−3)(0.2794)−(−2.1711)(−14)
𝑥3 = (0.2794)−(−14)
𝒙𝟑 = −𝟐. 𝟏𝟖𝟕𝟑
∴ The real root is −2.1873.
Newton-Raphson Method
Formula:
𝒇(𝒙𝒏 )
𝒙𝒏+𝟏 = 𝒙𝒏 − ; 𝑓 ′ (𝑥𝑛 ) ≠ 0 , 𝑛 = 0,1,2,3, …
𝒇′ (𝒙𝒏 )
𝑓(𝑥0 )
𝑛 = 0 , 𝑥1 = 𝑥0 − ; 𝑓 ′ (𝑥0 ) ≠ 0
𝑓′ (𝑥0 )
𝑓(𝑥1 )
𝑛 = 1 , 𝑥2 = 𝑥1 − ; 𝑓 ′ (𝑥1 ) ≠ 0 and so on.
𝑓′ (𝑥1 )
Problems
1. Use NR method to find the real root of the equation 𝑥 3 − 3𝑥 − 5 = 0 ,
correct to 3
decimal places.
Sol: Given 𝑓(𝑥) = 𝑥 3 − 3𝑥 − 5
𝑓(0) = −5
𝑓(1) = −7
𝑓(2) = −3
9. Use NR method to find an iterative formula for the reciprocal of the square
root of a
1
positive number and hence find (17)− ⁄2 correct to 4 decimal places.
1
Sol: Let 𝑥 =
√𝑁
Square on both sides
1
𝑥2 =
𝑁
2 1
𝑥 − =0
𝑁
1
Here 𝑓(𝑥) = 𝑥 2 −
𝑁
′ (𝑥)
𝑓 = 2𝑥
𝒇(𝒙𝒏 )
We know that 𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇′ (𝒙𝒏 )
1
(𝑥𝑛 2 − )
𝑁
𝑥𝑛+1 = 𝑥𝑛 − (2𝑥𝑛 )
2 1
(2𝑥𝑛 2 −𝑥𝑛 + )
𝑁
𝑥𝑛+1 =
2𝑥𝑛
𝟏⁄
To find (𝟏𝟕)− 𝟐:
Here 𝑁 = 17
1 1
Wkt, = 0.3333 , = 0.25
√9 √16
Let 𝑥0 = 0.25
1 1
Step-1: 𝑥1 = [𝑥0 + ]
2 𝑁.𝑥0
1 1
𝑥1 = [0.25 + ]
2 17(0.25)
𝒙𝟏 = 𝟎. 𝟐𝟒𝟐𝟔
1 1
Step-2: 𝑥2 = [𝑥1 + ]
2 𝑁.𝑥1
1 1
𝑥2 = [0.2426 + ]
2 17(0.2426)
𝒙𝟐 = 𝟎. 𝟐𝟒𝟐𝟓
𝟏
Thus, = 𝟎. 𝟐𝟒𝟐𝟓
√𝟏𝟕
10. Use NR method to find an iterative formula for the reciprocal of positive
number and
1
hence find .
31
1
Sol: Let 𝑥 =
𝑁
Take reciprocal on b.s
1
=𝑁
𝑥
1
−𝑁 =0
𝑥
1
Here 𝑓(𝑥) = − 𝑁
𝑥
1
𝑓 ′ (𝑥) = −
𝑥2
𝒇(𝒙𝒏 )
We know that 𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇′ (𝒙𝒏 )
1
( −𝑁)
𝑥𝑛
𝑥𝑛+1 = 𝑥𝑛 − 1
(− )
𝑥𝑛 2
𝟏
To find :
𝟑𝟏
Here 𝑁 = 31
1
Let 𝑥0 = = 0.04
25
Step-1: 𝑥1 = 𝑥0 [2 − 𝑁𝑥0 ]
𝑥1 = (0.04)[2 − 31(0.04)]
𝒙𝟏 = 𝟎. 𝟎𝟑𝟎𝟒
Step-2: 𝑥2 = 𝑥1 [2 − 𝑁𝑥1 ]
𝑥2 = (0.0304)[2 − 31(0.0304)]
𝒙𝟐 = 𝟎. 𝟎𝟑𝟐𝟐
Step-3: 𝑥3 = 𝑥2 [2 − 𝑁𝑥2 ]
𝑥3 = (0.0322)[2 − 31(0.0322)]
𝒙𝟑 = 𝟎. 𝟎𝟑𝟐𝟑
𝟏
Thus, = 𝟎. 𝟑𝟐𝟑.
𝟑𝟏
FINITE DIFFERENCES
Problems
1. Given 𝑓(0) = 1, 𝑓(1) = 3, 𝑓(2) = 7, 𝑓(3) = 13, find 𝑓(0.1) using
Newton’s forward interpolation formula.
Sol:
𝒙 𝒚 𝑰𝑫 𝑰𝑰 𝑫 𝑰𝑰𝑰 𝑫
𝑥0 = 0 𝑦0 = 1
∆𝑦0 = 3 − 1 = 2
1 3 ∆2 𝑦0 = 4 − 2 = 2
7−3=4 ∆3 𝑦0 = 2 − 2 = 0
2 7 6−4=2
13 − 7 = 6
3 13
𝑥0 = 1 𝑦0 = 0
∆𝑦0 = 0.128
1.2 0.128 ∆2 𝑦0 = 0.288
∆3 𝑦0 = 0.048
0.416 ∆4 𝑦0 = 0
1.4 0.544 0.336 ∆5 𝑦0 = 0
0.048
0.752 0
1.6 1.296 0.384
0.048
1.136
1.8 2.432 0.432
1.568
2 4
By NFIF,
𝑟(𝑟−1) 𝑟(𝑟−1)(𝑟−2) 𝑟(𝑟−1)(𝑟−2)(𝑟−3) 𝑟(𝑟−1)(𝑟−2)(𝑟−3)(𝑟−4)
𝑦 = 𝑦0 + 𝑟∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0 + ∆5 𝑦0
2! 3! 4! 5!
(0.5)(0.5−1) (0.5)(0.5−1)(0.5−2)
𝑦 = 0 + (0.5)(0.128) + (0.288) + (0.048) + 0 + 0
2 6
𝒚 = 𝟎. 𝟎𝟑𝟏0
Thus, 𝒇(𝟏. 𝟏) = 𝟎. 𝟎𝟑𝟏0.
By NFIF,
𝑟(𝑟−1) 𝑟(𝑟−1)(𝑟−2)
𝑦 = 𝑦0 + 𝑟∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ⋯
2! 3!
(0.5)(0.5−1) (0.5)(0.5−1)(0.5−2)
𝑦 = 225 + (0.5)(13) + (69) + (−131)
2 6
𝒚 = 𝟐𝟏𝟒. 𝟔𝟖𝟕𝟓
Thus, 𝒖𝟎.𝟓 = 𝟐𝟏𝟒. 𝟔𝟖𝟕𝟓
Find the area corresponding to the diameter 105 using appropriate interpolation
formula.
Sol: Here ℎ = 5 , 𝑥𝑛 = 100 To find 𝒇(𝟏𝟎𝟓) ⇒ 𝑥 = 10.5
𝑥−𝑥𝑛
𝑟=
ℎ
105−100
𝑟=
5
𝒓=𝟏
𝒙 𝒚 𝑰𝑫 𝑰𝑰 𝑫 𝑰𝑰𝑰 𝑫 𝑰𝑽 𝑫
80 5026
648
85 5674 40
688 −2
90 6362 38 𝛻 4 𝑦𝑛 = 4
726 𝛻 3 𝑦𝑛 = 2
95 7088 𝛻 2 𝑦𝑛 = 40
𝛻𝑦𝑛 = 766
𝑥𝑛 =100 𝑦𝑛 =7854
5. The following table give the values of 𝑡𝑎𝑛𝑥 for 0.1 ≤ 𝑥 ≤ 0.3 , find 𝑡𝑎𝑛(0.26).
𝒙 0.1 0.15 0.2 0.25 0.3
Sol:
Here ℎ = 0.05 , 𝑥𝑛 = 0.3 To find 𝐭𝐚𝐧(𝟎. 𝟐𝟔) ⇒ 𝑥 = 0.26
𝑥−𝑥𝑛
𝑟=
ℎ
0.26−0.3
𝑟=
0.05
𝒓 = −𝟎. 𝟎𝟖
𝒙 𝒚 𝑰𝑫 𝑰𝑰 𝑫 𝑰𝑰𝑰 𝑫 𝑰𝑽 𝑫
0.1 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 0.0002
𝛻 4 𝑦𝑛 = 0.0002
0.2 0.2027 0.0010
𝛻 3 𝑦𝑛 = 0.0004
0.0526
0.25 0.2553 𝛻 2 𝑦𝑛 = 0.0014
𝛻𝑦𝑛 = 0.0540
𝑥𝑛 =0.3 𝑦𝑛 =0.3093
By NBIF,
𝑟(𝑟+1) 𝑟(𝑟+1)(𝑟+2) 𝑟(𝑟+1)(𝑟+2)(𝑟+3)
𝑦 = 𝑦𝑛 + 𝑟𝛻𝑦𝑛 + 𝛻 2 𝑦𝑛 + 𝛻 3 𝑦𝑛 + 𝛻 4 𝑦𝑛
2! 3! 4!
(−0.8)(−0.8 + 1) (−0.8)(−0.8 + 1)(−0.8 + 2)
𝑦 = 0.3093 + (−0.8)(0.0540) + (0.0014) + (0.0004)
2 6
(−0.8)(−0.8+1)(−0.8+2)(−0.8+3)
+ (0.0002)
24
𝑦 = 0.2660
Thus, 𝒕𝒂𝒏(𝟎. 𝟐𝟔) = 𝟎. 𝟐𝟔𝟔𝟎.
𝒙𝟎 = 𝟒𝟎 𝒚𝟎 = 𝟑𝟏
∆𝒚𝟎 = 𝟒𝟐
50 73 (31+42) ∆𝟐 𝒚𝟎 = 𝟗
𝟓𝟏 ∆𝟑 𝒚𝟎 = −𝟐𝟓
a) To find 𝒇(𝟒𝟓) ⇒ 𝑥 = 45
Here ℎ = 10 , 𝑥0 = 40
𝑥−𝑥0
𝑟=
ℎ
45−40
𝑟=
10
𝒓 = 𝟎. 𝟓
By NFIF,
𝑟(𝑟−1) 𝑟(𝑟−1)(𝑟−2) 𝑟(𝑟−1)(𝑟−2)(𝑟−3)
𝑦 = 𝑦0 + 𝑟∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0
2! 3! 4!
𝑦 = 47.8672 ≅ 48
Thus, 𝒇(𝟒𝟓) = 𝟒𝟖.
No. of students who have obtained less than 45 marks is 48.
c) To find 𝒇(𝟓𝟓) ⇒ 𝑥 = 55
Here ℎ = 10 , 𝑥0 = 40
𝑥−𝑥0
𝑟=
ℎ
55−40
𝑟=
10
𝒓 = 𝟏. 𝟓
By NFIF,
𝑟(𝑟−1) 𝑟(𝑟−1)(𝑟−2) 𝑟(𝑟−1)(𝑟−2)(𝑟−3)
𝑦 = 𝑦0 + 𝑟∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0
2! 3! 4!
𝑦 = 99.8047 ≅ 100
Thus, 𝒇(𝟓𝟓) = 𝟏𝟎𝟎.
No. of students who have obtained more than 40 but less than 55 = 𝒇(𝟓𝟓) − 𝒇(𝟒𝟎)
= 𝟏𝟎𝟎 − 𝟑𝟏
= 𝟔𝟗
7. The population of a town is given by the following data
𝒙 𝒚 𝑰𝑫 𝑰𝑰 𝑫 𝑰𝑰𝑰 𝑫 𝑰𝑽 𝑫
𝒙𝟎 =1971 𝒚𝟎 = 𝟏𝟗. 𝟗𝟔
∆𝒚𝟎 = 𝟏𝟗. 𝟔𝟗
1981 39.65 ∆𝟐 𝒚𝟎 = −𝟎. 𝟓𝟑
𝟏𝟗. 𝟏𝟔 ∆𝟑 𝒚𝟎 = −𝟎. 𝟐𝟔
1991 58.81 − 𝟎. 𝟕𝟗 ∆𝟒 𝒚𝟎 = 𝟎. 𝟎𝟖
𝟏𝟖. 𝟑𝟕 𝜵𝟑 𝒚𝒏 = −𝟎. 𝟏𝟖 = 𝜵 𝟒 𝒚𝒏
2001 77.18 𝜵𝟐 𝒚𝒏 = −𝟎. 𝟗𝟕
𝜵𝒚𝒏 = 𝟏𝟕. 𝟒𝟎
𝒙𝒏 =2011 𝒚𝒏 = 𝟗𝟒.58
𝑦 = 84.2638
Thus, 𝒇(𝟐𝟎𝟏𝟓) = 𝟖𝟒. 𝟐𝟔𝟑𝟖
The increase in population from the year 1975 to 2005= 𝒇(𝟏𝟗𝟕𝟓) − 𝒇(𝟐𝟎𝟎𝟓)
= 𝟖𝟒. 𝟐𝟔𝟑𝟖 − 𝟐𝟕. 𝟖𝟕𝟗𝟕
= 𝟓𝟔. 𝟑𝟖𝟒𝟏 ( in thousands )
8. Extrapolate for 25.4 given the data
𝒙 19 20 21 22 23
Problems
1. Use NDDF to find 𝑓(43) , given that
𝑥 40 42 44 45
By NDDF,
𝑦 = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )𝑓(𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 )
𝑦 = 43833 + (43 − 40)(1367.5) + (43 − 40)(43 − 42)(16) + (43 − 40)(43 − 42)(43 − 44)(0.1)
Sol:
𝒙 𝒇(𝒙) 𝑰 𝑫𝑫 𝑰𝑰 𝑫𝑫 𝑰𝑰𝑰 𝑫𝑫 𝑰𝑽 𝑫𝑫
𝑥0 = 0 𝑓(𝑥0 ) = 0
𝑓(𝑥0 , 𝑥1 ) = 3
𝑓(𝑥0 , 𝑥1, 𝑥2 ) = 4
𝑥1 = 2 𝑓(𝑥1 ) = 6
𝑓(𝑥1 , 𝑥2 ) = 15 𝑓(𝑥0 , 𝑥1, 𝑥2 , 𝑥3 ) = 1
𝑓(𝑥1 , 𝑥2 , 𝑥3 ) = 9
𝑥2 = 3 𝑓(𝑥2 ) = 21 𝑓(𝑥0 , 𝑥1, 𝑥2 , 𝑥3 , 𝑥4 ) = 0
𝑓(𝑥2 , 𝑥3 ) = 42 𝑓(𝑥1, 𝑥2 , 𝑥3 , 𝑥4 ) = 1
𝑓(𝑥2 , 𝑥3 , 𝑥4 ) = 13
𝑥3 = 5 𝑓(𝑥3 ) = 105
𝑓(𝑥3 , 𝑥4 ) = 81
𝑥4 = 6 𝑓(𝑥4 ) = 186
By NDDF,
𝑦 = 𝑓(𝑥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 )
𝑦 = 0 + (0.5 − 0)(3) + (0.5 − 0)(0.5 − 2)(4) + (0.5 − 0)(0.5 − 2)(0.5 − 3)(1) + (0)
𝒚 = 𝟎. 𝟑𝟕𝟓𝟎
𝑓(𝑥) 2 3 12 147
𝒙𝟎 = 𝟐 𝒇(𝒙𝟎 ) = 𝟒
𝒇(𝒙𝟎 , 𝒙𝟏 ) = 𝟐𝟔
𝒙𝟏 = 𝟒 𝒇(𝒙𝟏 ) = 𝟓𝟔 𝒇(𝒙𝟎 , 𝒙𝟏, 𝒙𝟐 ) = 𝟏𝟓
𝒇(𝒙𝟏 , 𝒙𝟐 ) = 𝟏𝟑𝟏 𝒇(𝒙𝟎 , 𝒙𝟏, 𝒙𝟐 , 𝒙𝟑 ) = 𝟏
𝒙𝟐 = 𝟗 𝒇(𝒙𝟐 ) = 𝟕𝟏𝟏 𝒇(𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ) = 𝟐𝟑
𝒇(𝒙𝟐 , 𝒙𝟑 ) = 𝟐𝟔𝟗
𝒙𝟑 = 𝟏𝟎 𝒇(𝒙𝟑 ) = 𝟗𝟖𝟎
By NDDF,
𝑦 = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓(𝑥0 , 𝑥1 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓(𝑥0 , 𝑥1 , 𝑥2 ) + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )𝑓(𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 )
𝑦 = 4 + (𝑥 − 2)(26) + (𝑥 − 2)(𝑥 − 4)(15) + (𝑥 − 2)(𝑥 − 4)(𝑥 − 9)(1)
𝑦 = 4 + 26𝑥 − 52 + 15(𝑥 2 − 2𝑥 − 4𝑥 + 8) + (𝑥 2 − 2𝑥 − 4𝑥 + 8)(𝑥 − 9)
𝑦 = 4 + 26𝑥 − 52 + 15(𝑥 2 − 6𝑥 + 8) + (𝑥 2 − 6𝑥 + 8)(𝑥 − 9)
𝑦 = 4 + 26𝑥 − 52 + 15𝑥 2 − 90𝑥 + 120 + 𝑥 3 − 6𝑥 2 + 8𝑥 − 9𝑥 2 + 54𝑥 − 72
𝑦 = 𝑥 3 − 2𝑥, is the required polynomial.
𝑓(𝑥) = 𝑥 3 − 2𝑥
When 𝑥 = 3 , 𝑓(3) = 21
𝑥=5, 𝑓(5) = 115
𝑥=7, 𝑓(7) = 329
𝑥 = 11 , 𝑓(11) = 1309
Consider,
𝑓(𝑥) = 𝑥 3 − 2𝑥
𝑓(𝑥) = (𝑥 − 1)3 + 3𝑥 2 − 3𝑥 + 1 − 2𝑥 (𝑥 − 1)3 = 𝑥 3 − 3𝑥 2 + 3𝑥 − 1
𝑓(𝑥) = (𝑥 − 1)3 + 3𝑥 2 − 5𝑥 + 1 (𝑥 − 1)2 = 𝑥 2 − 2𝑥 + 1
𝑓(𝑥) = (𝑥 − 1)3 + 3[(𝑥 − 1)2 + 2𝑥 − 1] − 5𝑥 + 1
𝑓(𝑥) = (𝑥 − 1)3 + 3(𝑥 − 1)2 + 6𝑥 − 3 − 5𝑥 + 1
𝑓(𝑥) = (𝑥 − 1)3 + 3(𝑥 − 1)2 + 𝑥 − 2
𝑓(𝑥) = (𝑥 − 1)3 + 3(𝑥 − 1)2 + 𝑥 − 1 − 1
𝒇(𝒙) = (𝒙 − 𝟏)𝟑 + 𝟑(𝒙 − 𝟏)𝟐 + (𝒙 − 𝟏) − 𝟏
When
𝑥 = 1.1 , 𝑓(𝑥) = (1.1 − 1)3 + 3(1.1 − 1)2 + (1.1 − 1) − 1 = −𝟎. 𝟖𝟔𝟗𝟎
𝑥 = 1.5 , 𝑓(𝑥) = (1.5 − 1)3 + 3(1.5 − 1)2 + (1.5 − 1) − 1 = 𝟎. 𝟑𝟕𝟓
By NDDF,
𝑦 = 𝑓(𝑥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 )
𝑦 = 1245 − 404𝑥 − 1616 + 94𝑥 2 + 470𝑥 + 376 − 14𝑥 2 − 70𝑥 2 − 56𝑥 + (3𝑥 2 − 6𝑥)(𝑥 2 + 5𝑥 + 4)
𝑦 = 1245 − 404𝑥 − 1616 + 94𝑥 2 + 470𝑥 + 376 − 14𝑥 2 − 70𝑥 2 − 56𝑥 + 3𝑥 4 + 15𝑥 3 + 12𝑥 2 − 6𝑥 3 − 30𝑥 2 − 24𝑥
6. Construct a polynomial for the data given below using NDDF and hence find
𝑓(8) and 𝑓(15).
𝑥 4 5 7 10 11 13
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 )
+ 𝑦
(𝑥𝑛 − 𝑥0 )(𝑥𝑛 − 𝑥2 ) … (𝑥𝑛 − 𝑥𝑛−1 ) 𝑛
(𝑦 − 𝑦0 )(𝑦 − 𝑦1 ) … (𝑦 − 𝑦𝑛−1 )
+ 𝑥
(𝑦𝑛 − 𝑦0 )(𝑦𝑛 − 𝑦2 ) … (𝑦𝑛 − 𝑦𝑛−1 ) 𝑛
Problems
1. Apply Lagrange’s interpolation formula to find 𝑦(11) from the following
data
𝑥 2 5 8 14
Sol: Given 𝑥0 = 2 𝑥1 = 5 𝑥2 = 8 𝑥3 = 14
𝑦0 = 94.8 𝑦1 = 87.9 𝑦2 = 81.3 𝑦3 = 68.7
To find 𝒚(𝟏𝟏) ⇒ 𝑥 = 11
Wkt
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 )
𝑦= 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 )(𝑥0 − 𝑥3 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 )(𝑥1 − 𝑥3 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )
+ 𝑦2 + 𝑦
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )(𝑥2 − 𝑥3 ) (𝑥3 − 𝑥0 )(𝑥3 − 𝑥1 )(𝑥3 − 𝑥2 ) 3
𝑥 0 1 2 5
𝑦 2 3 12 147
Sol: Given 𝑥0 = 0 𝑥1 = 1 𝑥2 = 2 𝑥3 = 5
𝑦0 = 2 𝑦1 = 3 𝑦2 = 12 𝑦3 = 147
Wkt
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 )
𝑦= 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 )(𝑥0 − 𝑥3 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 )(𝑥1 − 𝑥3 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )
+ 𝑦2 + 𝑦
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )(𝑥2 − 𝑥3 ) (𝑥3 − 𝑥0 )(𝑥3 − 𝑥1 )(𝑥3 − 𝑥2 ) 3
−(𝑥 3 − 8𝑥 2 + 17𝑥 − 10) (3𝑥 3 − 21𝑥 2 + 30𝑥) (2𝑥 3 − 12𝑥 2 + 10𝑥) (147𝑥 3 − 441𝑥 2 + 294𝑥)
𝑦= + − +
5 4 1 60
−12(𝑥 3 − 8𝑥 2 + 17𝑥 − 10) + 15(3𝑥 3 − 21𝑥 2 + 30𝑥) − 60(2𝑥 3 − 12𝑥 2 + 10𝑥) + (147𝑥 3 − 441𝑥 2 + 294𝑥)
𝑦=
60
−12𝑥 3 + 96𝑥 2 − 204𝑥 + 120 + 45𝑥 3 − 315𝑥 2 + 450𝑥 − 120𝑥 3 + 720𝑥 2 − 600𝑥 + 147𝑥 3 − 441𝑥 2 + 294𝑥
𝑦=
60
3. Use Lagrange’s interpolation formula to fit a polynomial for the data and
hence find 𝑦 at 𝑥 = 2.
𝑥 0 1 3 4
𝑦 -12 0 6 12
Sol: Given 𝑥0 = 0 𝑥1 = 1 𝑥2 = 3 𝑥3 = 4
𝑦0 = −12 𝑦1 = 0 𝑦2 = 6 𝑦3 = 12
𝑦 = 𝑥 3 − 8𝑥 2 + 19𝑥 − 12 − 𝑥 3 + 5𝑥 2 − 4𝑥 + 𝑥 3 − 4𝑥 2 + 3𝑥
Put 𝑥 = 2
𝑦 = 23 − 7(2)2 + 18(2) − 12
𝒚=𝟒
4. Use Lagrange’s interpolation formula to fit a polynomial for the data 𝑦(1) = 3,
𝑦(3) = 9, 𝑦(4) = 30, 𝑦(6) = 132.
Sol: Given 𝑥0 = 1 𝑥1 = 3 𝑥2 = 4 𝑥3 = 6
𝑦0 = 3 𝑦1 = 9 𝑦2 = 30 𝑦3 = 132
Wkt
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥2 )(𝑥 − 𝑥3 )
𝑦= 𝑦0 + 𝑦
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 )(𝑥0 − 𝑥3 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 )(𝑥1 − 𝑥3 ) 1
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥3 ) (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )
+ 𝑦2 + 𝑦
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )(𝑥2 − 𝑥3 ) (𝑥3 − 𝑥0 )(𝑥3 − 𝑥1 )(𝑥3 − 𝑥2 ) 3
(𝑥 − 3)(𝑥 − 4)(𝑥 − 6) 3(𝑥 − 1)(𝑥 − 4)(𝑥 − 6) 5(𝑥 − 1)(𝑥 − 3)(𝑥 − 6) 22(𝑥 − 1)(𝑥 − 3)(𝑥 − 4)
𝑦= + + +
(−10) (2) (−1) (5)
−(𝑥 3 − 13𝑥 2 + 54𝑥 − 72) + 15(𝑥 3 − 11𝑥 2 + 34𝑥 − 24) − 50(𝑥 3 − 10𝑥 2 + 27𝑥 − 18) + 44(𝑥 3 − 8𝑥 2 + 19𝑥 − 12)
𝑦=
10
−𝑥 3 + 13𝑥 2 − 54𝑥 + 72 + 15𝑥 3 − 165𝑥 2 + 510𝑥 − 360 − 50𝑥 3 + 500𝑥 2 − 1350𝑥 + 900 + 44𝑥 3 − 352𝑥 2 + 836𝑥 − 528
𝑦=
10
8𝑥 3 −4𝑥 2 −58𝑥+84
𝑦=
10
Numerical Integration
𝑏
The process of obtaining approximate value of the definite integration 𝐼 = ∫𝑎 𝑦 𝑑𝑥
without actually integrating function but only using the value of ′𝑦′ at some point of 𝑥 is
equally placed over [𝑎, 𝑏].
𝟏𝒓𝒅
Simpson’s rule
𝟑
Formula:
𝑏
ℎ
∫ 𝑦 𝑑𝑥 = [(𝑦 + 𝑦𝑛 ) + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ + 𝑦𝑛−2 )]
3 0
𝑎
𝑏−𝑎
Where, ℎ = 𝑛
1𝑟𝑑
Note: To apply 3 rule 𝑛 must be multiple of 2.
Problems
6
1. Evaluate ∫0 3𝑥 2 𝑑𝑥 dividing the interval [0,6] in 6 equal parts (7 ordinate) by
applying
1𝑟𝑑
Simpson’s rule.
3
Sol: Given a = 0 , b = 6 , y = 3𝑥 2
𝑏−𝑎
Now, ℎ = 𝑛
6−0
ℎ= 6
𝒉=𝟏,𝑛=6
𝒙 0 1 2 3 4 5 6
y = 3𝑥 2 0 3 12 27 48 75 108
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
6 1
∫0 3𝑥 2 𝑑𝑥 = 3 [(0 + 108) + 4(3 + 27 + 75) + 2(12 + 48)]
𝟔
∫𝟎 𝟑𝒙𝟐 𝒅𝒙 = 𝟐𝟏𝟔.
𝑥 0 𝟏 𝟐 𝟑 1
𝟒 𝟒 𝟒
1 1 0.9412 0.8 0.64 0.5
y=
1 + 𝑥2
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦4 ) + 4(𝑦1 + 𝑦3 ) + 2(𝑦2 )]
1
1 1
∫0 1+𝑥 2 𝑑𝑥 = 4
[(1 + 0.5) + 4(0.9412 + 0.64) + 2(0.8)]
3
𝟏 𝟏
∫𝟎 𝒅𝒙 = 𝟎. 𝟕𝟖𝟓𝟒
𝟏+𝒙𝟐
By integration,
1 1
∫0 𝑑𝑥 = [𝑡𝑎𝑛−1 𝑥]10
1+𝑥 2
0.7854 = 𝑡𝑎𝑛−1 1 − 𝑡𝑎𝑛−1 0
𝜋
0.7854 = 4
𝝅 = 𝟑. 𝟏𝟒𝟏𝟔
𝜋⁄ 1𝑟𝑑 𝜋
2
3. Find the approximate value of ∫0 √𝑐𝑜𝑠𝜃 𝑑𝜃 by Simpson’s 3
rule by dividing [0, 2 ]
into 6 equal parts.
𝜋
Sol: Given a = 0 , b = 2 , y = √𝑐𝑜𝑠𝜃
𝑏−𝑎
Now, ℎ = 𝑛
𝜋
−0
ℎ= 2
;
6
𝜋
𝒉 = 12 = 15° ,
𝑛=6
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
𝜋 𝜋
∫0 √𝑐𝑜𝑠𝜃𝑑𝜃 =
2 12
[(1 + 0) + 4(0.9828 + 0.8409 + 0.5087) + 2(0.9306 + 0.7071)]
3
𝝅
∫𝟎𝟐 √𝒄𝒐𝒔𝜽𝒅𝜽 = 𝟏. 𝟏𝟖𝟕𝟑
0.6 2 1𝑟𝑑
4. Evaluate ∫0 𝑒 −𝑥 𝑑𝑥 using Simpson’s rule by dividing [0,0.6] in 6 subintervals.
3
−𝑥 2
Sol: Given a = 0 , b = 0.6 , y = 𝑒
𝑏−𝑎
Now, ℎ = 𝑛
0.6−0
ℎ= 6
𝒉 = 𝟎. 𝟏 , 𝑛 = 6
𝒙 0 0.1 0.2 0.3 0.4 0.5 0.6
2
y = 𝑒 −𝑥 1 0.99 0.9608 0.9139 0.8521 0.7788 0.6977
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
0.6 2 0.1
∫0 𝑒 −𝑥 𝑑𝑥 = 3
[(1 + 0.6977) + 4(0.99 + 0.9139 + 0.7788) + 2(0.9608 + 0.8521)]
𝟎.𝟔 𝟐
∫𝟎 𝒆−𝒙 𝒅𝒙 = 𝟎. 𝟓𝟑𝟓𝟏
1 𝑑𝑥 1𝑟𝑑
5. Evaluate ∫0 (1+𝑥)2
using Simpson’s rule by taking 7 ordinates.
3
1
Sol: Given a = 0 , b = 1 , y = (1+𝑥)2
𝑏−𝑎
Now, ℎ = 𝑛
1−0
ℎ= 6
𝟏
𝒉=𝟔 , 𝑛=6
1
1 1
∫0 (1+𝑥)2 𝑑𝑥 = 6
[(1 + 0.25) + 4(0.7347 + 0.4444 + 0.2975) + 2(0.5625 + 0.36)]
3
𝟏 𝟏
∫𝟎 (𝟏+𝒙)𝟐
𝒅𝒙 = 𝟎. 𝟓𝟎𝟎𝟏
1 𝑥 1𝑟𝑑
6. Evaluate ∫0 1+𝑥 2 𝑑𝑥 using Simpson’s rule by taking 6 equal parts and hence find
3
log2.
𝑥
Sol: Given a = 0 , b = 1 , y = 1+𝑥 2
𝑏−𝑎
Now, ℎ = 𝑛
1−0
ℎ= 6
𝟏
𝒉=𝟔 , 𝑛=6
𝒙 0 1 2 3 4 5 1
6 6 6 6 6
𝑦 0 0.1622 0.3000 0.4000 0.4615 0.4918 0.5000
𝑥
=
1 + 𝑥2
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
1
1 𝑥
∫0 𝑑𝑥 = 6
[(0 + 0.5) + 4(0.1622 + 0.4 + 0.4918) + 2(0.3 + 0.4615)]
1+𝑥 2 3
𝟏 𝒙
∫𝟎 𝒅𝒙 = 𝟎. 𝟑𝟒𝟔𝟔
𝟏+𝒙𝟐
By integration,
1 𝑥 1 1 2𝑥
∫0 𝑑𝑥 = 2 ∫0 𝑑𝑥
1+𝑥 2 1+𝑥 2
1
0.3466 = [𝑙𝑜𝑔(1 + 𝑥 2 )]10
2
1
0.3466 = 2 [𝑙𝑜𝑔2 − 𝑙𝑜𝑔1]
𝒍𝒐𝒈𝟐 = 𝟎. 𝟔𝟗𝟑𝟐
𝜋 𝑑𝑥
7. Evaluate ∫0 by taking 6 sub intervals.
2+𝑐𝑜𝑠𝑥
1
Sol: Given a = 0 , b = 𝜋 , y = 2+𝑐𝑜𝑠𝑥
𝑏−𝑎
Now, ℎ = 𝑛
𝜋−0
ℎ= 6
𝜋
𝒉 = 𝟔 = 𝟑𝟎° , 𝑛 = 6
𝑥 𝟎° 𝟑𝟎° 𝟔𝟎° 𝟗𝟎° 𝟏𝟐𝟎° 𝟏𝟓𝟎° 18𝟎°
1 0.3333 0.3489 0.4000 0.5000 0.6667 0.8819 1
2 + 𝑐𝑜𝑠𝑥
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
𝜋
𝜋 1
∫0 𝑑𝑥 = 𝟔
[(0.3333 + 1) + 4(0.3489 + 0.5 + 0.8819) + 2(0.4 + 0.6667)]
2+𝑐𝑜𝑠𝑥 3
𝝅 𝟏
∫𝟎 𝒅𝒙 = 𝟏. 𝟖𝟏𝟑𝟒
𝟐+𝒄𝒐𝒔𝒙
8 1
8. Evaluate ∫2 𝑑𝑥 by taking 6 sub intervals.
log10 𝑥
1
Sol: Given a = 2 , b = 8 , y = log
10 𝑥
𝑏−𝑎
Now, ℎ = 𝑛
8−2
ℎ= 6
𝒉 = 𝟏, 𝑛 = 6
𝒙 2 3 4 5 6 7 8
1 3.3219 2.0959 1.6610 1.4307 1.2851 1.1833 1.1073
𝑦=
log10 𝑥
Wkt,
𝑏 ℎ
∫𝑎 𝑦 𝑑𝑥 = 3 [(𝑦0 + 𝑦6 ) + 4(𝑦1 + 𝑦3 + 𝑦5 ) + 2(𝑦2 + 𝑦4 )]
8 1 1
∫2 log10 𝑥
𝑑𝑥 = 3 [(3.3219 + 1.1073) + 4(2.0959 + 1.4307 + 1.1833) + 2(1.661 + 1.2851)]
𝟖 1
∫𝟐 𝒅𝒙 = 𝟗. 𝟕𝟐𝟎𝟑
log10 𝑥
Problems
1 1 3𝑡ℎ
1. Evaluate ∫0 (1+𝑥)
𝑑𝑥 by taking 7 ordinate using Simpson’s rule. Hence deduce
8
the value of log2.
1
Sol: Given a = 0 , b = 1 , y = (1+𝑥)
𝑏−𝑎
Now, ℎ = ,𝑛=6
𝑛
1−0
ℎ= 6
𝟏
𝒉=𝟔
𝒙 0 1 2 3 4 5 1
6 6 6 6 6
1 1 0.8571 0.75 0.6667 0.6 0.5455 0.5
y=
(1 + 𝑥)
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2(𝑦3 )]
8
1
1 1 3∗
∫0 (1+𝑥) 𝑑𝑥 = 𝟔
[(1 + 0.5) + 3(0.8571 + 0.75 + 0.6 + 0.5455) + 2(0.6667)]
8
𝟏 𝟏
∫𝟎 (𝟏+𝒙)
𝒅𝒙 = 𝟎. 𝟔𝟗𝟑𝟐
By integration,
1 1
∫0 1+𝑥 𝑑𝑥 = [𝑙𝑜𝑔(1 + 𝑥)]10
0.6932 = [𝑙𝑜𝑔2 − 𝑙𝑜𝑔1]
𝒍𝒐𝒈𝟐 = 𝟎. 𝟔𝟗𝟑𝟐
3𝑡ℎ 4 1⁄
2. Use Simpson’s 8 rule to evaluate ∫1 𝑒 𝑥 𝑑𝑥 by taking 3 equal parts.
1
Sol: Given a = 1 , b = 4 , y = 𝑒 ⁄𝑥
𝑏−𝑎
Now, ℎ = ,𝑛=3
𝑛
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦3 ) + 3(𝑦1 + 𝑦2 )]
8
4 1⁄ 3∗1
∫1 𝑒 𝑥 𝑑𝑥 = [(2.7183 + 1.2840 ) + 3(1.6487 + 1.3956 )]
8
𝟒 𝟏⁄
∫𝟏 𝒆 𝒙 𝒅𝒙 = 𝟒. 𝟗𝟐𝟓𝟕
5.2 3𝑡ℎ
3. Evaluate ∫4 log 𝑒 𝑥 𝑑𝑥 using Simpson’s 8 rule by taking 6 equal parts.
Sol: Given a = 4 , b = 5.2 , y = log 𝑒 𝑥
𝑏−𝑎
Now, ℎ = ,𝑛=6
𝑛
5.2−4
ℎ= 6
𝒉 = 𝟎. 𝟐
𝒙 4 4.2 4.4. 4.6 4.8 5.0 5.2
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2(𝑦3 )]
8
5.2 3∗(0.2)
∫4 log 𝑒 𝑥 𝑑𝑥 = [(1.3863 + 1.6487) + 3(1.4351 + 1.4816 + 1.5686 + 1.6094) + 2(1.5261)]
8
𝟓.𝟐
∫𝟒 𝒍𝒐𝒈𝒆 𝒙 𝒅𝒙 = 𝟏. 𝟖𝟐𝟕𝟖
0.3 3⁄ 3𝑡ℎ
4. Evaluate ∫0 (1 − 8𝑥 2 ) 2 𝑑𝑥 using Simpson’s 8 rule by taking 7 ordinates.
3
Sol: Given a = 0 , b = 0.3 , y = (1 − 8𝑥 2 ) ⁄2
𝑏−𝑎
Now, ℎ = ,𝑛=6
𝑛
0.3−0
ℎ= 6
𝒉 = 𝟎. 𝟎𝟓
0.3 3⁄ 3∗(0.05)
∫0 (1 − 8𝑥 2 ) 2 𝑑𝑥 =
8
[(1 + 0.1482) + 3(0.9702 + 0.8824 + 0.5607 + 0.3536) + 2(0.7425)]
𝟎.𝟑 𝟑⁄
∫𝟎 (𝟏 − 𝟖𝒙𝟐 ) 𝟐 𝒅𝒙 = 𝟎. 𝟐𝟎𝟓𝟎
1 𝑥2 3𝑡ℎ
5. Evaluate ∫0 𝑑𝑥 using Simpson’s 8 rule by taking 7 ordinates and hence find
1+𝑥 3
log2.
𝑥2
Sol: Given a = 0 , b = 1 , y = 1+𝑥 3
𝑏−𝑎
Now, ℎ = ,𝑛=6
𝑛
1−0
ℎ= 6
𝟏
𝒉=𝟔
𝒙 0 1 2 3 4 5 1
6 6 6 6 6
𝑥2 0 0.0276 0.1071 0.2222 0.3429 0.4399 0.5
y=
1 + 𝑥3
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2(𝑦3 )]
8
1 1
𝑥2 3∗𝟔
∫ 𝑑𝑥 = [(0 + 0.5) + 3(0.0267 + 0.1071 + 0.3429 + 0.4399) + 2(0.2222)]
1 + 𝑥3 8
0
𝟏 𝒙𝟐
∫𝟎 𝒅𝒙 = 𝟎. 𝟐𝟑𝟏𝟏
𝟏+𝒙𝟑
By integration,
1 𝑥2 1 1 3𝑥 2
∫0 𝑑𝑥 = 3 ∫0 𝑑𝑥
1+𝑥 3 1+𝑥 3
1
0.2311 = 3 [𝑙𝑜𝑔(1 + 𝑥 3 )]10
6 𝑑𝑥 3𝑡ℎ
6. Evaluate ∫0 using Simpson’s rule by taking 7 ordinates.
1+𝑥 2 8
1
Sol: Given a = 0 , b = 6 , y = 1+𝑥 2
𝑏−𝑎
Now, ℎ = ,𝑛=6
𝑛
6−0
ℎ= 6
𝒉=𝟏
𝒙 0 1 2 3 4 5 6
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦6 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 ) + 2(𝑦3 )]
8
6 1 3∗1
∫0 𝑑𝑥 = [(1 + 0.5) + 3(0.5 + 0.2 + 0.0588 + 0.0385) + 2(0.1)]
1+𝑥 2 8
𝟔 𝟏
∫𝟎 𝒅𝒙 = 𝟏. 𝟑𝟓𝟕𝟏
𝟏+𝒙𝟐
1 𝑥 3𝑡ℎ
7. Evaluate ∫0 𝑑𝑥 using Simpson’s 8 rule by taking 3 equal parts and hence find
1+𝑥 2
𝑙𝑜𝑔√2.
𝑥
Sol: Given a = 0 , b = 1 , y = 1+𝑥 2
𝑏−𝑎
Now, ℎ = ,𝑛=3
𝑛
1−0
ℎ= 3
𝟏
𝒉=𝟑
𝑥 0 𝟏 𝟐 1
𝟑 𝟑
𝑥 0 0.3 0.4615 0.5
y=
1 + 𝑥2
1
1 𝑥 3∗
∫0 1+𝑥 2 𝑑𝑥 = 3
[(0 + 0.5) + 3(0.3 + 0.4615)]
8
𝟏 𝒙
∫𝟎 𝒅𝒙 = 𝟎. 𝟑𝟒𝟖𝟏
𝟏+𝒙𝟐
By integration,
1 𝑥 1 1 2𝑥
∫0 1+𝑥 2 𝑑𝑥 = 2 ∫0 1+𝑥 2 𝑑𝑥
1
0.3481 = 2 [𝑙𝑜𝑔(1 + 𝑥 2 )]10
1
0.3481 = 2 [𝑙𝑜𝑔2 − 𝑙𝑜𝑔1]
1
𝑙𝑜𝑔2 = 0.3481
2
𝒍𝒐𝒈√𝟐 = 𝟎. 𝟑𝟒𝟖𝟏
𝜋
3𝑡ℎ
8. Evaluate ∫02 𝑒 𝑠𝑖𝑛𝑥 𝑑𝑥 using Simpson’s 8 rule by taking 3 equal parts.
𝜋
Sol: Given a = 0 , b = 2 , y = 𝑒 𝑠𝑖𝑛𝑥
𝑏−𝑎
Now, ℎ = ,𝑛=3
𝑛
𝜋
−0
ℎ= 2
3
𝜋
𝒉= = 30°
6
Wkt,
𝑏 3ℎ
∫𝑎 𝑦 𝑑𝑥 = [(𝑦0 + 𝑦3 ) + 3(𝑦1 + 𝑦2 )]
8
𝜋 𝜋
3∗
𝑠𝑖𝑛𝑥 [(1 + 2.7183) + 3(1.6487 + 2.3774)]
∫0 𝑒2 𝑑𝑥 = 6
8
𝝅
∫𝟎𝟐 𝒆𝒔𝒊𝒏𝒙 𝒅𝒙 = 𝟑. 𝟏𝟎𝟎𝟏