NUMERICAL METHODS
NUMERICAL METHODS
MATHEMATICS
NUMERICAL METHODS
https://mkuniversity.ac.in/dde/
PMATE23
NUMERICAL METHODS
WELCOME
Dear Students
NUMERICAL METHODS
Unit II: Introduction - Direct methods - Error analysis for direct methods -
iteration methods - Eigen values and Eigen vectors - Bounds on Eigen values.
Text Book :
Reference Book :
1.1: Introduction
Transcendental function:
A transcendental function is a function which does not satisfy the
polynomial equation whose coefficients are themselves as a polynomial.
The logarithmic and exponential functions are examples of
transcendental function.
Example:
Examples of algebraic function are rational function and square
root functions.
Definition:
The root of equation is of the form 𝑓 𝑥 = 0 ,
1
Definition:
SPACE FOR HINTS A number 𝜀 is a root of solution of 𝑓 𝑥 = 0 if 𝑓 𝜀 = 0 such a
solution 𝜀 is a root (or) a zero of 𝑓 𝑥 = 0.
Definition:
𝑚
If 𝑓 𝑥 = 𝑥 − 𝜉 𝑔 𝑥 = 0 where 𝑔(𝑥) is bounded and 𝑔(𝜉) ≠ 0
then 𝜉 is called a multiple root of multiplicity 𝑚.
In this case,
𝑓 𝜉 = 𝑓 ′ 𝜉 = ⋯ = 𝑓 𝑚 −1 𝜉 = 0
But 𝑓 𝑚 (𝜉) ≠ 0
Direct Methods:
In this method, we find the exact value of the roots in a finite
number of steps.
Example1.1.1:
The root of the linear (or) first degree equation 𝑎0 𝑥 + 𝑎1 = 0
where 𝑎0 ≠ 0
⟹ 𝑎0 𝑥 = −𝑎1
𝑎1
⟹𝑥=− 𝑎0
−𝑎1 ± 𝑎1 2 − 4𝑎0 𝑎2
𝑥=
2𝑎0
Iterative Methods:
These methods are based on the idea of successive approximations, i.e.,
Starting with one (or) more initial approximation to the root then we
obtain asequence of approximations (or) iterates {𝑥𝑘 } which in the limit
converges to the root.This method gives only one root at a time.
2
Definition:
SPACE OF HINTS
A sequence of iterates {𝑥𝑘 } is said to converge to the root 𝜉 if
lim𝑘→∞ 𝑥𝑘 − 𝜉 = 0
Note:
Initial approximations:
The initial approximation of the root can be obtained by using
graphical method (or) by Intermediate Value theorem.
Example1.1.2:
Solution:
𝑥 −2 −1 0 1 2 3
3
From the above table, we find that the equation 𝑓 𝑥 = 0 has roots in
SPACE FOR HINTS interval −1, 0 , (0, 1) and (1, 2). The exact roots are −0.5 , 0.5 , 1.5.
Example 1.2.1:
Perform five iterations of the bisection method to obtain the
smallest positive root of the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0.
Solution:
Given 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Now, put 𝑥 = 0; 𝑓 0 = 1
𝑥 = 1; 𝑓 1 = 1 − 5 + 1 = −3
4
∴ The smallest positive root lies in the interval 0, 1 .
SPACE OF HINTS
Let 𝑎0 = 0 and 𝑏0 = 1
𝑎 0 +𝑏0 0+1
Then 𝑚1 = = = 0.5
2 2
Example1.2.2:
Perform five iterations of the bisection method to obtain a root
of the equation 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0.
Solution:
Given 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0
Put 𝑥 = 0; 𝑓 0 = 1
𝑥 = 1; 𝑓 1 = −2.1780
5
5 0.5 0.5625 0.53125 +𝑣𝑒 −𝑣𝑒 <0
SPACE FOR HINTS
Hence the smallest positive root lies in the interval (0.5, 0.53125). The
approximate root of the equation is given by 0.515625.
Solution:
Given 𝑓 𝑥 = tan 𝑥 + tanh 𝑥 = 0
Put 𝑥 = 0 ; 𝑓 0 = 0
𝑥 = 1 ; 𝑓 1 = 2.319
𝑥 = 2 ; 𝑓 2 = −1.22
𝑥 = 3 ; 𝑓 3 = 0.852
6
8 2.36 2.37 2.37 −𝑣𝑒 +𝑣𝑒 <0
SPACE OF HINTS
∴ the root lies in the interval (2.36, 2.37) and the approximate root is
2.36 + 2.37
= 22.37
2
1.3: Iteration method based on first degree equation
If 𝑓 𝑥 = 0 is the first degree equation in 𝑥 then it can be written as
𝑓 𝑥 = 𝑎0 𝑥 + 𝑎1 = 0
⟹ 𝑎0 𝑥 = −𝑎1
−𝑎1
⟹ 𝑥= (1)
𝑎0
𝑓𝑘 = 𝑎0 𝑥𝑘 + 𝑎1 (3)
𝑓𝑘 − 𝑓𝑘−1
⟹ 𝑎1 = 𝑓𝑘 − 𝑥
𝑥𝑘 − 𝑥𝑘−1 𝑘
𝑓𝑘 𝑥𝑘 − 𝑥𝑘−1 − 𝑓𝑘 𝑥𝑘 + 𝑓𝑘−1 𝑥𝑘
=
𝑥𝑘 − 𝑥𝑘−1
𝑓𝑘 𝑥𝑘 − 𝑓𝑘 𝑥𝑘−1 − 𝑓𝑘 𝑥𝑘 + 𝑓𝑘−1 𝑥𝑘
𝑎1 =
𝑥𝑘 − 𝑥𝑘 −1
7
𝑓𝑘−1 𝑥𝑘 − 𝑓𝑘 𝑥𝑘−1
𝑎1 =
SPACE FOR HINTS 𝑥𝑘 − 𝑥𝑘−1
If the approximations are 𝑓𝑘 . 𝑓𝑘−1 < 0 then the above method is known
as Regula-Falsi method.
Example1.3.1:
A real root of the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0 lies in the interval
0,1 .Performfour iterations of the secant method and Regula-Falsi
method to obtain this root.
Solution:
8
Secant Method:
SPACE OF HINTS
Given 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Put 𝑥 = 0 ; 𝑓 0 = 1
𝑥 = 1 ; 𝑓 1 = −3
Where 𝑥0 = 0 , 𝑥1 = 1 , 𝑓0 = 1 , 𝑓1 = −3
1−0
∴ 𝑥2 = 1 − (−3)
−3 − 1
3
=1+ = 1 − 0.75
−4
𝑥2 = 0.25
𝑓2 = 𝑓 𝑥2 = 𝑓 0.25 = −0.2344
𝑥 2 −𝑥 1
Put 𝑘 = 2 ⇒ 𝑥3 = 𝑥2 − 𝑓2
𝑓2 −𝑓1
0.25 − 1
= 0.25 − −0.2344
−0.2344 + 3
0.1758
= 0.25 −
2.7656
= 0.25 − 0.0635
𝑥3 = 0.1864
𝑓3 = 𝑓 𝑥3 = 𝑓 0.1864 = 0.0745
𝑥 3 −𝑥 2
Put 𝑘 = 3 ⇒ 𝑥4 = 𝑥3 − 𝑓3
𝑓3 −𝑓2
0.1864 − 0.25
= 0.1864 − 0.0745
0.0745 + 0.2344
= 0.1864 + 0.0153
= 0.20173
9
𝑓4 = 𝑓 𝑥4 = 𝑓 0.20173 = −0.00044
SPACE FOR HINTS 𝑥 4 −𝑥 3
Put 𝑘 = 4 ⇒ 𝑥5 = 𝑥4 − 𝑓4
𝑓4 −𝑓3
0.20173 − 0.1864
= 0.20173 − (−0.00044)
−0.00044 − 0.0745
= 0.20173 + 0.00009
= 0.2016
Regula-Falsi Method:
𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1
The formula for Regula-Falsi method is
(𝑥𝑘 − 𝑥𝑘−1 )
𝑥𝑘+1 = 𝑥𝑘 − 𝑓
𝑓𝑘 − 𝑓𝑘−1 𝑘
𝑥 1 −𝑥 0
Put 𝑘 = 1 ⟹ 𝑥2 = 𝑥1 − 𝑓1
𝑓1 −𝑓0
𝑥2 = 0.25
𝑓2 = 𝑓 𝑥2 = 𝑓 0.25 = −0.2344
Now, 𝑓0 𝑓2 < 0
= (0, 0.25)
𝑥 2 −𝑥 1
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 − 𝑓2
𝑓2 −𝑓1
0.25 − 0
= 0.25 − (−0.2344)
−0.2344 − 1
0.0586
= 0.25 + = 0.25 − 0.0474
−1.2344
= 0.2025
𝑓3 = 𝑓 𝑥3 = 𝑓 0.2025 = −0.0042
Now, 𝑓0 𝑓3 < 0
10
= (0,0.2025)
SPACE OF HINTS
𝑥 3 −𝑥 2
Put 𝑘 = 3 ⇒ 𝑥4 = 𝑥3 − 𝑓3
𝑓3 −𝑓2
0.2025
= 0.2025 − (−0.0042)
−0.0042 − 1
= 0.2025 − 0.000846
= 0.2017
𝑓4 = 𝑓 𝑥4 = 𝑓 0.2017 = −0.00029
Now, 𝑓0 𝑓4 < 0
= (0,0.2017)
𝑥 4 −𝑥 3
Put 𝑘 = 4 ⇒ 𝑥5 = 𝑥4 − 𝑓4
𝑓4 −𝑓3
0.2017 − 0
= 0.2017 − (−0.00029)
−0.00029 − 1
= 0.2017 − 0.000058 = 0.2016
Example1.3.2:
Use the Secant and Regula-Falsi methods to determine the root of
the equation 𝑐𝑜𝑠𝑥 − 𝑥𝑒 𝑥 = 0
Solution:
Secant Method:
Given 𝑓 𝑥 = 𝑐𝑜𝑠𝑥 − 𝑥𝑒 𝑥 = 0
Put 𝑥 = 0 ⟹ 𝑓 0 =1
𝑥=1 ⟹ 𝑓 1 = −2.1779
Let 𝑥0 = 0 , 𝑓0 = 1 , 𝑥1 = 1 , 𝑓1 = −2.1779
11
(𝑥𝑘 − 𝑥𝑘−1 )
𝑥𝑘+1 = 𝑥𝑘 − 𝑓
SPACE FOR HINTS 𝑓𝑘 − 𝑓𝑘−1 𝑘
𝑥 1 −𝑥 0
Put 𝑘 = 1 ⟹ 𝑥2 = 𝑥1 − 𝑓1
𝑓1 −𝑓0
1−0
=1− −2.1779
−2.1779 − 1
= 1 − 0.6853
𝑥2 = 0.3147
𝑓2 = 𝑓 𝑥2 = 0.5198
𝑥 2 −𝑥 1
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 − 𝑓2
𝑓2 −𝑓1
0.3147 − 1
= 0.3147 − (0.5198)
0.5198 + 2.1779
= 0.3147 + 0.1320 = 0.4467
𝑓3 = 𝑓 𝑥3 = 0.2036
𝑥 3 −𝑥 2
Put 𝑘 = 3 ⟹ 𝑥4 = 𝑥3 − 𝑓3
𝑓3 −𝑓2
0.4467 − 0.3147
= 0.4467 − (0.2036)
0.2036 − 0.5198
= 0.4467 + 0.0849
= 0.5316
𝑓4 = 𝑓 𝑥4 = −0.0426
𝑥 4 −𝑥 3
Put 𝑘 = 4 ⇒ 𝑥5 = 𝑥4 − 𝑓4
𝑓4 −𝑓3
0.5316 − 0.4467
= 0.5316 − (−0.0426)
−0.0426 − 0.2036
= 0.5316 − 0.0147
= 0.5169
𝑓5 = 𝑓 𝑥5 = 0.0026
𝑥 5 −𝑥 4
Put 𝑘 = 5 ⟹ 𝑥6 = 𝑥5 − 𝑓5
𝑓5 −𝑓4
12
0.5169 − 0.5136 SPACE OF HINTS
= 0.5169 − 0.0026
0.0026 + 0.0426
= 0.5169 − 0.000189
= 0.5168 = 0.5167
𝑓6 = 𝑓 𝑥6 = 0.0032
𝑥 6 −𝑥 5
Put 𝑘 = 6 ⟹ 𝑥7 = 𝑥6 − 𝑓6
𝑓6 −𝑓5
0.5177 − 0.5170
= 0.5177 − (0.0017)
0.0017 − 0.0023
= 0.5177 + 0.00007
= 0.5177
𝑓7 = 𝑓 𝑥7 = 0.00017
Regula-Falsi Method:
Given the initial values are
𝑥=0 ⟹ 𝑓 0 =1
𝑥=1 ⟹ 𝑓 1 = −2.1779
Now 𝑓1 𝑓2 < 0
= (0.3147,1)
𝑥 1 −𝑥 2
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥1 − 𝑓1
𝑓1 −𝑓2
1 − 0.3147
=1− (−2.1779)
−2.1779 − 0.5198
= 1 − 0.5533
= 0.4476
13
𝑓3 = 𝑓 𝑥3 = 0.2036
SPACE FOR HINTS
Now 𝑓1 𝑓3 < 0
= 0.4940
𝑓4 = 𝑓 𝑥4 = 0.0708
Now 𝑓1 𝑓4 < 0
= 0.51
𝑓5 = 𝑓 𝑥5 = 0.0234
Now 𝑓1 𝑓3 < 0
= 0.5286
𝑓6 = 𝑓 𝑥6 = −0.0332
14
Now 𝑓5 𝑓6 < 0
SPACE OF HINTS
∴In the next iteration the interval 𝐼 = (0.51,0.5286)
𝑥6 − 𝑥5
⟹ 𝑥7 = 𝑥6 − 𝑓
𝑓6 − 𝑓5 6
0.5286 − 0.51
= 0.5286 − (−0.0332)
−0.0332 − 0.0234
= 0.5286 − 0.0109 = 0.5177
∴ the Secant and Regula-Falsi Method the approximate root of the given
equation is 0.5177
𝑓 ′ 𝑥𝑘 = 𝑎0 (2)
∴ (1)⇒𝑓 𝑥𝑘 = 𝑓 ′ 𝑥𝑘 𝑥𝑘 + 𝑎1
⟹ 𝑎1 = 𝑓 𝑥𝑘 − 𝑓 ′ 𝑥𝑘 𝑥𝑘 (3)
−𝑎 1
The solution for (1) is 𝑥𝑘+1 = where 𝑎0 ≠ 0 (4)
𝑎0
Example 1.3.3:
Perform four iterations of thee Newton – Raphson method to find the
smallestpositive root of the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
15
Solution:
SPACE FOR HINTS Given that 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0 (1)
𝑓 ′ 𝑥 = 3𝑥 2 − 5
Put 𝑥 = 0 ; 𝑓 0 = 1
𝑥 =1; 𝑓 1 =1−5+1=3
𝑥𝑘 +1
𝑓 𝑥𝑘
= 𝑥𝑘 − (2)
𝑓 ′ 𝑥𝑘
𝑓 𝑥0
Put 𝑘 = 0 ⟹ 𝑥1 = 𝑥0 −
𝑓 ′ 𝑥0
1 1
=0− = = 0.2
−5 5
𝑓 𝑥1 = 𝑓 0.2 = 0.008
𝑓 ′ 𝑥1 = 𝑓 ′ 0.2 = −4.88
𝑓 𝑥1
Put 𝑘 = 1 ⟹ 𝑥2 = 𝑥1 −
𝑓 ′ 𝑥1
0.008
= 0.2 −
−4.88
= 0.2 + 0.00163
= 0.20164
𝑓 𝑥2 = 0.008
𝑓 ′ 𝑥2 = −4.8780
𝑓 𝑥2
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 −
𝑓 ′ 𝑥2
0.008
= 0.20164 −
−4.8780
= 0.20164
16
𝑓 𝑥3 = 𝑓 0.20164 = −0.0000016
SPACE OF HINTS
′ ′
𝑓 𝑥3 = 𝑓 0.20164 = −4.8780
𝑓 𝑥4 = 𝑓 0.20164 = −0.0000016
𝑓 ′ 𝑥3 = 𝑓 ′ 0.20164 = -4.8780
In the forth iteration the approximate value of given equation is
𝑥 = 0.20164
Example1.3.4:
Perform four iterations of the Newton Raphson method to obtain the
1
approximation value of (17) 3. Starting with initial approximation
𝑥0 = 2.
Solution:
1
Let the approximation value 𝑥 = (17) 3
⟹ 𝑥 3 = 17
⟹ 𝑥 3 − 17 = 0
∴ 𝑓 𝑥 = 𝑥 3 − 17 = 0
𝑓 ′ 𝑥 = 3𝑥 2
Given 𝑥0 = 2
∴ 𝑓 𝑥0 = 𝑓 2 = −9
𝑓 ′ 𝑥0 = 𝑓 ′ 2 = 12
𝑓 𝑥𝑘
The general formula for Newton-Raphson Method is 𝑥𝑘+1 = 𝑥𝑘 −
𝑓 ′ 𝑥𝑘
17
𝑓 𝑥0
Put 𝑘 = 0 ⟹ 𝑥1 = 𝑥0 −
𝑓 ′ 𝑥0
SPACE FOR HINTS
−9
=2−
12
= 2.75
𝑓 𝑥1 = 3.7969
𝑓 ′ 𝑥1 = 22.6875
𝑓 𝑥1
Put 𝑘 = 1 ⟹ 𝑥2 = 𝑥1 −
𝑓 ′ 𝑥1
3.7969
= 2.75 −
22.6875
= 2.5826
𝑓 𝑥2 = 0.2255
𝑓 ′ 𝑥2 = 20.0095
𝑓 𝑥2
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 −
𝑓 ′ 𝑥2
0.2255
= 2.5826 −
20.0095
= 2.5713
𝑓 𝑥3 = 0.000365
𝑓 ′ 𝑥3 = 19.8348
𝑓 𝑥3
Put 𝑘 = 3 ⟹ 𝑥4 = 𝑥3 −
𝑓 ′ 𝑥3
0.000365
= 2.5713 −
19.8348
= 2.5713
Example1.3.5:
Apply Newton-Raphson Method to determine a root of the
equation 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0 such that 𝑓 𝑥 ∗ < 10−8 where 𝑥 ∗
is the approximation to the root. Take the initial approximation 𝑥0 = 1
18
SPACE OF HINTS
Solution:
Let 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥
𝑓 ′ 𝑥 = − sin 𝑥 − (𝑒 𝑥 + 𝑥𝑒 𝑥 )
Given 𝑥0 = 1
𝑓 𝑥0 = 𝑓 1 = −2.1780
𝑓 ′ 𝑥0 = −6.2780
𝑓 𝑥𝑘
The general formula for Newton-Raphson Method is 𝑥𝑘+1 = 𝑥𝑘 −
𝑓 ′ 𝑥𝑘
𝑓 𝑥0
Put 𝑘 = 0 ⟹ 𝑥1 = 𝑥0 −
𝑓 ′ 𝑥0
2.1780
=1+
−6.2780
= 0.6531
𝑓 𝑥1 = −0.4607
𝑓 ′ 𝑥1 = −3.7841
𝑓 𝑥1
Put 𝑘 = 1 ⟹ 𝑥2 = 𝑥1 −
𝑓 ′ 𝑥1
0.4607
= 0.6531 +
−3.7841
= 0.5341
𝑓 𝑥2 = −0.04198
𝑓 ′ 𝑥2 =-3.1121
𝑓 𝑥2
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 −
𝑓 ′ 𝑥2
0.04198
= 0.5314 +
−3.1121
= 0.5179
𝑓 𝑥3 = −0.00043
𝑓 ′ 𝑥3 =-3.0429
19
𝑓 𝑥3
Put 𝑘 = 3 ⟹ 𝑥4 = 𝑥3 −
𝑓 ′ 𝑥3
SPACE FOR HINTS
0.00043
= 0.5179 +
−3.0429
= 0.5178
𝑓 𝑥4 = −0.00013
𝑓 ′ 𝑥4 = −3.0423
𝑓 𝑥4
Put 𝑘 = 4 ⟹ 𝑥5 = 𝑥4 −
𝑓 ′ 𝑥4
0.00013
= 0.5178 +
−3.0423
= 0.5178
Example1.3.6:
1
Show that the initial approximation 𝑥0 for finding , where 𝑁 is a
𝑁
Solution:
1
Given 𝑥0 =
𝑁
1 1
(i.e.) 𝑥= ⟹𝑁=
𝑁 𝑥
1 1
⟹𝑁− =0= −𝑁 =0
𝑥 𝑥
1
∴𝑓 𝑥 = −𝑁 (1)
𝑥
1
𝑓′ 𝑥 = − (2)
𝑥2
𝑓 𝑥𝑘
The general formula for Newton-Raphson method is 𝑥𝑘 +1 = 𝑥𝑘 −
𝑓 ′ 𝑥𝑘
1
∴ 𝑓 𝑥𝑘 = −𝑁
𝑥𝑘
20
𝑓 ′ 𝑥𝑘 = −1/𝑥𝑘 2
SPACE OF HINTS
1
( − 𝑁)
𝑥𝑘
𝑥𝑘 +1 = 𝑥𝑘 − 1
−
𝑥𝑘 2
1−𝑁𝑥 𝑘 )
( )
𝑥𝑘
= 𝑥𝑘 + 1
𝑥𝑘 2
1 𝑁𝑥 𝑘
+ (1 − )
𝑥𝑘 𝑥𝑘
= 1
𝑥𝑘 2
2 − 𝑁𝑥𝑘 𝑥𝑘 2
= ×
𝑥𝑘 1
= 2 − 𝑁𝑥𝑘 𝑥𝑘 (3)
1
Now draw the graph for equations 𝑥 = and𝑥𝑘+1 = (2 − 𝑁𝑥𝑘 )𝑥𝑘
𝑁
1
(i.e.) 𝑦 = 𝑥 = & 𝑦 = 2 − 𝑁𝑥 𝑥
𝑁
𝑦𝑦 = 𝑥
1 1
( , )
𝑁 𝑁
(0,0) 𝑥
2
( , 0)
𝑁
2
From the graph, the initial approximation must satisfy 0 < 𝑥0 < for
𝑁
converges.
21
2
The initial approximation outside the range 0 < 𝑥0 < , the method
𝑁
SPACE FOR HINTS
diverges.
(i.e.) 𝑓 𝑥 = 𝑎0 𝑥 2 + 𝑎1 𝑥 + 𝑎2 = 0 𝑎0 ≠ 0 (1)
Muller Method:
If𝑥𝑘−2 , 𝑥𝑘−1 , &𝑥𝑘−1 and 𝑥𝑘 are three approximations to the root 𝜉
of 𝑓 𝑥 = 0, thento determine 𝑎0 , 𝑎1 , 𝑎2 by using the conditions.
𝑓𝑘 = 𝑓 𝑥𝑘 = 𝑎0 𝑥 2 𝑘 + 𝑎1 𝑥𝑘 + 𝑎2
𝑓(𝑥) 𝑥2 𝑥 1
2
𝑓𝑘−2 𝑥 𝑘−2 𝑥𝑘−2 1
𝑓𝑘−1 𝑥 2 𝑘−1 𝑥𝑘−1 1 = 0
𝑓𝑘 𝑥2𝑘 𝑥𝑘 1
𝑥 2 𝑘−2 𝑥𝑘−2 1 𝑥2 𝑥 1
𝑓 𝑥 𝑥 2 𝑘−1 𝑥𝑘−1 1 − 𝑓𝑘−2 𝑥 2 𝑘−1 𝑥𝑘−1 1
𝑥2 𝑘 𝑥𝑘 1 𝑥2𝑘 𝑥𝑘 1
𝑥2 𝑥 1 𝑥2 𝑥 1
2 2
+ 𝑓𝑘−1 𝑥 𝑘−2 𝑥𝑘 −2 1 − 𝑓𝑘 𝑥 𝑘−2 𝑥𝑘−2 1 =0
𝑥2 𝑘 𝑥𝑘 1 𝑥2 𝑘 𝑥𝑘 1
On simplification, we get
22
𝑥 − 𝑥𝑘 −1 (𝑥 − 𝑥𝑘 )
𝑓 𝑥 = 𝑓 SPACE OF HINTS
𝑥𝑘−2 − 𝑥𝑘 −1 (𝑥𝑘−2 − 𝑥𝑘 ) 𝑘 −2
𝑥 − 𝑥𝑘−2 (𝑥 − 𝑥𝑘 )
+ 𝑓
𝑥𝑘−1 − 𝑥𝑘−2 (𝑥𝑘−1 − 𝑥𝑘 ) 𝑘−1
𝑥 − 𝑥𝑘 −2 (𝑥 − 𝑥𝑘−1 )
+ 𝑓
𝑥𝑘 − 𝑥𝑘 −2 (𝑥𝑘 − 𝑥𝑘−1 ) 𝑘
Since 𝑓 𝑥 = 0,
=0
⟹ 2 𝑘 + 𝑘 2 𝑓𝑘−2
− 2 𝑘 + 2 𝑘−1 + 𝑘 2 + 𝑘 𝑘−1 + 𝑘 𝑘−1
+ 𝑘−1 2 𝑓𝑘−1
⟹ 2 𝑘 + 𝑘 2 𝑓𝑘−2
− 2 𝑘 + 2 𝑘−1 + 𝑘 2 + 𝑘−1 2 + 2 𝑘 𝑘−1 𝑓𝑘−1
+ (2 𝑘−1 + 𝑘−1 2 + 𝑘 2 𝑘−1 + 𝑘 𝑘−1 2
+ 2𝑘 𝑘−1 ) 𝑓𝑘 = 0
23
𝑘
Let 𝜆 = , 𝜆𝑘 = ⇒ 𝜆𝜆𝑘 =
𝑘 𝑘−1 𝑘−1
SPACE FOR HINTS
Dividing above equation by 𝑘 2 𝑘−1 , we get
2
𝑘 𝑘
+ 𝑓
𝑘 𝑘−1 𝑘−1 𝑘−2
2 2
𝑘 𝑘 𝑘−1
− + + + . + 2. 𝑓
𝑘 𝑘−1 𝑘 𝑘−1 𝑘 𝑘 𝑘 𝑘−1
2
𝑘−1 𝑘−1
+ + . +1+ + 2. 𝑓𝑘 = 0
𝑘 𝑘 𝑘 𝑘 𝑘
1
⟹ 𝜆2 𝜆𝑘 + 𝜆. 𝜆𝑘 𝑓𝑘−2 − 𝜆2 . 𝜆𝑘 + 𝜆2 + 𝜆. 𝜆𝑘 + 𝜆. + 2𝜆 𝑓𝑘−1
𝜆𝑘
1 1
+ 𝜆2 + 𝜆. + 1 + + 2𝜆 𝑓𝑘 = 0
𝜆𝑘 𝜆𝑘
+ 𝜆2 𝜆𝑘 + 𝜆 + 𝜆𝑘 + 1 + 2. 𝜆. 𝜆𝑘 𝑓𝑘 = 0
⟹ 𝜆2 𝜆𝑘 2 𝑓𝑘−2 − 𝜆𝑘 2 𝑓𝑘−1 − 𝜆𝑘 𝑓𝑘 −1 + 𝜆𝑘 𝑓𝑘
⟹ 𝜆2 . 𝜆𝑘 𝜆𝑘 𝑓𝑘−2 − 𝜆𝑘 𝑓𝑘−1 − 𝑓𝑘 −1 + 𝑓𝑘
+ 𝜆 𝜆𝑘 2 𝑓𝑘−2 − 𝜆𝑘 2 𝑓𝑘 −1 − 𝑓𝑘−1 − 2𝜆𝑘 𝑓𝑘−1 + 𝑓𝑘 − 2𝜆𝑘 𝑓𝑘
+ 𝜆𝑘+1 𝑓𝑘 = 0
24
Take 1 + 𝜆𝑘 = 𝛿𝑘
SPACE OF HINTS
2 2 2
⟹ 𝜆 . 𝜆𝑘 𝜆𝑘 𝑓𝑘−2 − 𝛿𝑘 𝑓𝑘−1 + 𝑓𝑘 + 𝜆 𝜆𝑘 𝑓𝑘−2 − 𝛿𝑘 𝑓𝑘−1
+ 𝛿𝑘 + 𝜆𝑘 𝑓𝑘 + 𝛿𝑘 𝜆𝑘 = 0 (3)
∴ 3 ⟹ 𝜆2 𝑐𝑘 + 𝜆𝑔𝑘 + 𝛿𝑘 𝑓𝑘 = 0
1
The above equation is quadratic equation in ,
𝜆
Here 𝑎 = 𝛿𝑘 𝑓𝑘 , 𝑏 = 𝑔𝑘 , 𝑐 = 𝑐𝑘
1 −𝑏 ± 𝑏2 − 4𝑎𝑐 𝑔𝑘 2 − 4𝛿𝑘 𝑓𝑘 𝑐𝑘
= = −𝑔𝑘 ±
𝜆 2𝑎 2𝛿𝑘 𝑓𝑘
−2𝛿𝑘 𝑓𝑘
𝜆=
𝑔𝑘 ± 𝑔𝑘 2 − 𝛿𝑘 𝑓𝑘 𝑐𝑘
𝜆 = 𝜆𝑘+1
The sign in the denominators is chosen such that 𝜆𝑘+1 has the smallest
absolute value. We also know that
(𝑥 − 𝑥𝑘 )
𝜆 = 𝜆𝑘+1 = =
𝑘 (𝑥𝑘 − 𝑥𝑘−1 )
(𝜆𝑘+1 ) 𝑥𝑘 − 𝑥𝑘−1 = 𝑥 − 𝑥𝑘
Note:
In Muller method the following conditions are needed
25
i) = 𝑥 − 𝑥𝑘 ; 𝑘 = 𝑥𝑘 − 𝑥𝑘−1
SPACE FOR HINTS 𝑘
ii) 𝜆𝑘 = and 𝛿𝑘 = 1 + 𝜆𝑘
𝑘−1
𝑐𝑘 = 𝜆𝑘 𝜆𝑘 𝑓𝑘−2 − 𝛿𝑘 𝑓𝑘−1 + 𝑓𝑘
−2𝛿 𝑘 𝑓 𝑘
iv) 𝜆𝑘+1 =
𝑔 𝑘 ± 𝑔 𝑘 2 −4𝛿 𝑘 𝑓 𝑘 𝑐 𝑘
Example 1.4.1:
Perform three iterations of the Muller methods to find the smallest
positive rootof the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Solution:
Given 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Let 𝑥 = 0 ; 𝑓 𝑥 = 1
𝑥 = 1 ; 𝑓 1 = 1 − 5 + 1 = −3
∴ The smallest positive root of the given equation lies in the interval
(0, 1).
∴ 𝑓0 = 1 , 𝑓1 = −1.375 , 𝑓2 = −3
First iteration:
i) 𝑘 = 𝑥𝑘 − 𝑥𝑘−1
𝑘 = 1 ⟹ 1 = 𝑥1 − 𝑥0
= 0.5
𝑘 = 2 ⟹ 2 = 𝑥2 − 𝑥1
= 1 − 0.5 = 0.5
𝑘
ii) 𝜆𝑘 =
𝑘−1
2
𝑘 = 2 ⟹ 𝜆2 =
1
26
0.5
= =1 SPACE OF HINTS
0.5
𝛿𝑘 = 1 + 𝜆𝑘
Put 𝑘 = 2 ⟹ 𝛿2 = 1 + 𝜆2
=1+1=2
Put 𝑘 = 2 ⟹ 𝑐2 = 𝜆2 𝜆2 𝑓0 − 𝛿2 𝑓1 + 𝑓2
= 1 1.1 − 2 −1.375 + −3
= 1 + 2.75 − 3 = 0.75
−2𝛿 𝑘 𝑓 𝑘
iv) 𝜆𝑘+1 =
𝑔 𝑘 ± 𝑔 𝑘 2 −4𝛿 𝑘 𝑓 𝑘 𝑐 𝑘
−2𝛿 2 𝑓2
Put 𝑘 = 2 ⟹ 𝜆3 =
𝑔2 ± 𝑔2 2 −4𝛿 2 𝑓2 𝑐2
−2𝛿2 −3
=
−2.5 − −2.5 2 − 4 × 2 × −3 (0.75)
12
=
−2.5 ± 24.25
12
= = −1.61629
−2.5 − 24.25
v) 𝑥𝑘+1 = 𝑥𝑘 + 𝜆𝑘+1 𝑥𝑘 − 𝑥𝑘−1
Put 𝑘 = 2 ⇒ 𝑥3 = 𝑥2 + 𝜆3 𝑥2 − 𝑥1
= 1 + 1 − 0.5 (−1.61629)
= 0.19185
𝑓3 = 0.04781
27
Second iteration:
SPACE FOR HINTS i) 3 = 𝑥3 − 𝑥2
= 0.80815
3
ii) 𝜆3 =
2
0.80815
=− = −1.6163
0.5
𝛿3 = 1 + 𝜆3
= 1 − 1.6163 = −0.6163
= −2.5593
𝑐3 = 𝜆3 𝜆3 𝑓1 − 𝛿3 𝑓2 + 𝑓3
= −0.68098
−2𝛿 3 𝑓3
iv) 𝜆4 =
𝑔3 ± 𝑔3 2 −4𝛿 3 𝑓3 𝑐3
−2 −0.6163 (0.04781)
=
−2.5593 − (−2.5593)2 − 4 −0.6163 −0.68095 (0.04781)
0.058930
=
−2.5593 − 6.46975
0.058930
=
−5.10287
= −0.01154
v) 𝑥4 = 𝑥3 + 𝜆4 𝑥3 − 𝑥2
= 0.19185 + 0.19185 − 1 (−0.01154)
= 0.20118
28
𝑓 𝑥 = 0.002248
SPACE OF HINTS
Third iteration:
i) 4 = 𝑥4 − 𝑥3
= 0.20118 − 0.19185 = 0.00933
4
ii) 𝜆4 =
3
0.00933
= = −0.01154
−0.80815
𝛿4 = 1 + 𝜆4
= 1 − 0.01154 = 0.98846
iii) 𝑔4 = 𝜆4 2 𝑓2 − 𝛿4 2 𝑓3 + (𝜆4 + 𝛿4 )𝑓4
2 2
= −0.01154 −3 − 0.98846 0.04781
+ 0.98846 − 0.01154 0.002242
= −0.04
𝑐4 = 𝜆4 𝜆4 𝑓2 − 𝛿4 𝑓3 + 𝑓4
−2𝛿4 𝑓4
𝜆5 =
𝑔4 ± 𝑔4 2 − 4𝛿4 𝑓4 𝑐4
−2 × 0.98846(0.002242)
=
−0.04492 − (−0.04492)2 − 4.098864 0.00012 (0.002242)
−0.004432
=
−0.04492 − 0.00201674
−0.004432
= = 0.04933
−0.089828
iv) 𝑥5 = 𝑥4 + 𝜆5 𝑥4 − 𝑥3
= 0.20118 + 0.20118 − 0.19185 0.04933
= 0.201640248
29
Example1.4.2:
SPACE FOR HINTS Perform five iteration of the Muller Method to find the root of the
equation 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥
Solution:
Given that 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥
Put 𝑥 = 0 ; 𝑓 0 = 1
𝑥 = 1 ; 𝑓 1 = −2.1780
First iteration:
Let 𝑥0 = 0 , 𝑥1 = 0.5 , 𝑥2 = 1
𝑓0 = 1 , 𝑓1 = 0.0532 , 𝑓2 = −2.1780
i) 1 = 𝑥1 − 𝑥0 = 0.5
2 = 𝑥2 − 𝑥1 = 0.5
2
ii) 𝜆2 = =1
1
𝛿2 = 1 + 𝜆2 = 2
iii) 𝑔2 = 𝜆2 2 𝑓0 − 𝛿2 2 𝑓1 + (𝜆2 + 𝛿2 )𝑓2
2 2
= 1 1 − 2 0.0532 + 3 (−2.17801)
= −5.7468
𝑐2 = 𝜆2 𝜆2 𝑓0 − 𝛿2 𝑓1 + 𝑓2
= 1(1.1 − 2 0.0532 − 2.17801)
= −1.2844
−2𝛿 2 𝑓2
iv) 𝜆3 =
𝑔2 ± 𝑔2 2 −4𝛿 2 𝑓2 𝑐2
−2 2 (−2.1780)
=
−5.7468 − (−5.7468)2 − 4 × 2 × −2.1780 (−1.2844)
8.712
=
−5.7468 − 10.64632
8.712
= = −0.96789
−9.0009669
30
v) 𝑥3 = 𝑥2 + 𝜆3 𝑥2 − 𝑥1
SPACE OF HINTS
= 1 + 0.5 (−0.96789)
= 0.516055
𝑓3 = 0.00503
Second iteration:
i) 3 = 𝑥3 − 𝑥2
= 0.5161 − 1 = −0.4839
3
ii) 𝜆3 =
2
−0.4839
= = −0.967
0.5
𝛿3 = 1 + 𝜆3 = 1 − 0.9678 = 0.0322
𝑔3 = 𝜆3 2 𝑓1 − 𝛿3 2 𝑓2 + (𝜆3 + 𝛿3 )𝑓3
2 2
= −0.9678 0.0532 − 0.0322 −2.1780
+ −0.9678 + 0.0322 0.00503
= 0.04738
𝑐3 = 𝜆3 𝜆3 𝑓1 − 𝛿3 𝑓2 + 𝑓3
= −0.0229
−2𝛿 3 𝑓3
iii) 𝜆4 =
𝑔3 ± 𝑔3 2 −4𝛿 3 𝑓3 𝑐3
−2 0.0322 (0.00503)
=
0.04738 + 0.04738 2 − 4 0.0322 0.00503 (−0.0229)
−0.000323
=
0.04738 + 0.0022597
−0.000323
= = −0.00340
0.094916
iv) 𝑥4 = 𝑥3 + 𝜆4 𝑥3 − 𝑥2
31
= 0.5161 + 0.5161 − 1 −0.00340 = 0.51775
SPACE FOR HINTS
𝑓4 = 0.000224
Third iteration:
i) 4 = 𝑥4 − 𝑥3
= 0.51775 − 0.516055 = 0.00165
4
ii) 𝜆4 =
3
0.00165
= = −0.0034
−0.4839
𝛿4 = 1 + 𝜆4
= 1 − 0.0034 = 0.9966
𝑐4 = 𝜆4 𝜆4 𝑓2 − 𝛿4 𝑓3 + 𝑓4
= −0.0000088
−2𝛿 4 𝑓4
iv) 𝜆5 =
𝑔4 ± 𝑔4 2 −4𝛿 4 𝑓4 𝑐4
−2 0.9966 (0.000224)
=
−0.00479 − (−0.00479)2 − 4 0.9966 0.000224 (−0.0000088)
−0.000446
= = 0.0000465
−9.58000
v) 𝑥5 = 𝑥4 + 𝜆5 𝑥4 − 𝑥3
= 0.51775
𝑓5 = 0.000224
32
Chebyshev Method:
SPACE OF HINTS
Let 𝑓 𝑥 = 𝑎0 𝑥 2 + 𝑎1 𝑥 + 𝑎2 = 0 (1)
Then 𝑓𝑘 = 𝑎0 𝑥𝑘 2 + 𝑎1 𝑥𝑘 + 𝑎2 (2)
𝑓𝑘 ′ = 2𝑎0 𝑥𝑘 + 𝑎1 (3)
𝑓 𝑘 ′′
𝑓𝑘 ′′ = 2𝑎0 ⇒𝑎0 = (4)
2
2𝑓𝑘 ′′ ′
3 ⟹ 𝑓𝑘 = 𝑥 + 𝑎1
2 𝑘
⟹ 𝑎1 = 𝑓𝑘 ′ − 𝑓𝑘 ′′ 𝑥𝑘 (5)
𝑓𝑘 ′′ 2
2 ⟹ 𝑓𝑘 = 𝑥𝑘 + 𝑓𝑘 ′ − 𝑓𝑘 ′′ 𝑥𝑘 𝑥𝑘 + 𝑎2
2
𝑓𝑘 ′′ 2
⟹ 𝑎2 = 𝑓𝑘 − 𝑥𝑘 + 𝑓𝑘 ′ − 𝑓𝑘 ′′ 𝑥𝑘 𝑥𝑘
2
𝑓𝑘 ′′ 2
= 𝑓𝑘 − 𝑥𝑘 − 𝑓𝑘 ′ 𝑥𝑘 + 𝑓𝑘 ′′ 𝑥𝑘 2
2
′𝑓𝑘 ′′ 𝑥𝑘 2
= 𝑓𝑘 − 𝑓𝑘 𝑥𝑘 +
2
Substituting 𝑎0 , 𝑎1 , 𝑎2 in (1) we get
1 ⟹𝑓 𝑥 =0
𝑓 𝑘 ′′ 𝑓 𝑘 ′′ 𝑥 𝑘 2
(i.e.) 𝑥 2 + 𝑓𝑘 ′ − 𝑓𝑘 ′′ 𝑥𝑘 𝑥 + 𝑓𝑘 − 𝑓𝑘 ′ 𝑥𝑘 + =0
2 2
𝑓𝑘 ′′ 2
⟹ 𝑥 − 2 𝑥𝑘 𝑥 + 𝑥𝑘 2 + 𝑓𝑘 𝑥 − 𝑥𝑘 + 𝑓𝑘 = 0
2
𝑓𝑘 ′′
⟹ (𝑥 − 𝑥𝑘 )2 + 𝑓𝑘 ′ 𝑥 − 𝑥𝑘 + 𝑓𝑘 = 0
2
′ 𝑓𝑘 ′′
𝑓𝑘 + 𝑓𝑘 𝑥 − 𝑥𝑘 + (𝑥 − 𝑥𝑘 )2 = 0
2
The above equation is the Taylor series expansion of 𝑓(𝑥) and higher
powers are neglected.
33
𝑥 − 𝑥𝑘 (𝑥 − 𝑥𝑘 )2 ′′
∴ 𝑓𝑘 ′ = −𝑓𝑘 − 𝑓𝑘
SPACE FOR HINTS 1! 2!
−𝑓𝑘 (𝑥 − 𝑥𝑘 )2 ′′
⟹ 𝑥 − 𝑥𝑘 = ′ − 𝑓𝑘
𝑓𝑘 2
−𝑓𝑘 (𝑥 − 𝑥𝑘 )2 𝑓𝑘 ′′
⟹ 𝑥 − 𝑥𝑘 = ′ −
𝑓𝑘 2 𝑓𝑘 ′
Replace 𝑥 by 𝑥𝑘 +1 we get
−𝑓𝑘 𝑥𝑘+1 − 𝑥𝑘 2
𝑓𝑘 ′′
⟹ 𝑥𝑘+1 − 𝑥𝑘 = ′ − (6)
𝑓𝑘 2 𝑓𝑘 ′
By Newton-raphson method,
𝑓𝑘
𝑥𝑘+1 = 𝑥𝑘 −
𝑓𝑘 ′
𝑓𝑘
⟹ 𝑥𝑘+1 − 𝑥𝑘 = − (7)
𝑓𝑘 ′
Example1.4.3:
Perform two iterations of the Chebyshev method to find the smallest
positive root of the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Solution:
Given that 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Put 𝑥 = 0 ; 𝑓 0 = 1
𝑥 = 1 ; 𝑓 1 = −3
34
∴ The smallest root lies in the interval (0, 1).
SPACE OF HINTS
Take the initial approximation as 𝑥0 = 0.5
𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 ⟹ 𝑓 0.5 = −1.375 = 𝑓0
𝑓 ′ 𝑥 = 3𝑥 2 − 5 ⟹ 𝑓 ′ 0.5 = −4.25 = 𝑓0 ′
𝑓 ′′ 𝑥 = 6𝑥 ⟹ 𝑓 ′′ 0.5 = 3 = 𝑓0 ′′
The formula for Chebyshev Method is
2
𝑓𝑘 1 −𝑓𝑘 𝑓𝑘 ′′
𝑥𝑘+1 = 𝑥𝑘 − ′ − ( ′)
𝑓𝑘 2 𝑓𝑘 ′ 𝑓𝑘
First iteration:
𝑓0 1 𝑓 𝑓0 ′′
Put 𝑘 = 0 ⇒ 𝑥1 = 𝑥0 − − ( 0′ )2
𝑓0 ′ 2 𝑓0 𝑓0 ′
𝑥1 = 0.213413
𝑓 𝑥1 = −0.05734
𝑓 ′ 𝑥1 = −4.88336
𝑓 ′′ 𝑥1 = 1.28047
Second iteration:
𝑓1 1 𝑓 𝑓1 ′′
Put 𝑘 = 1 ⇒ 𝑥2 = 𝑥1 − − ( 1′ )2
𝑓1 ′ 2 𝑓1 𝑓1 ′
= 0.20164
Example1.4.4:
Perform two iteration of the Chebyshev method to find an
1
approximate value of .Take the initial approximation as 𝑥0 = 0.1
7
Solution:
1 1
Let 𝑥 = ⟹ 7 =
7 𝑥
35
1
⟹ −7=0
SPACE FOR HINTS 𝑥
1
𝑓 𝑥 = −7=0
𝑥
−1
𝑓′ 𝑥 =
𝑥2
2
𝑓 ′′ 𝑥 =
𝑥3
Given initial approximation 𝑥0 = 0.1
1
𝑓 𝑥 = −7 ⟹ 𝑓 0.1 = 3
𝑥
−1
𝑓′ 𝑥 = ⟹ 𝑓 ′ 0.1 = −100
𝑥2
2
𝑓 ′′ 𝑥 = ⟹ 𝑓 ′′ 0.1 = 2000
𝑥3
The general formula for Chebyshev method is
2
𝑓𝑘 1 −𝑓𝑘 𝑓𝑘 ′′
𝑥𝑘+1 = 𝑥𝑘 − ′ − ( ′)
𝑓𝑘 2 𝑓𝑘 ′ 𝑓𝑘
First iteration:
𝑓0 1 𝑓 𝑓0 ′′
Put 𝑘 = 0 ⇒ 𝑥1 = 𝑥0 − − ( 0′ )2
𝑓0 ′ 2 𝑓0 𝑓0 ′
2
3 1 3 2000
= 0.1 − − ( )
100 2 −100 −100
= 0.1 + 0.03 + 0.00045 × 20 = 0.139
𝑓 0.139 = 0.19424
𝑓 ′ 0.139 = −51.75716
𝑓 ′′ 0.139 = 749.70727
𝑓1 1 𝑓 𝑓1 ′′
Second iteration: Put 𝑘 = 1 ⇒ 𝑥2 = 𝑥1 − − ( 1′ )2
𝑓1 ′ 2 𝑓1 𝑓1 ′
= 0.14285
36
Example1.4.5:
SPACE OF HINTS
Using ChebyshevMethod find the root of the equation
𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0
Solution:
Given 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0
𝑓 ′ 𝑥 = − sin 𝑥 − (𝑥 + 1) 𝑒 𝑥
𝑓 ′′ 𝑥 = − cos 𝑥 − (𝑥 + 2)𝑒 𝑥
Put 𝑥 = 0 ⟹ 𝑓 0 = 1
𝑥 = 1 ⟹ 𝑓 1 = −2.1780
𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0
𝑓 ′ 𝑥 = − sin 𝑥 − 𝑥𝑒 𝑥 − 1 𝑒 𝑥
𝑓 ′′ 𝑥 = − cos 𝑥 − 𝑥𝑒 𝑥 + 2𝑒 𝑥
First iteration:
𝑓0 1 𝑓 𝑓0 ′′
Put 𝑘 = 0 ⇒ 𝑥1 = 𝑥0 − − ( 0′ )2
𝑓0 ′ 2 𝑓0 𝑓0 ′
= 1 − 0.346920 − 0.060176(1.385011)
= 0.569735
𝑓 𝑥1 = −0.165132
𝑓 ′ 𝑥1 = −3.314384
𝑓 ′′ 𝑥1 = −5.384818
37
Second iteration:
SPACE FOR HINTS 𝑓1 1 𝑓 𝑓1 ′′
Put 𝑘 = 1 ⇒ 𝑥2 = 𝑥1 − − ( 1′ )2
𝑓1 ′ 2 𝑓1 𝑓1 ′
= 0.517896
Problem:
Solution:
Given that 𝑓 𝑥 = 𝑥 4 − 𝑥 − 10 = 0
𝑓 𝑥 = 𝑥 4 − 𝑥 − 10 ⟹ 𝑓 1.5 = −6.4375
𝑓 ′ 𝑥 = 4𝑥 3 − 1 ⟹ 𝑓 ′ 1.5 = 12.5
𝑓 ′′ 𝑥 = 12𝑥 2 ⟹ 𝑓 ′′ 1.5 = 27
𝑥1 = 1.7286
𝑓 𝑥1 = −2.8001
𝑓 ′ 𝑥1 = 19.6606
𝑓 ′′ 𝑥1 = 35.8567
38
Second iteration:
SPACE OF HINTS
𝑓1 1 𝑓 𝑓 ′′
Put 𝑘 = 1 ⇒ 𝑥2 = 𝑥1 − − ( 1′ )2 1 ′
𝑓1 ′ 2 𝑓1 𝑓1
= 1.8526
𝑓 𝑥2 = −0.0731
𝑓 ′ 𝑥2 = 24.4334
𝑓 ′′ 𝑥2 = 41.1855
Third iteration:
𝑓2 1 𝑓 𝑓 ′′
Put 𝑘 = 2 ⟹ 𝑥3 = 𝑥2 − − ( 2′ )2 ( 2 ′ )
𝑓2 ′ 2 𝑓2 𝑓2
= 1.8556
We Know that 𝑓𝑘 = 𝑎0 𝑥𝑘 2 + 𝑎1 𝑥𝑘 + 𝑎2
𝑓𝑘 ′ = 2𝑎0 𝑥𝑘 + 𝑎1
𝑓𝑘 ′′ = 2𝑎0
𝑓𝑘 ′ 𝑓𝑘 ′′ 2
𝑓𝑘 + 𝑥 − 𝑥𝑘 + 𝑥 − 𝑥𝑘 =0 (1)
1! 2
𝑓𝑘 ′ 𝑓𝑘 ′′
⟹ 𝑓𝑘 𝑥 − 𝑥𝑘 + 𝑥 − 𝑥𝑘 =0
1! 2
𝑓𝑘 ′ 𝑓𝑘 ′′
⟹ 𝑥 − 𝑥𝑘 + 𝑥 − 𝑥𝑘 = −𝑓𝑘
1! 2
−𝑓𝑘
⟹ 𝑥 − 𝑥𝑘 = ′
𝑓𝑘 𝑓 𝑘 ′′
+ 𝑥 − 𝑥𝑘
1! 2!
39
−𝑓𝑘
= 1 (2)
SPACE FOR HINTS 𝑓 ′ (𝑥𝑘 + 𝑥𝑘+1 − 𝑥𝑘 )
2
By Newton-Raphson Method,
𝑓𝑘
𝑥𝑘+1 = 𝑥𝑘 −
𝑓𝑘 ′
𝑓𝑘
⟹ 𝑥𝑘+1 − 𝑥𝑘 = − (3)
𝑓𝑘 ′
𝑓𝑘
⟹ 𝑥𝑘+1 = 𝑥𝑘 − 1 𝑓𝑘
𝑓 ′ 𝑥𝑘 +
2 𝑓𝑘 ′
𝑓𝑘
(i.e.) 𝑥𝑘+1 = 𝑥𝑘 − , 𝑘 = 0,1,2, ⋯
𝑓 ′ ∗ 𝑥 𝑘+1
Example1.4.6:
Perform three iterations of the multipoint iteration method to
findthe smallest positive root of the equation 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
Solution:
The smallest positive root of the equation is find as follows
Put 𝑥 = 0 ⟹ 𝑓 0 = 1
𝑥 = 1 ⟹ 𝑓 1 = −3
40
General formula for multipoint iteration method is
SPACE OF HINTS
1 𝑓𝑘
𝑥 ∗ 𝑘+1 = 𝑥𝑘 −
2 𝑓𝑘 ′
𝑓𝑘
𝑥𝑘+1 = 𝑥𝑘 −
𝑓 ′ ∗ (𝑥𝑘+1 )
𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1
𝑓 ′ 𝑥 = 3𝑥 2 − 5
First iteration:
1 𝑓0
Take 𝑘 = 0 ⇒ 𝑥1 ∗ = 𝑥0 −
2 𝑓0 ′
1 −1.375
= 0.5 −
2 −4.25
= 0.5 − 0.161764 = 0.33824
𝑓 ′ 𝑥1 ∗ = 𝑓 ′ (0.33824)
= −4.65678
𝑓0
𝑥1 = 𝑥0 −
𝑓1 ′ ∗
−1.375
= 0.5 − = 0.2
−4.65678
𝑓 𝑥1 = −0.01507
𝑓 ′ 𝑥1 = −4.87426
Second iteration:
1 𝑓1
𝑘 = 1 ⇒ 𝑥2 ∗ = 𝑥1 −
2 𝑓1 ′
1 −0.01507
= 0.20473 −
2 −4.87426
= 0.20473 − 0.0015458 = 0.20318
𝑓 ′ 𝑥2 ∗ = 𝑓 ′ (0.20318)
= −4.87615
41
𝑓1
𝑥2 = 𝑥1 −
SPACE FOR HINTS 𝑓2 ′ ∗
0.01507
= 0.20473 +
−4.87615
= 0.20164
𝑓 𝑥2 = −0.000001581
𝑓 ′ 𝑥2 = −4.87802
Third iteration:
1 𝑓2
𝑘 = 2 ⇒ 𝑥3 ∗ = 𝑥2 −
2 𝑓2 ′
1 0.000001581
= 0.20164 − (− )
2 −4.87802
= 0.20164 − 0.000000162
= 0.20164
𝑓 ′ 𝑥3 ∗ = −4.87802
𝑓2
𝑥3 = 𝑥2 −
𝑓3 ′ ∗
= 0.20164
Example1.4.7:
Perform three iterations of the multipoint iteration method to find the
root of the equation 𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥 = 0
Solution:
Put 𝑥 = 0 ⟹ 𝑓 0 = 1
𝑥 = 1 ⟹ 𝑓 1 = −2.1780
42
1 𝑓𝑘
𝑥 ∗ 𝑘+1 = 𝑥𝑘 − SPACE OF HINTS
2 𝑓𝑘 ′
𝑓𝑘
𝑥𝑘+1 = 𝑥𝑘 − ′ ∗
𝑓 (𝑥𝑘+1 )
𝑓 𝑥 = cos 𝑥 − 𝑥𝑒 𝑥
𝑓 ′ 𝑥 = − sin 𝑥 − 𝑥 𝑒 𝑥 − 𝑒 𝑥
= − sin 𝑥 − (𝑥 + 1) 𝑒 𝑥
First iteration:
1 𝑓0
Take 𝑘 = 0 ⇒ 𝑥1 ∗ = 𝑥0 −
2 𝑓0 ′
1 0.05322
= 0.5 −
2 −2.9525
= 0.5 + 0.009013 = 0.509013
𝑓 ′ 𝑥1 ∗ = 𝑓 ′ 0.509013
= −2.997783
𝑓0
𝑥1 = 𝑥0 −
𝑓1 ′ ∗
0.05322
= 0.5 −
−2.997783
= 0.51775
𝑓 𝑥1 = 0.000022
𝑓 ′ 𝑥1 = −3.04209
Second iteration:
1 𝑓1
𝑘 = 1 ⟹ 𝑥2 ∗ = 𝑥1 −
2 𝑓1 ′
1 0.00022
= 0.51775 − ( )
2 −3.04209
= 0.51775 + 0.0000072 = 0.51775
𝑓 ′ 𝑥2 ∗ = 𝑓 ′ (0.51775)
= −3.04209
43
𝑓1
𝑥2 = 𝑥1 −
SPACE FOR HINTS 𝑓2 ′ ∗
0.000022
= 0.51775 −
−3.04209
= 0.51775 + 0.0000072 = 0.51775
𝑓 𝑥 + 𝑖𝑦 = 𝑢 𝑥, 𝑦 + 𝑖𝑣 𝑥, 𝑦 = 0
Where 𝑢(𝑥, 𝑦)and 𝑣(𝑥, 𝑦)are the real and imaginary parts of
𝑓(𝑥)respectively.
1 𝑢𝑥 𝑘 −𝑢𝑦 𝑘
𝐽𝑘 −1 =
𝐽𝑘 −𝑣𝑥 𝑘 𝑣𝑦 𝑘
Example1.5.1:
Obtain the Complex root of the equation 𝑓 𝑧 = 𝑍 3 + 1 = 0.Correct to
eight decimal places use the initial approximation to a root as 𝑥0 , 𝑦0 =
1+𝑖 3
0.25, 0.25 comparewith the exact values of the roots
2
Solution:
Given𝑓 𝑧 = 𝑍 3 + 1 = 0
Substituting 𝑧 = 𝑥 + 𝑖𝑦 we get
𝑓 𝑥 + 𝑖𝑦 = (𝑥 + 𝑖𝑦)3 + 1
44
𝑢 𝑥, 𝑦 + 𝑖𝑣 𝑥, 𝑦 = 𝑥 3 + 3𝑥 2 𝑖𝑦 + 3𝑥(𝑖𝑦)2 + (𝑖𝑦)3 + 1
SPACE OF HINTS
3 2 2 3
= 𝑥 + 3𝑥 𝑖𝑦 − 3𝑥𝑦 − 𝑖𝑦 + 1
= 𝑥 3 − 3𝑥𝑦 2 + 1 + 𝑖(3𝑥 2 𝑦 − 𝑦 3 )
𝑢𝑘 𝑥 3 − 3𝑥𝑘 𝑦𝑘 2 + 1
(i.e.) 𝑣 = 𝑘
𝑘 3𝑥𝑘 2 𝑦𝑘 − 𝑦𝑘 3
𝑢𝑥 𝑢𝑦 𝑘 3𝑥𝑘 2 − 3𝑦𝑘 2 −6𝑥𝑘 𝑦𝑘
𝐽𝑘 = 𝑣 𝑘 𝑣𝑦 𝑘 =
𝑥𝑘 6𝑥𝑘 𝑦𝑘 3𝑥𝑘 2 − 3𝑦𝑘 2
𝐽𝑘 = 9(𝑥𝑘 2 + 𝑦𝑘 2 )2
First iteration:
𝑥1 𝑥0 𝑢0
Put 𝑘 = 0 ⇒ 𝑦 = 𝑦 − 𝐽0 −1 𝑣
1 0 0
𝐽𝑘 = 9(𝑥𝑘 2 + 𝑦𝑘 2 )2 =0.140625
45
1 3𝑥𝑘 2 − 3𝑦𝑘 2 6𝑥𝑘 𝑦𝑘
𝐽𝑘 −1 =
SPACE FOR HINTS 𝐽𝑘 −6𝑥𝑘 𝑦𝑘 3𝑥𝑘 2 − 3𝑦𝑘 2
0 2.667
𝐽𝑘 −1 =
−2.667 0
𝑢𝑘 𝑥𝑘 3 − 3𝑥𝑘 𝑦𝑘 2 + 1
𝑣𝑘 =
3𝑥𝑘 2 − 𝑦𝑘 3
𝑢𝑘 0.96875
𝑣𝑘 = 0.03125
𝑥𝑘+1 𝑥𝑘 −1 𝑢𝑘
𝑦𝑘+1 = 𝑦𝑘 − 𝐽𝑘 𝑣𝑘
0.1667
=
2.8334
Second iteration:
𝑥1 , 𝑦1 = (0.1667,2.8334)
= 584.0842
1
𝐽1 −1 =
584.0842
3 0.1667 2 − 3 2.8334 2
6 0.1667 2.8334
−6 0.1667 2.8334 3 0.1667 2 − 3 2.8334 2
1 −0.04109 0.00485
=
584.0842 −0.00485 −0.04109
−0.04109 0.00485
=
−0.00485 −0.04109
𝑢1 𝑥1 3 − 3𝑥1 𝑦1 2 + 1
𝑣1 = 3𝑥1 2 𝑦1 − 𝑦1 3
−3.01025
=
−22.5108
𝑥2 𝑥1 𝑢1
𝑦2 = 𝑦 − 𝐽1 −1 𝑣
1 1
46
Third iteration:
SPACE OF HINTS
𝑥2 , 𝑦2 = (0.1522, 1.8938)
𝑥3 𝑥2 𝑢2
Put 𝑘 = 2, 𝑦 = 𝑦 − 𝐽2 −1 𝑣
3 2 2
𝐽2 = 9((0.1522)2 + (1.8931)2 )2
= 117.2655
1 −10.6899 1.7293
𝐽2 −1 = [ ]
117.2655 −1.7293 −10.6899
−0.0912 0.01475
=
−0.01475 −0.0912
𝑢2 𝑥2 3 − 3𝑥2 𝑦2 2 + 1
𝑣2 =
3𝑥2 2 𝑦2 − 𝑦2 3
0.63395
=
−6.6605
𝑥3 0.1522 −0.0912 0.01475
𝑦3 = 1.8938 − −0.01475 −0.0912
0.19269
=
1.2772
Fourth iteration: 𝑥3 , 𝑦3 = (0.19269, 1.2772)
𝑥4 𝑥3 𝑢3
Put 𝑘 = 3, 𝑦 = 𝑦 − 𝐽3 −1 𝑣
4 3 3
𝐽𝑘 = 9(0.19269)2 + (1.2772)2 )2
= 25.05377
1 −4.78272 1.476257
𝐽3 −1 =
25.05377 1.476257 −4.78272
−0.19089 0.058923
=
0.058923 −0.19089
𝑢3 0.06438
𝑣3 = −1.94144
𝑥4 0.31932
𝑦4 =
0.91041
47
Fifth iteration:
SPACE FOR HINTS 𝑥4 , 𝑦4 = (0.31932,0.91041)
𝑥5 𝑥4 −1 𝑢4
Put 𝑘 = 4, 𝑦5 = 𝑦4 − 𝐽4 𝑣4
𝐽4 = 7.79769
1 −2.18067 1.74422
𝐽4 −1 =
7.79769 −1.74422 −2.18067
𝑢4 𝑥4 3 − 3𝑥4 𝑦4 2 + 1
𝑣4 =
3𝑥4 2 𝑦4 − 𝑦4 3
0.23854
=
0.47612
𝑥5 0.31932 −0.17322
𝑦5 = −0.91041 − 0.07978
0.49253
=
0.83063
Sixth iteration:
𝑥6 𝑥5 −1 𝑢5
Put 𝑘 = 5, 𝑦6 = 𝑦5 − 𝐽5 𝑣5
1 −1.342081 2.45466
𝐽5 −1 =
7.82654 −2.45466 −1.342081
−0.17148 0.31363
=
−0.31363 −0.17148
𝑢5 𝑥5 3 − 3𝑥5 𝑦5 2 + 1
𝑣5 =
3𝑥5 2 𝑦5 − 𝑦5 3
0.100023
=
0.03141
𝑥6 0.49253 −0.0073001 0.499833
𝑦6 = 0.83063 − 0.020337 = 0.86738
Seventh iteration:
𝑥6 , 𝑦6 = (0.499833,0.86738)
𝑥7 𝑥6 −1 𝑢6
Put 𝑘 = 6, 𝑦7 = 𝑦6 − 𝐽6 𝑣6
1 −1.50755 2.601270
𝐽6 −1 =
9.03948 −2.601270 −1.50755
48
0.16677 0.287767
= SPACE OF HINTS
−0.287767 0.16677
𝑥7 0.49983 0.000545 + 0.000713 0.498572
𝑦7 = 0.86738 − 0.000939 + 0.000412 = 0.866028
Definition:
When in a polynomial (terms being written in order) a +sign follows a
+sign or –sign follows a –sign continuous or a permanence of signs is
said to occur.But if +sign follows a –sign or a –sign follows a +sign,
then change of sign is said to occur.
Example:
The above equation has four sign changes and one continuous of signs.
Example 1.6.1:
Consider the Polynomial equation
49
Similarlythe number of sign changes of 𝑃5 −𝑥 = 1
SPACE FOR HINTS Hence the number of negative real root of 𝑃5 𝑥 = 0 cannot exceed 1.
𝑓1 𝑥
𝑓3 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓
𝑓2 𝑥
Example1.6.3:
Find the number of root of complex roots of the polynomial equations
(i) 𝑃3 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0
(ii) 𝑃4 𝑥 = 4𝑥 4 + 2𝑥 2 − 1 = 0 using Sturm method.
Solution:
𝑓 ′ 𝑥 = 3𝑥 2 − 5 𝑥 3
𝑓(𝑥)
Let 𝑓1 𝑥 = 𝑓 ′ 𝑥 = 3𝑥 2 − 5 3𝑥 2 − 5 𝑥 3 − 5𝑥 + 1 =
𝑓1 (𝑥)
𝑥 3 −5𝑥+1 5𝑥
𝑥3 −
3𝑥 2 −5 3
50
−10𝑥
+1 SPACE OF HINTS
3
𝑓 𝑥
𝑓2 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓
𝑓1 𝑥
10𝑥 10𝑥
=− − +1 = −1
3 3
10𝑥 − 3
= =0
3
∴ 𝑓2 𝑥 = 10𝑥 − 3
𝑓1 𝑥 3𝑥 9
𝑓3 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓 +
𝑓2 𝑥 10 100
−473 473
=− = =0 10𝑥 − 3 3𝑥 2 − 5
100 100
9𝑥
𝑓3 𝑥 = 473 3𝑥 2 −
10
9𝑥
Let 𝑉(𝑎) denote the number of sign changes in the Sturms −5
10
9𝑥 27
equation at 𝑥 = 𝑎. −
10 100
27 473
The following table, is the construction of sign changes −5=
100 100
in 𝑉(𝑎).
51
∴The given polynomial has no complex root.
SPACE FOR HINTS 𝑥
4𝑥 3 + 𝑥 4𝑥 4 + 2𝑥 2 − 1
𝑓 ′ 𝑥 = 16 + 4𝑥 = 𝑓1 𝑥 4𝑥 4 + 𝑥 2
⟹ 𝑓1 𝑥 = 4𝑥 3 + 4𝑥 2 − 1
𝑓 𝑥
Now, 𝑓2 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓
𝑓1 𝑥
= − 𝑥 2 − 1 = −𝑥 2 + 1
𝑓1 𝑥
𝑓3 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓 − 4𝑥
𝑓2 𝑥
= − 5𝑥 = −5𝑥 = 0 − 𝑥 2 + 1 4𝑥 3 + 𝑥
⇒ −𝑥 = 0 4𝑥 3 − 4𝑥
𝑓2 𝑥
𝑓4 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓 5𝑥
𝑓3 𝑥
= − 1 = −1
Now let V(a) denote the number of changes in the Sturm‟s sequence at
𝑥 = 𝑎.
52
Find the number of real roots and complex roots of the
SPACE OF HINTS
polynomial 𝑃4 𝑥 = 𝑥 4 − 4𝑥 3 + 3𝑥 2 + 4𝑥 − 4 using Sturm sequence.
Solution:Given equation is 𝑓 𝑥 = 𝑥 4 − 4𝑥 3 + 3𝑥 2 + 4𝑥 − 4
𝑓 ′ 𝑥 = 4𝑥 3 − 12𝑥 2 + 6𝑥 + 4
⇒ 𝑓1 𝑥 = 2𝑥 3 − 6𝑥 2 + 3𝑥 + 2
𝑓 𝑥
Now, 𝑓2 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓
𝑓1 𝑥
3𝑥 2 9𝑥 𝑥 1
=− − + −3 +
2 2 2 2
2𝑥 3 − 6𝑥 2 + 3𝑥 + 2 𝑥 4 − 4𝑥 3 + 3𝑥 2 + 4𝑥 − 4
3𝑥 2
= 3𝑥 2 − 9𝑥 + 6 𝑥 4 − 3𝑥 3 + +𝑥
2
2 3
3𝑥 2
= 𝑥 − 3𝑥 + 2 −𝑥 + + 3𝑥 − 4
2
𝑓1 𝑥 3𝑥
𝑓3 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓 𝑥 3 − 3𝑥 2 + +1
𝑓2 𝑥 2
3𝑥 2 9𝑥
= − −𝑥 + 2 = 𝑥 − 2 − + −3
2 2
2𝑥
𝑥 2 − 3𝑥 + 2 2 𝑥 3 − 6𝑥 2 + 3𝑥 + 2
𝑓2 𝑥
𝑓4 𝑥 = − 𝑟𝑒𝑚𝑖𝑛𝑑𝑒𝑟 𝑜𝑓 2𝑥 3 − 6𝑥 2 + 4𝑥
𝑓3 𝑥
=0 − 𝑥 + 2𝑥 − 1
𝑥 − 2 𝑥 2 − 3𝑥 + 2
𝑥 2 − 2𝑥
−𝑥 + 2
−𝑥 + 2
0
53
∴ 𝑓3 𝑥 is the last element of the Sturm sequence hence 𝑥 = 2 is the
SPACE FOR HINTS double root.
Let 𝑉(𝑎) denote the number of sign changes in the Sturm‟s sequence
𝑥 = 𝑎 of the polynomial. We divide each element of the Sturm sequence
by (𝑥 − 2) and obtain the new sequences asfollows.
∗
𝑥 4 − 4𝑥 3 + 3𝑥 2 + 4𝑥 − 4
𝑓 𝑥 =
(𝑥 − 2)
𝑓 ∗ 𝑥 = 𝑥 3 − 2𝑥 2 − 𝑥 + 2
∗ 2𝑥 3 − 6𝑥 2 + 3𝑥 + 2
𝑓1 (𝑥) =
(𝑥 − 2)
= 2𝑥 2 − 2𝑥 − 1
𝑥 2 − 3𝑥 + 2
𝑓2 ∗ 𝑥 =
𝑥−2
=𝑥−1
𝑥−2
𝑓3 ∗ 𝑥 =
𝑥−2
=1
−∞ − + − + 3
−2 − + − + 3
−1.5 − + + + 2
−1 0 + − + 2
0 + − − + 2
1.5 − + + + 1
2 0 + + + 0
2.5 + + + + 0
∞ + + + + 0
54
From the above table, the polynomial has three real roots in the interval
SPACE OF HINTS
−1.5, 0 , (0, 1.5) and (1.5,2.5) and also 𝑥 = 2 lies in the interval
(1.5, 2.5)
∴The given polynomial has four real roots lies in the interval
−1.5,0 , (0,1.5) and two roots liesin the interval (1.5, 2.5).
Birge-Vieta Method:
synthetic division.
𝑝 𝑎0 𝑎1 𝑎2 ⋯ 𝑎𝑛
𝑏0 𝑏1 𝑏2 ⋯ 𝑏𝑛−1 𝑏𝑛
𝑐0 𝑐1 ⋯ 𝑐𝑛−1
Step3:
The deflated polynomial is 𝑄𝑛−1 𝑥 = 𝑏0 𝑥 𝑛−1 + 𝑏1 𝑥 𝑛−2 + ⋯ + 𝑏𝑛−1
Example1.6.5:
Use synthetic division and perfect two iterations of the Birge-Vieta
Method to find the smallest positive root of the polynomial
Solution:
𝑏𝑛
The formula for Birge-Vieta Method is 𝑃𝑘+1 = 𝑃𝑘 − ,
𝑐𝑛 −1
𝑘 = 0,1,2, ⋯
55
First iteration:
SPACE FOR HINTS The given equation is polynomial of order 3.
𝑏3
𝑘 = 0, 𝑃1 = 𝑃0 −
𝑐2
0.5 2 0 −5 1
0 1 0.5 − 2.25
2 1 − 4.5 − 1.25
0 1 1
2 2 − 3.5
−1.25 1.25
𝑃1 = 0.5 − = 0.5 −
−3.5 3.5
= 0.1429
𝑏3
Second iteration:𝑘 = 1, 𝑃2 = 𝑃1 −
𝑐2
0.1429 2 0 −5 1
0 0.2858 0.08168
2 0.5716 − 4.87752
0.29134
𝑃2 = 0.1429 −
−4.87752
= 0.2026
𝑏3
Third iteration:𝑘 = 2, 𝑃3 = 𝑃2 −
𝑐2
0.2026 2 0 −5 1
56
Now 𝑏3 = 𝑃3 𝑃2 = 0.0036, this is givesthe error in satisfying the
SPACE OF HINTS
given equation 𝑃3 𝑥 = 0.
𝑄2 𝑥 = 2𝑥 2 + 0.4052𝑥 − 4.9179.
Example1.6.6:
Use synthetic division and perform two iteration of the Birge-Vieta
Method to find the smallest positive root of the equation
∴𝑛=4
𝑏4
𝑘 = 0, 𝑃1 = 𝑃0 −
𝑐3
0.5 1 −3 3 −3 2
0 0.5 −1 0.375
1 −2 0.75 − 1.75
0.9375 0.9375
𝑃1 = 0.5 − = 0.5 + = 1.0357
−1.75 1.75
𝑏4
Second iteration:𝑘 = 1, 𝑃2 = 𝑃1 −
𝑐3
1.0357 1 −3 3 −3 2
57
0.0713
𝑃2 = 1.0357 − −
SPACE FOR HINTS −1.9959
= 0.9999
Third iteration:
𝑏4
𝑘 = 2, 𝑃3 = 𝑃2 −
𝑐3
0.9999 1 −3 3 −3 2
Now 𝑏4 = 𝑃4 𝑃2 = 0.0002
𝑄3 𝑥 = 𝑥 3 − 2.0001𝑥 2 + 1.0001𝑥 − 2
Bairstow Method:
−𝑝0 𝑎0 𝑎1 𝑎2 ⋯ 𝑎𝑛−1 𝑎𝑛
−𝑝0 𝑏0 𝑏1 𝑏2 ⋯ 𝑏𝑛−1 𝑏𝑛
−𝑝0 𝑐0 − 𝑝0 𝑐1 ⋯ − 𝑝0 𝑐𝑛−2
−𝑞0 − 𝑞0 𝑐0 ⋯ − 𝑞0 𝑐𝑛−3
𝑐0 𝑐1 𝑐2 𝑐𝑛−1
58
The deflated polynomial is given by 𝑄𝑛−2 𝑥 = 𝑏0 𝑥 𝑛−2 + 𝑏1 𝑥 𝑛−4 +
SPACE OF HINTS
⋯ + 𝑏𝑛−2 .
Example1.6.7:
Perform two iterations of the Bairstow Method to extract a
quadratic factor𝑥 2 + 𝑝𝑥 + 𝑞 from the polynomial 𝑃3 𝑥 = 𝑥 3 + 𝑥 2 −
𝑥 + 2 = 0 use the initial approximation 𝑝0 = −0.9 , 𝑞0 = 0.9.
Solution:
The initial values are 𝑝0 = −0.9 , 𝑞0 = 0.9
0.9 1 1 −1 2
−0.90.9 2.52
−0.9
1 2.8 1.43 = 𝑐2
𝑏𝑛 𝑐𝑛 −3−𝑏𝑛 −1 𝑐𝑛 −2
The general formula ∆𝑝 = −
𝑐𝑛 −2 2 −𝑐𝑛 −3 𝑐𝑛 −1 −𝑏𝑛 −1
𝑏3 𝑐0 −𝑏2 𝑐1
Put 𝑛 = 3, ∆𝑝 = −
𝑐1 2 −𝑐0 𝑐2 −𝑏2
0.651
∆𝑝 = − = −0.104
6.22
𝑏𝑛 −1 𝑐𝑛 −1 −𝑏𝑛 −1 −𝑏𝑛 𝑐𝑛 −2
The general formula ∆𝑞 = −
𝑐𝑛 −2 2 −𝑐𝑛 −3 𝑐𝑛 −1 −𝑏𝑛 −1
𝑏2 𝑐2 −𝑏2 −𝑏3 𝑐1
Put 𝑛 = 3, ∆𝑞 = −
𝑐1 2 −𝑐0 𝑐2 −𝑏2
0.641
=− − = 0.1031
6.22
𝑝1 = 𝑝0 + ∆𝑝 = −0.9 − 0.1047 = −1.0047
59
∴ −𝑝1 = 1.0047& − 𝑞1 = −1.0031
SPACE FOR HINTS
Second iteration:
1.0047 1 1 −1 2
1.0047 2.0141 0.011
−1.0031 − 1.0031 − 2.0109
1 2.0047 0.011 0.0002 = 𝑏2
1.0047 3.0235
−1.0031
1 3.0094 2.0314 = 𝑐2
𝑏𝑛 𝑐𝑛 − 3 − 𝑏𝑛−1 𝑐𝑛−2
∆𝑝 = −
𝑐𝑛 −2 2 − 𝑐𝑛−3 𝑐𝑛−1 − 𝑏𝑛−1
𝑏3 𝑐0 − 𝑏2 𝑐1
=−
𝑐1 2 − 𝑐0 𝑐2 − 𝑏2
0.03290
=− = 0.0047
7.0361
𝑏𝑛−1 𝑐𝑛−1 − 𝑏𝑛−1 − 𝑏𝑛 𝑐𝑛−2 𝑏2 𝑐2 − 𝑏2 − 𝑏3 𝑐1
∆𝑞 = − = −
𝑐𝑛−2 2 − 𝑐𝑛−3 𝑐𝑛−1 − 𝑏𝑛−1 𝑐1 2 − 𝑐0 𝑐2 − 𝑏2
0.0216
=− = −0.0031
7.0361
𝑝2 = 𝑝1 + ∆𝑝 = −1.0047 + 0.0047 = −1
𝑞2 = 𝑞1 + ∆𝑞 = 1.0031 − 0.0031 = 1
Example1.6.8:
Perform one iteration of the Bairstow method to exact a quadratic
factor 𝑥 2 + 𝑝𝑥 + 𝑞from polynomial 𝑥 4 + 𝑥 3 + 2𝑥 2 + 𝑥 + 1 = 0 use
initial approximation 𝑝0 = 0.5, 𝑞0 = .5
60
∴ −𝑝0 = −0.5 &−𝑞0 = −0.5
SPACE OF HINTS
First iteration:
Given polynomial 𝑥 4 + 𝑥 3 + 2𝑥 2 + 𝑥 + 1 = 0
−0.5 1 1 2 1 1
−0.5 0 − 0.375
−0.5 0
1 0 0.75 − 0.25 = 𝑐3
𝑏𝑛 𝑐𝑛 − 3 − 𝑏𝑛−1 𝑐𝑛−2
∆𝑝 = −
𝑐𝑛 −2 2 − 𝑐𝑛−3 𝑐𝑛−1 − 𝑏𝑛−1
𝑏4 𝑐1 − 𝑏3 𝑐2
=−
𝑐2 2 − 𝑐1 𝑐3 − 𝑏3
0.09375
=− − = 0.1667
0.5625
𝑏𝑛−1 𝑐𝑛−1 − 𝑏𝑛−1 − 𝑏𝑛 𝑐𝑛−2
∆𝑞 = −
𝑐𝑛−2 2 − 𝑐𝑛−3 𝑐𝑛−1 − 𝑏𝑛−1
𝑏3 𝑐3 − 𝑏3 − 𝑏4 𝑐2
=−
𝑐2 2 − 𝑐1 𝑐3 − 𝑏3
0.28125
=− − = 0.5
0.5625
𝑝1 = 𝑝0 + ∆𝑝 = 0.5 + 0.1667 = 0.6667 ≅ 1
𝑞1 = 𝑞0 + ∆𝑞 = 0.5 + 0.5 = 1
61
Graff’s root squaring Method:This method is used to find the root of a
SPACE FOR HINTS polynomial with real coefficients.The roots may be real and distinct, real
and equal(or) complex.
𝑎0 𝑎1 𝑎2 𝑎3 𝑎4 ⋯ 𝑎𝑛
62
SPACE OF HINTS
2 2 2 2 2
𝑎0 𝑎1 𝑎2 𝑎3 ⋯ 𝑎𝑛
−2𝑎0 𝑎2 − 2𝑎1 𝑎3 − 2𝑎2 𝑎4 ⋯
2𝑎0 𝑎4 + 2𝑎1 𝑎3 + ⋯
⋮
𝑏0 𝑏1 𝑏2 𝑏3 ⋯ 𝑏𝑛
The terms attended in sign starting with a positive sign. The first term is
the square of the (𝐾 + 1)𝑡 co. efficient 𝑎𝑘 . The second term is true the
product of the 𝑛 nearest neighboring coefficient 𝑎𝑘−1 and 𝑎𝑘+1 . The
third is twice the product of the next neighboring coefficients𝑎𝑘−2 and
𝑎𝑘+2 . The procedure is contained until there are no available coefficients
to form the cross product. This procedure can be repeated 𝑚 times and
we obtain the equation.
Then 𝑅1 ≫ 𝑅2 ≫ ⋯ ≫ 𝑅𝑛 .
63
𝐵2
= 𝑅𝑖 𝑅𝑗 ≈ 𝑅1 𝑅2
SPACE FOR HINTS 𝐵0
𝐵3
− = 𝑅𝑖 𝑅𝑗 𝑅𝑘 ≈ 𝑅1 𝑅2 𝑅3
𝐵0
(−1)𝑛 𝐵𝑛
≈ 𝑅1 𝑅2 ⋯ 𝑅𝑛
𝐵0
2𝑚
𝐵𝑖
𝑙𝑜𝑔 𝜉𝑖 = 𝑙𝑜𝑔
𝐵𝑖−1
This determines the absolute values of the root and substitution in the
original equation (1) willgives the sign of the roots.
64
−𝐵𝑘 −𝐵𝑘+1
𝑅𝑘 = and 𝑅𝑘+1 =
𝐵𝑘−1 𝐵𝑘 SPACE OF HINTS
𝐵𝑘+1
𝑅𝑘 𝑅𝑘+1 ~𝑅𝑘 2 =
𝐵𝑘−1
2 2(2𝑚 )
𝐵𝑘+1
𝑅𝑘 = 𝜉𝑘 =
𝐵𝑘−1
This gives the magnitude of the double root substituting in the given
equation can find it‟s sign.This double root can also be found directly.
Complex root:
Solution:
Given polynomial equation is 𝑥 3 − 6𝑥 2 + 11𝑥 − 6 = 0
𝑚 2𝑚 𝑎0 𝑎1 𝑎2 𝑎3
0 1 1 −6 11 −6
1 36 121 36
−22 −72
1 2 1 14 49 36
65
−2786 −254016
SPACE FOR HINTS
3 8 1 6818 1686433 1679616
𝑚 2𝑚 𝛼1 𝛼2 𝛼3
𝛼1 ≅ 3𝛼2 ≅ 2𝛼3 ≅ 1
0 1 1 −4 5 −2
1 16 25 4
−10 −16
1 2 1 6 9 4
66
1 36 81 16
SPACE OF HINTS
−18 −48
2 4 1 18 33 16
2.2𝑛
𝐵𝑘+1
𝜉𝑘 =
𝐵𝑘−1
2.32 64 𝐵3 0.4295×10 10
Put𝑘 = 2 , 𝜉2 = 𝜉2 = =
𝐵1 0.4295×10 10
1
𝜉2 = 164 = 1;
∴ 𝜉3 is also 1.
2𝑚
𝐵𝑖 𝐵1
𝜉1 = =
𝐵𝑖−1 𝐵0
32
0.4295 × 1010
𝜉1 =
1
1
𝜉1 = (0.4295 × 1010 )32 = 2
Example 1.6.11:
67
Find all the roots of the polynomial 𝑥 4 − 𝑥 3 + 3𝑥 2 + 𝑥 − 4 = 0
SPACE FOR HINTS using the Graffe‟s root squaring Method.
Solution:
The Coefficients in the successive root squaring are given in the
table.
𝑚 2𝑚 𝑎0 𝑎1 𝑎2 𝑎3 𝑎4
0 1 1 −1 3 1 −4
1 1 9 1 16
−6 2 24
−8
1 2 1 −5 3 25 16
1 25 9 625 256
−6 250 −96
32
2 4 1 19 291 529 256
68
∴For calculation purpose we use 𝑚 = 3 values for real roots.
SPACE OF HINTS
Real roots:
2𝑚
𝐵𝑖
𝜉𝑖 =
𝐵𝑖−1
8
𝐵3
𝑖 = 3 ⇒ 𝜉3 =
𝐵2
8
130849
𝜉3 = =2
65091
𝜉3 = 1.0912
65536 1
𝜉4 = ( )8 = 0.9172
130849
𝑝4 𝜉4 = −𝑣𝑒
∴ 𝜉4 = −0.9172 is a – 𝑣𝑒 root.
2.2𝑚
𝐵2 65091
𝛽2 = =( )
𝐵0 1
16
𝛽2 = (65091)
1
𝛽2 = (65091)16 = 1.9991
−𝑎 1
Also, we know that sum of the roots 𝜉3 + 𝜉4 + 2𝑝 =
𝑎0
−(−1)
1.0912 − 0.9172 + 2𝑝 = =1
1
0.174 + 2𝑝 = 1
2𝑝 = 1 − 0.174
⇒ 𝑝 = 0.413
69
2
(1)⇒ 0.413 + 𝑞2 = 1.9991 2
𝑞2 = 3.8258
⟹ 𝑞 = 1.9560
Here the roots of the given polynomial are 1.0912, −0.9172 and
0.413 ± 𝑖(1.9560).
Unit – 2
2.1: Introduction
𝑎𝑖𝑗 = 0 , 𝑗 < 𝑖.
𝑎𝑖𝑗 = 0 , 𝑖 < 𝑗.
70
12) A real matrix𝐴 is said to be Diagonally Dominant, if
SPACE OF HINTS
𝑛
𝑎𝑖𝑗 ≥ 𝑎𝑖𝑗 , 𝑖 = 1 𝑡𝑜 𝑛.
𝑗 =1,𝑖≠𝑗
conjugate of𝑨.
Note:-
Note:-
71
𝑨𝟏𝟏 𝑨𝟏𝟐
𝑷𝑩𝑷𝑻 =
𝑨𝟐𝟏 𝑨𝟐𝟐
SPACE FOR HINTS
where𝑨𝟏𝟏 and𝑨𝟐𝟐 are diagonal matrices.
2) The minor𝑀𝑖𝑗 of𝑎𝑖𝑗 is the determinant of the 𝑛 − 1 × 𝑛 −
1 submatrix obtained by deleting the𝑖𝑡 row and𝑗𝑡 column in𝑨.
The cofactor is defined by𝐴𝑖𝑗 = (−1)𝑖+𝑗 𝑀𝑖𝑗
3) The transpose of the matrix of the cofactors of the elements of 𝐴
is called the adjoint matrix and is denoted by 𝒂𝒅𝒋 𝑨 .
𝟏
4) The inverse of a matrix 𝐴 is defined by 𝑨−𝟏 = 𝒂𝒅𝒋 𝑨 .
𝑨
Remarks:
Example: 2.1.1
12 4 −1
Show that the matrix 4 7 1 is positive definite.
−1 1 6
Solution:
12 4 −1 𝑥1
Let 𝐴 = 4 7 𝑥
1 and let 𝑋 = 2
−1 1 6 𝑥3
𝑋∗ = 𝑋 𝑇
= 𝑥1 𝑥2 𝑥2
12 4 −1 𝑥1
∗
𝑋 𝐴𝑋 = 𝑥1 𝑥2 𝑥2 4 7 1 𝑥2
−1 1 6 𝑥3
72
𝑥1
= 12𝑥1 + 4𝑥2 − 𝑥3 4𝑥1 + 7𝑥2 + 𝑥3 −𝑥1 + 𝑥2 + 6𝑥3 𝑥2 SPACE OF HINTS
𝑥3
2 2 2
= 12 𝑥1 + 7 𝑥2 + 6 𝑥3 + 4(𝑥2 𝑥1 + 𝑥1 𝑥2 ) − (𝑥3 𝑥1 + 𝑥1 𝑥3 )
+ (𝑥3 𝑥2 + 𝑥2 𝑥3 )
2
⟹ 𝑥1 = 𝑝1 2 + 𝑞1 2 ; 𝑥2 2
= 𝑝2 2 + 𝑞2 2 ; 𝑥3 2
= 𝑝3 2 + 𝑞3 2
= 𝑝1 𝑝2 + 𝑖𝑝1 𝑞2 − 𝑖𝑞1 𝑝2 + 𝑞1 𝑞2
= 𝑝1 𝑝2 + 𝑞1 𝑞2 + 𝑖(𝑝1 𝑞2 − 𝑞1 𝑝2 )
= 𝑝1 𝑝2 − 𝑖𝑝1 𝑞2 + 𝑖𝑞1 𝑝2 + 𝑞1 𝑞2
= 𝑝1 𝑝2 + 𝑞1 𝑞2 + 𝑖(𝑞1 𝑝2 − 𝑝1 𝑞2 )
= 𝑝1 𝑝3 + 𝑞1 𝑞3 + 𝑖(𝑞1 𝑝3 − 𝑝1 𝑞3 )
𝑥2 𝑥3 = 𝑝2 𝑝3 + 𝑞2 𝑞3 + 𝑖(𝑝2 𝑞3 − 𝑞2 𝑝3 )
𝑋 ∗ 𝐴𝑋 = 12 𝑝1 2 + 𝑞1 2 + 8 𝑝1 𝑝2 + 𝑞1 𝑞2 − 2 𝑝1 𝑝3 + 𝑞1 𝑞3
+ 2 𝑝2 𝑞3 + 𝑞2 𝑝3 + 7 𝑝2 2 + 𝑞2 2 + 6(𝑝3 2 + 𝑞3 2 )
73
= 4(𝑝1 + 𝑝2 )2 + 4(𝑞1 + 𝑞2 )2 + (𝑝1 − 𝑝3 )2 + (𝑞1 − 𝑞3 )2
SPACE FOR HINTS + (𝑝2 + 𝑝3 )2 + (𝑞2 + 𝑞3 )2
>0
∴ 𝑋 ∗ 𝐴𝑋 > 0
Note:
12 4 −1
𝐴= 4 7 1
−1 1 6
12 = 12 is positive
12 4
= 68 is positive
4 7
12 4 −1
𝐴 = 4 7 1 = 12 42 − 1 − 4 24 + 1 − 1 4 + 7
−1 1 6
Note:
Example: 2.1.2
74
2 −1 0 −1
−1 2 −1 0 SPACE OF HINTS
Show that the matrix 𝐴 = posseses
0 −1 2 0
0 0 −1 2
property 𝐴.
Solution:
0 0 0 1
0 1 0 0
Consider the permutation matrix 𝑃 =
0 0 1 0
1 0 0 0
0 0 0 1 2 −1 0 −1 0 0 0 1
0 1 0 0 −1 2 −1 0 0 1 0 0
𝑃𝐴𝑃𝑇 =
0 0 1 0 0 −1 2 0 0 0 1 0
1 0 0 0 0 0 −1 2 1 0 0 0
0 0 −1 2 0 0 0 1
−1 2 −1 0 0 1 0 0
=
0 −1 2 0 0 0 1 0
2 −1 0 −1 1 0 0 0
2 0 −1 −1
0 2 −1 −1
=
0 −1 2 0
−1 −1 0 2
In the above matrix, the submatrix 𝐴11 and 𝐴22 are diagonal
matrices and hence the matrix 𝐴 as property 𝐴.
Example: 2.1.3
1 0 0 0 0 0 0
𝑥 1 0 0 0 0 0
𝑥2 𝑥 1 0 0 0 0
𝑥3 𝑥2 𝑥 1 0 0 0
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑛−1 𝑛 −2
𝑥 𝑥 𝑥 𝑛−3 ⋯ 𝑥2 𝑥 1
Solution:
75
We know that, the inverse of the lower triangular matrix is also a
SPACE FOR HINTS triangular matrix.
𝑙11 0 0 0 0
𝑙21 𝑙22 0 0 0
Now, consider 𝐴−1 = 𝑙31 𝑙32 𝑙33 0 0
⋮ ⋮ ⋮ ⋮ ⋮
𝑙𝑛1 𝑙𝑛2 𝑙𝑛3 ⋯ 𝑙𝑛𝑛
Now, 𝐴𝐴−1 = 𝐼
1 0 0 0 0 0 0 𝑙11 0 0 0 0
𝑥 1 0 0 0 0 0 𝑙21 𝑙22 0 0 0
𝑥2 𝑥 1 0 0 0 0
⟹ 𝑙31 𝑙32 𝑙33 0 0
𝑥3 𝑥2 𝑥 1 0 0 0
⋮ ⋮ ⋮ ⋮ ⋮
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑙𝑛1 𝑙𝑛2 𝑙𝑛3 ⋯ 𝑙𝑛𝑛
𝑥 𝑛−1 𝑥 𝑛 −2 𝑥 𝑛 −3 ⋯ 𝑥2 𝑥 1
1 0 0 0 ⋯ 0
0 1 0 0 ⋯ 0
0 0 1 0 ⋯ 0
=
0 0 0 1 ⋯ 0
⋮ ⋮ ⋮ ⋮ ⋱ ⋮
0 0 0 0 ⋯ 1
⟹ 𝑥 2 − 𝑥 2 + 𝑙31 = 0
⟹ 𝑙31 = 0
1, 𝑖 = 𝑗
∴ 𝑙𝑖𝑗 = −𝑥, 𝑖 = 𝑗 + 𝑖
0, 𝑜𝑡𝑒𝑟𝑒𝑤𝑖𝑠𝑒
76
Hence the matrix 𝐴−1 is
SPACE OF HINTS
𝑙11 0 0 0 0 1 0 0 ⋯ 0 0
𝑙21 𝑙22 0 0 0 −𝑥 1 0 ⋯ 0 0
0 −𝑥 1 ⋯ 0 0
𝐴−1 = 𝑙31 𝑙32 𝑙33 0 0 =
0 0 −𝑥 ⋱ 0 0
⋮ ⋮ ⋮ ⋮ ⋮
⋮ ⋮ ⋮ ⋱ 1 ⋮
𝑙𝑛1 𝑙𝑛2 𝑙𝑛3 ⋯ 𝑙𝑛𝑛
0 0 0 0 −𝑥 1
𝑨𝑿 = 𝒃 (𝐼)
𝑥1 = 𝑥2 = ⋯ = 0.
If det 𝐴 ≠ 0
77
In 𝐼 𝑏 = 0, then the above system can be written
SPACE FOR HINTS
𝑨𝒙 = 𝝀𝒙 (1)
⟹ 𝑨𝒙 − 𝝀𝒙 = 𝟎
78
(i). A = D.
SPACE OF HINTS
𝑎11 𝑥1 = 𝑏1
𝑎22 𝑥2 = 𝑏2
𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛
𝑏𝑖
𝑥𝑖 = , 𝑖 = 1 𝐼 𝑛, 𝑎𝑖𝑖 ≠ 0 (4)
𝑎𝑖𝑖
(ii). A = L
𝑎11 𝑥1 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 = 𝑏2
𝑏1
𝑥1 =
𝑎11
(𝑏2 − 𝑎21 𝑥1 )
𝑥2 =
𝑎22
79
(𝑏3 − 𝑎31 𝑥1 − 𝑎32 𝑥2 )
𝑥3 =
SPACE FOR HINTS 𝑎33
𝑛−1
𝑏𝑛 − 𝑗 =1 𝑎𝑛𝑗 𝑥𝑗
𝑥𝑛 =
𝑎𝑛𝑛
(iii). 𝑨 = 𝑼
𝑎22 𝑥2 + ⋯ + ⋯+ 𝑎2𝑛 𝑥𝑛 = 𝑏2
𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛
𝑏𝑛
𝑥𝑛 =
𝑎𝑛𝑛
(𝑏𝑛−1 − 𝑎𝑛 −1,𝑛 𝑥𝑛 )
𝑥𝑛−1 =
𝑎𝑛−1, 𝑛−1
𝑛
𝑏1 − 𝑗 =2 𝑎𝑖𝑗 𝑥𝑗
𝑥1 =
𝑎11
80
the back substitution method.Thus, the equations (I) are exactlysolvable,
SPACE OF HINTS
if the matrix A in (3) canbe transformed into any one of theforms D, L
or U.
Cramer Rule
Step 2:
𝐵𝑖
The value of𝑥𝑖 = , 𝑖 = 1 𝑡𝑜 𝑛, where 𝐵𝑖 is the determinant of
𝐴
Example: 2.2.1
Solution:
1 2 −1 𝑥1 2
𝐴= 3 6 1 , 𝑥
𝑋 = 2 𝑎𝑛𝑑 𝑏 = 1
3 3 2 𝑥3 3
𝐴 = 1 12 − 3 − 2 6 − 3 − 1 9 − 18
=9−6+9
= 12
81
2 2 −1
𝐵1 = 1 6 1
SPACE FOR HINTS
3 3 2
= 2 12 − 3 − 2 2 − 3 − 1 3 − 18
= 18 + 2 + 15
= 35
1 2 −1
𝐵2 = 3 1 1
3 3 2
= −1 − 6 − 6
= −13
1 2 2
𝐵3 = 3 6 1
3 3 3
= 1 18 − 3 − 2 9 − 3 + 2(9 − 18)
= 15 − 12 − 18
= −15
𝐵1 35 𝐵2 −13 𝐵3 −15
∴ 𝑥1 = = ; 𝑥2 = = ; 𝑥3 = =
𝐴 12 𝐴 12 𝐴 12
35
12
𝑥1
−13
∴ 𝑥1 , 𝑥2 , 𝑥3 𝑜𝑟 𝑥2 = 12
𝑥3
−15
12
82
1
𝐴−1 = 𝑎𝑑𝑗𝐴 SPACE OF HINTS
𝐴
Here 𝐴 = 12.
6 1 3 1 3 6
𝐴11 = = 9 ; 𝐴12 = − = −3 ; 𝐴13 = = −9
3 2 3 2 3 3
2 −1 1 −1 1 2
𝐴21 = − = −7 ; 𝐴22 = = 5 ; 𝐴23 = −
3 2 3 2 3 3
=3
2 −1 1 −1 1 2
𝐴31 = = 8 ; 𝐴32 = − = −4 ; 𝐴33 = =0
6 1 3 1 3 6
𝑇 𝑇
𝐴11 𝐴12 𝐴13 9 −3 −9
𝑎𝑑𝑗𝐴 = 𝐴21 𝐴22 𝐴23 = −7 5 3
𝐴31 𝐴32 𝐴33 8 −4 0
9 −7 8
∴ 𝑎𝑑𝑗𝐴 = −3 5 −4
−9 3 0
1 1 9 −7 8
𝐴−1 = 𝑎𝑑𝑗 𝐴 = −3 5 −4
𝐴 12
−9 3 0
𝑋 = 𝐴−1 𝑏
1 9 −7 8 2
= −3 5 −4 1
12
−9 3 0 3
1 18 − 7 + 24
= −6 + 5 − 12
12
−18 + 3
1 35
= −13
12
−15
83
35
12
SPACE FOR HINTS
−13
∴𝑋= 12
−15
12
GaussElimenation Method:
row weget
where
𝑎21 𝑎21
𝑎22 (2) = 𝑎22 − 𝑎12 ; 𝑎23 (2) = 𝑎23 − 𝑎
𝑎11 𝑎11 13
𝑎31 𝑎31
𝑎32 (2) = 𝑎32 − 𝑎12 ; 𝑎33 (2) = 𝑎33 − 𝑎
𝑎11 𝑎11 13
𝑎21 𝑎31
𝑏2 (2) = 𝑏2 − 𝑏1 ; 𝑏3 (2) = 𝑏3 − 𝑏
𝑎11 𝑎11 1
84
In the second stage of elimination, multiply the first row in (2)
SPACE OF HINTS
𝑎 (2)
by 32 and subtract from the second row in (2), we get
𝑎22 (2)
𝑎 32 (2)
where𝑎33 (2) = 𝑎33 (2) − 𝑎23 (2)
𝑎 22 (2)
Example: 2.2.2
Solution:
10 −1 2 𝑥1 4
𝑖𝑒) 1 10 𝑥
−1 2 = 3
2 3 20 𝑥3 7
85
The augmented matrix is
SPACE FOR HINTS
10 −1 2 4 𝑅
10 −1 2 4 101 −6 26 𝑅2 → 𝑅2 − 1
0 10
1 10 −1 3 ≅ 10 5 10
𝑅
2 3 20 7 16 2018 31 𝑅3 → 𝑅3 − 1
0 5
5 101 5
10 −1 2 4
101 −6 26
0 10 16
≅ 10 5 10 𝑅3 → 𝑅3 − 𝑅2
16 2018 543 101 5
0
5 101 101
101 −6 26
𝑥2 𝑥3 = (2)
10 5 10
2018 543
𝑥3 = (3)
101 101
543 101
⟹ 𝑥3 = ×
101 2018
⟹ 𝑥3 = 0.2691
101 26 6
2 ⟹ 𝑥2 = + (0.2691)
10 10 5
10
𝑥2 = 2.9229 ×
101
𝑥2 = 0.2894
= 4 + 0.2894 − (2 × 0.2691)
𝑥1 = 0.37512
86
Now the solution of the system of equation is 𝑥1 = 0.3751,
SPACE OF HINTS
Example:2.2.3
Solution:
1 1 1 𝑥1 6
𝑖𝑒) 3 3 𝑥
4 2 = 20
2 1 3 𝑥3 13
1 1 1 6 1 1 1 6 𝑅 → 𝑅 − 3𝑅
2 2 1
3 3 4 20 ≅ 0 0 1 2 𝑅 → 𝑅 − 2𝑅
2 1 3 13 0 −1 11 3 3 1
1 1 16
≅ 0 0 1 2 𝑅3 ↔ 𝑅2
0 −1 11
𝑥1 + 𝑥2 + 𝑥3 = 6 (1)
−𝑥2 + 𝑥3 = 1 (2)
𝑥3 =
2 (3) ∴The solution
to the given system of equation is
𝑥1 = 3, 𝑥2 = 1 𝑎𝑛𝑑 𝑥3 = 2.
Example: 2.2.4
87
Solve the equations𝑥1 + 𝑥2 + 𝑥3 = 6, 3𝑥1 + (3 + 𝜖)𝑥2 + 4𝑥3 =
SPACE FOR HINTS 20𝑎𝑛𝑑 2𝑥1 + 𝑥2 + 3𝑥3 = 13using Gauss elimination method where is
small such that 1 ± 𝜖 2 ≈ 1
Solution:
1 1 1 𝑥1 6
𝑖𝑒) 3 3+𝜖 4 𝑥2 = 20
2 1 3 𝑥3 13
1 1 1 6 1 1 1 6 𝑅 → 𝑅 − 3𝑅
2 2 1
3 3+𝜖 4 20 ≅ 0 𝜖 1 2 𝑅 → 𝑅 − 2𝑅
3 3 1
2 1 3 13 0 −1 11
1 1 16
≅ 0 −1 1 1 𝑅2 ↔ 𝑅3
0 𝜖 12
1 1 1 6
≅ 0 −1 1 1 𝑅3 → 𝑅3 + 𝜖𝑅2
0 0 1+𝜖 2+𝜖
𝑥1 + 𝑥2 + 𝑥3 = 6 (1)
−𝑥2 + 𝑥3 = 1 (2)
1 + 𝜖 𝑥3 = 2 + 𝜖 (3)
2+𝜖
𝑥3 =
1+𝜖
2+𝜖
2 ⟹ −𝑥2 + =1
1+𝜖
2+𝜖
⟹ 𝑥2 = −1 +
1+𝜖
88
1
𝑥2 = SPACE OF HINTS
1+𝜖
1 2+𝜖
3 ⟹ 𝑥1 + + =6
1+𝜖 1+𝜖
3+𝜖
⟹ 𝑥1 + =6
1+𝜖
3+𝜖
⟹ 𝑥1 = 6 −
1+𝜖
3 + 5𝜖
𝑥1 =
1+𝜖
3 + 5𝜖 1 2+𝜖
𝑥1 = , 𝑥2 = 𝑎𝑛𝑑𝑥3 =
1+𝜖 1+𝜖 1+𝜖
Example: 2.2.5
2 1 1 −2 𝑥1 −10
4 0 2 1 𝑥2 8
Solve the system of equation
3 2 2 0 𝑥3 = 7
1 3 2 −1 𝑥4 −5
Solution:
2 1 1 −2
2 1 1 −2 −10 0 −2 0 5 −10 𝑅2 → 𝑅2 − 2𝑅1
1 1 3
4 0 2 1 8 0 2 2 3 28 𝑅3 → 𝑅3 − 2 𝑅1
≅
3 2 2 0 7 22
1
1 3 2 −1 −5 0 5 3 0 0 𝑅4 → 𝑅4 − 𝑅
2 2 2 1
89
2 1 1 −2
0 −2 0 5 −10 1
SPACE FOR HINTS 1 17 𝑅3 → 𝑅3 − 𝑅2
0 0 2 4 28 4
≅
29 5
3 25 35 𝑅4 → 𝑅4 + 𝑅2
0 0 2 4 4
2 1 1 −2
0 −2 0 5 −10
0 0 1 17
≅ 2 4 28 𝑅 → 𝑅 − 3𝑅
4 4 3
29
0 0 0 −26 −52
4
−26
𝑥 = −52 1
4 4
4
⟹ 𝑥4 = −52 ×
−26
𝑥4 = 8
1 17
𝑥3 + 𝑥 = 29 (2)
2 4 4
1 17
⟹ 𝑥3 = 29 − 𝑥
2 4 4
𝑥3 = −10
⟹ −2𝑥2 = 28 − 5 × 8
𝑥2 = 6
= −10 − 6 + 10 + 2(8)
2𝑥1 = 10 ⟹ 𝑥1 = 5
90
∴The solution is 𝑥1 = 5, 𝑥2 = 6, 𝑥3 = −10 𝑎𝑛𝑑 𝑥4 = 8.
SPACE OF HINTS
1 0 ⋯ 0 𝑥1 𝑑1
0 1 ⋯ 0 𝑥2 𝑑2
⋮ ⋮ ⋱ ⋮ ⋮ = ⋮
0 0 ⋯ 1 𝑥𝑛 𝑑𝑛
𝐺𝑎𝑢𝑠𝑠𝐽𝑜𝑟𝑑𝑜𝑛
Hence the gauss Jordon method gives 𝐴 | 𝑏 𝐼|𝑑
𝐺𝑎𝑢𝑠𝑠𝐽𝑜𝑟𝑑𝑜𝑛
𝑖𝑒) 𝐴 | 𝐼 𝐼 | 𝐴−1
Example:2.2.6
1 1 1 𝑥1 1
4 3 𝑥
−1 2 = 6 .By the Gauss Jordon method with partial and
3 5 3 𝑥3 4
hence solve the system.
Solution:
91
1 1 1 0 1 0
𝐴 𝐼 = 4 3 −1 1 0 0
SPACE FOR HINTS
3 5 3 0 0 1
4 3 −1 0 1 0
~ 1 1 1 1 0 0 𝑅1
3 5 3 0 0 1
1 3 4
−1
40
1
4 0 𝑅1
↔ 𝑅2 ~ 𝑅1 →
1 1 1 1 0 0 4
3 5 3 0 0 1
1 3 −1 1
4 40 4 0
1 5 −1 𝑅2 → 𝑅2 − 𝑅1
~ 0 4 4 1 4 0
𝑅3 → 𝑅3 − 3𝑅1
11 15 −3
0 4 4 0 4 1
1 3 −1 1
4 40 4 0
~ 0 1 5 4 −1 0 𝑅2 → 4𝑅2
11 15 −3
0 4 4 0 4 1
1 0 −16 3
4 −3 1 0 𝑅1 → 𝑅1 − 𝑅2
~ 4
4 −1 0 11
0 1 5 −11 2 1 𝑅3 → 𝑅3 − 𝑅
0 0 −10 4 2
−3 1 0
1 0 −4 4 −1 0 𝑅3
~ 0 1 5 11 −2 −1 𝑅3 →
10 10 10 −10
0 0 1
7 1 −2
5 5 5
1 0 0 −3 1 𝑅1 → 𝑅1 + 4𝑅3
~ 0 2 0 2
1 0
𝑅2 → 𝑅2 − 5𝑅3
0 0 1
11 −2 −1
10 10 10
92
∴ 𝐴|𝐼 = 𝐼|𝐴−1
SPACE OF HINTS
7 1 −2
5 5 5
−3 0 1
Hence 𝐴−1 = 2 2
11 −2 −1
10 10 10
7 1 −2
5 5 5
𝑥1 1
−3 0 1
𝑥
𝑖𝑒) 2 = 2 2 6
𝑥3 4
11 −2 −1
10 10 10
7 6 2 5
5+ 5− 5 5
𝑥1
−3 4 1
⟹ 𝑥2 = 2+0+ 2 = 2
𝑥3
11 12 4 −5
10 − 10 − 10 10
1
𝑥1 1
2
𝑥2 =
𝑥3 −1
2
Problem:1
93
2 2 11 0 0
𝐴𝐼 = 4 2 30 1 0
SPACE FOR HINTS
1 1 10 0 1
2 2 11 0 0
~ 1 1 10 0 1 𝑅2 ↔ 𝑅3
4 2 30 1 0
1 1 1 1 0 0
2 2 𝑅1
~ 𝑅1 →
1 1 1 0 0 1 𝑅2
4 2 3 0 1 0
1 1 1 1 0 0
2 2
𝑅2 → 𝑅2 − 𝑅1
~ 0 0 1 −1 0 1 𝑅3 → 𝑅3 − 4𝑅1
2 2
0 −2 1 −2 1 0
1 1 1 1 0 0
2 2
~ 0 −2 1 −2 1 0 𝑅2 ↔ 𝑅3
0 0 1 −1 0 1
2 2
1 1 1 1 0 0
2 2
0 1 −1 1 −1 −𝑅2
~ 2 2 0 𝑅2 →
2
0 0 1 −1 0 1
2 2
−1 2 1
2 0
1 0 1
0 1 −1
2 1 −1
~ 2 0 𝑅1 → 𝑅1 − 𝑅2
0 0 1
2 −1 0 1
2
94
−1 2 1
2 0
1 0 1 SPACE OF HINTS
0 1 −1
2 1 −1
~ 2 0 𝑅3 → 2𝑅3
0 0 1
2 −1 0 1
2
1 1 −2
2 2
1 0 1 𝑅1 → 𝑅1 − 𝑅3
~ 0 1 01 −1 1 𝑅3
2 2 𝑅2 → 𝑅2 +
0 0 1 2
−1 0 2
𝐴 𝐼 = [𝐼|𝐴−1 ]
1 1 −2
2 2
Hence 𝐴−1 = 1 −1 1
2 2
−1 0 2
1 1 −2
2 2
𝑥1 1
𝑖𝑒) 𝑥2 = 1 −1 1 2
𝑥3 2 2 3
−1 0 2
1
+1−6
2
= 1
−1+3
2
−1 + 0 + 6
−9
2
𝑥1
𝑥2 = 5
𝑥3 2
5
Problem:2
95
1 2 1
Find the inverse of the matrix by Gauss-Jordon 2 3 −1
SPACE FOR HINTS
2 −1 3
Solution:
Using augmented matrix
1 2 1 1 0 0
𝐴𝐼 = 2 3 −1 0 1 0
2 −1 3 0 0 1
1 2 1 1 0 0
2 1 −1 1 0 𝑅 → 𝑅2
~ 3 30 3 2
3
2 −1 3 0 0 1
1 2 1 1 0 0
−1 2
~ 0 −1 −2 3 1 0 𝑅2 → 𝑅2 − 𝑅
3 3 3 1
𝑅3 → 𝑅3 − 2𝑅1
0 −5 1 −2 0 1
1 2 1 1 0 0
~ 0 1 3 2 −1 0 𝑅2 → −3𝑅2
0 −5 1 −2 0 1
1 0 −5 −3 2 0 𝑅 → 𝑅 − 2𝑅
1 1 2
~ 0 1 3 2 −1 0
𝑅 → 𝑅3 + 5𝑅2
0 0 16 8 −5 1 3
−3 2 0
1 0 −5 2 −1 0 𝑅3
~ 0 1 3 8 −5 1 𝑅3 →
16 16 16 16
0 0 1
−8 7 5
16 16 16
1 0 0 8 −1 −3 𝑅1 → 𝑅1 + 5
~ 0 1 0 16 16 16
𝑅2 → 𝑅2 − 3
0 0 1
8 −5 1
16 16 16
𝐴 𝐼 = [𝐼|𝐴−1 ]
96
−8 7 5
16 16 16 SPACE OF HINTS
8 −1 −3
Hence 𝐴−1 = 16 16 16
8 −5 1
16 16 16
Triangularization method:
where
𝑙11 0 0 … 0
𝑙21 𝑙22 0 … 0
𝑙31 𝑙32 𝑙33 … 0
⋮ ⋮ ⋮
𝑙𝑛1 𝑙𝑛2 𝑙𝑛3 … 𝑙𝑛𝑛
Example: 2.2.7
Solution:
1 1 1 𝑥1 1
𝑖𝑒) 4 3 −1 𝑥2 = 6
3 5 3 𝑥3 4
97
1 1 1 1 0 0 𝑢11 𝑢12 𝑢13
4 3 𝑙
−1 = 21 1 0 0 𝑢22 𝑢23
SPACE FOR HINTS
3 5 3 𝑙31 𝑙32 1 0 0 𝑢33
1 0 0 1 0 0
∴ 𝐿 = 𝑙21 1 0 = 4 1 0
𝑙31 𝑙32 1 3 −2 1
We know that, 𝐴𝑋 = 𝑏
⟹ 𝐿𝑈𝑋 = 𝑏 [∵ 𝐴 = 𝐿𝑈] 1
Here 𝑈𝑋 = 𝑍 (2)
∴ 1 ⟹ 𝐿𝑍 = 𝑏
98
1 0 0 𝑧1 1
4 1 0 𝑧2 = 6 SPACE OF HINTS
3 −2 1 𝑧3 4
𝑧1 = 1
4𝑧1 + 𝑧2 = 6 ⟹ 4 + 𝑧2 = 6 ⟹ 𝑧2 = 2
3𝑧1 − 2𝑧2 + 𝑧3 = 4 ⟹ 𝑧3 = 5
2 ⟹ 𝑈𝑋 = 𝑍
1 1 1 𝑥1 1
𝑖𝑒) 0 −1 −5 𝑥2 = 2
0 0 𝑥
−10 3 5
−1
∴ −10𝑥3 = 5 ⟹ 𝑥3 =
2
5 1
−𝑥2 − 5𝑥3 = 2 ⟹ 𝑥2 = −2 + ⟹ 𝑥2 =
2 2
𝑥1 + 𝑥2 + 𝑥3 = 1 ⟹ 𝑥1 = 1 − 𝑥2 − 𝑥3
1 1
⟹1− + ⟹ 𝑥1 = 1
2 2
3 2 1
Example: 2.2.8 Find the inverse of the matrix𝐴 = 2 3 2 using
1 2 2
𝐿𝑈 decomposition method. Take 𝑢11 = 𝑢22 = 𝑢33 = 1.
Solution:
99
3 2 1 𝑙11 𝑢12 𝑙11 𝑢13 𝑙11
SPACE FOR HINTS
⟹ 2 3 2 = 𝑙21 𝑙12 𝑢21 + 𝑙22 𝑢13 𝑙21 + 𝑙22 𝑢23
1 2 2 𝑙31 𝑙31 𝑢12 +𝑙32 𝑢13 𝑙31 +𝑙32 𝑢23 + 𝑙33
2
𝑢12 𝑙11 = 2 ⟹ 𝑢12 =
3
1
𝑢13 𝑙11 = 1 ⟹ 𝑢13 =
3
4 5
𝑙12 𝑢21 + 𝑙22 = 3 ⟹ 𝑙22 = 3 − ⟹ 𝑙22 =
3 3
1 5
𝑢13 𝑙21 + 𝑙22 𝑢23 = 2 ⟹ 2 + 𝑢23 = 2
3 3
2 3
⟹ 𝑢23 = 2 − ×
3 5
4
⟹ 𝑢23 =
5
2 4
𝑙31 𝑢12 +𝑙32 = 2 ⟹ 𝑙32 = 2 − ⟹ 𝑙32 =
3 3
1 4 4
𝑢13 𝑙31 +𝑙32 𝑢23 + 𝑙33 = 2 ⟹ + × + 𝑙33 = 2
3 3 5
1 16 3
⟹ 𝑙33 = 2 − − ⟹ 𝑙33 =
3 15 5
3 0 0
𝑙11 0 0 2 5 0
3
∴ 𝐿 = 𝑙21 1 0 =
𝑙31 𝑙32 𝑙33 1 4 3
3 5
100
1 2 1
3 3 SPACE OF HINTS
1 𝑢12 𝑢13
𝑈= 0 1 𝑢21 = 0 1 4
0 0 1 5
0 0 1
1 2 1
3 3
𝑈 = 0 1 4 =1 1−0 =1
5
0 0 1
3 0 0
2 5 0
3 15
𝐿 = =3 −0 =3
4 3 15
1 3 5
1
𝑈 −1 = 𝑎𝑑𝑗 𝑈
𝑈
𝑇
1 0 0 1 −2 1
−2 3 5
3 1 0
𝑎𝑑𝑗 𝑈 = = 0 1 −4
1 −4 5
5 5 1
0 0 1
1 −2 1
3 5
𝑈 −1 = 0 1 −4
5
0 0 1
1
𝐿−1 = 𝑎𝑑𝑗 𝐿
𝐿
101
𝑇
1 −6 1
5
SPACE FOR HINTS 1 0 0
9 −12 −6 9
𝑎𝑑𝑗 𝐿 = 0 5 3 = 5 5 0
0 0 15 1 −4 5
3
1 0 0
3
1 0 0
1 −6 9 0 = −2 5 3 0
𝐿−1 = 5 5 5
3
1 −4 5 1 −4 5
3 3 3
𝐴−1 = 𝑈 −1 𝐿−1
1 0 0
1 −2 1 3
3 5
−2 3 0
= 0 1 −4 5 5
5
1 −4 5
0 0 1 3 3 3
1 4 1 6 4 1
3+ 15 + 15 0 − 15 − 15 0 + 0 + 3
= 0 − 2 5 − 4 15 0 + 3 5 + 16 15 0 + 0 − 4 3
2 −2 1
3 3 3
−2 5 −4
= 3 3 3
1 −4 5
3 3 3
102
1 2 −2 1
𝐴−1 = −2 5 −4 SPACE OF HINTS
3
1 −4 5
Example: 2.2.9
1 1 −1 𝑥1 2
2 2 5 𝑥2 = −3 exact solution is 𝑥1 = 1, 𝑥2 = 0, 𝑥3 = −1.
3 2 −3 𝑥3 6
Solution:
103
Now, take 𝑢𝑖𝑖 = 1, 𝐴 = 𝐿𝑈
SPACE FOR HINTS
1 1 −1 𝑙11 0 0 1 𝑢12 𝑢13
2 2 5 = 𝑙21 𝑙22 0 0 1 𝑢21
3 2 −3 𝑙31 𝑙32 𝑙33 0 0 1
⟹ −2 = 5 it is not possible.
3 2 −3 𝑥1 6
2 2 5 𝑥2 = −3
1 1 𝑥
−1 3 2
104
2
𝑢11 𝑙21 = 2 ⟹ 𝑙21 = SPACE OF HINTS
3
2
𝑢12 𝑙21 + 𝑢22 = 2 ⟹ × 2 + 𝑢22 = 2
3
4 2
⟹ 𝑢22 = 2 − ⟹ 𝑢22 =
3 3
2
𝑢13 𝑙21 + 𝑢23 = 5 ⟹ × −3 + 𝑢23 = 5 ⟹ 𝑢23 = 7
3
1
𝑙31 𝑢11 = 1 ⟹ 𝑙31 =
3
2 2 1
𝑙31 𝑢12 +𝑙32 𝑢22 = 1 ⟹ × 2 + 𝑙32 × = 1 ⟹ 𝑙32 =
3 3 2
1 1 −7
⟹ × −3 + × 7 + 𝑢33 = −1 ⟹ 𝑢33 =
3 2 2
1 0 0
2 1 0
3
∴𝐿=
1 1
3 2 1
3 2 −3
0 2 7
3
𝑈=
0 0 −7
2
We know that, 𝐴𝑋 = 𝑏
⟹ 𝐿𝑈𝑋 = 𝑏 (1)
Here 𝑈𝑋 = 𝑍 2
105
1 ⟹ 𝐿𝑍 = 𝑏 (3)
SPACE FOR HINTS
1 0 0
2 1 0 𝑧1
3 6
𝑧2 = −3
1
3
1
2 1 𝑧3 2
𝑧1 = 6
2
𝑧 + 𝑧2 = −3 ⟹ 𝑧2 = −7
3 1
1 1 7
𝑧1 + 𝑧2 + 𝑧3 = 2 ⟹ 𝑧3 =
3 2 2
6
𝑧1
−7
∴ 𝑧2 = 7
𝑧3 2
2 ⟹ 𝑈𝑋 = 𝑍
3 2 −3
2 6
0 3 7 𝑥1
−7
⟹ 𝑥2 = 7
0 0 −7 𝑥3 2
2
−7 7
𝑥3 = ⟹ 𝑥3 = −1
2 2
2
𝑥 + 7𝑥3 = −7 ⟹ 𝑥2 = 0
3 2
𝑥1 1
𝑥
∴ 2 = 0
𝑥3 −1
Example: 2.2.10
106
Solve the system of equations 𝐴𝑋 = 𝑏,
SPACE OF HINTS
2 1 1 −2 −10
4 0 2 1 8
where 𝐴 = 𝑏= .
3 2 2 0 7
1 3 2 −1 −5
Solution:
−1
𝑢12 𝑙31 + 𝑢22 𝑙32 = 2 ⟹ 𝑙32 =
4
1
𝑢13 𝑙31 + 𝑢23 𝑙32 + 𝑢33 = 2 ⟹ 𝑢33 =
2
107
17
𝑢14 𝑙31 + 𝑢34 𝑙32 + 𝑢34 = 0 ⟹ 𝑢34 =
SPACE FOR HINTS 4
1
𝑢11 𝑙41 = 4 ⟹ 𝑙41 =
2
−5
𝑢12 𝑙41 + 𝑢22 𝑙42 = 3 ⟹ 𝑙42 =
4
−13
𝑢14 𝑙41 + 𝑢24 𝑙42 + 𝑢34 𝑙43 + 𝑢44 = −1 ⟹ 𝑢44 =
2
1 0 0 0
2 1 0 0
3 −1 1 0
∴ 𝐿= 2 4
1 −5 3 1
2 4
2 1 1 −2
0 −2 0 5
0 0 1 17
𝑈= 2 4
0 0 0 −13
4
We know that, 𝐴𝑋 = 𝑏
⟹ 𝐿𝑈𝑋 = 𝑏 (1)
Here 𝑈𝑋 = 𝑍 2
1 ⟹ 𝐿𝑍 = 𝑏 (3)
108
1 0 0 0
2 1 0 0 𝑧1 −10
SPACE OF HINTS
3 −1 0 𝑧2
2 4 1 8
𝑧3 = 7
1
2
−5
4 3 1 𝑧4 −5
𝑧1 = −10
2𝑧1 + 𝑧2 = 8 ⟹ 𝑧2 = 28
3 1
𝑧1 − 𝑧2 + 𝑧3 = 7 ⟹ 𝑧3 = 29
2 4
1 5
𝑧1 − 𝑧2 + 3𝑧3 + 𝑧4 = −5 ⟹ 𝑧4 = −52
2 4
𝑧1 −10
𝑧2 28
∴ 𝑧 =
3 29
𝑧4 −52
2 1 1 −2
0 −2 0 5 𝑥1 −10
0 0 1 17 𝑥2 28
2 ⟹ 2 4
𝑥3 = 29
0 0 0 −13 𝑥4 −52
4
−13
𝑥 = −52 ⟹ 𝑥4 = 8
4 4
1 17
𝑥3 + 𝑥 = 29 ⟹ 𝑥3 = −10
2 4 4
−2𝑥2 + 5𝑥4 = 28 ⟹ 𝑥2 = 6
109
𝑥1 5
𝑥2 6
SPACE FOR HINTS ∴ 𝑥 =
3 −10
𝑥4 8
1
𝐿 = 1 𝑎𝑛𝑑 𝑈 =
13
1
𝑈 −1 = 𝑎𝑑𝑗 𝑈
𝑈
13 0 0 0
2
13 −13 0 0
𝑎𝑑𝑗 𝑈 = 4 2
−13 0 26 0
−8 −5 17 −2
13 13 −13 −8
2 4
1 −13
𝑈 −1 = 0 2 0 −5
13
0 0 26 0
0 0 17 −2
1
𝐿−1 = 𝑎𝑑𝑗 𝑈
𝐿
𝑇
1 −2 −2 3
1
1 0 1 14 2
𝐿−1 =
1
0 0 1 −3
0 0 0 1
1 0 0 0
−2 1 0 0
−2 1 1 0
𝐿−1 = 4
3 1 −3 1
2
110
𝐴−1 = 𝑈 −1 𝐿−1
SPACE OF HINTS
13 13 −13 −8 1 0 0 0
2 4 −2 1 0 0
1 −13 −2 1 1 0
= 0 0 −5 4
13 2
0 0 26 0 3 1 −3 1
2
0 0 17 −2
2 −4 11 −8
1 −2 −9 15 −5
𝐴−1 =
13 −1 15 −25 17
−6 −1 6 −2
Cholesky method:
This method is also known as square – root method. The given system
of equation is of the form 𝐴𝑋 = 𝑏. (1)
𝐴 = 𝐿𝐿𝑇 (2)
(or)𝐴 = 𝑈𝑈 𝑇 (3)
∴ 1 can be written as
𝐿𝐿𝑇 𝑋 = 𝑏 𝑜𝑟 𝑈𝑈 𝑇 𝑋 = 𝑏 (4)
4 ⟹ 𝐿𝑍 = 𝑏 (6)
111
From (6), we find the unknown value 𝑧, is obtained from by forward
SPACE FOR HINTS substitution and that determine the value 𝑥𝑖 , 𝑖 = 1,2, … , 𝑛 by backward
substitution. The inverse of 𝐴 can be obtained from
2 ⟹ 𝐴−1 = 𝐿𝐿𝑇 −1
∴ 𝐴−1 = 𝐿𝑇 −1 −1
𝐿
Example: 2.2.11
1 2 3 𝑥1 5
Solve the system of equations 2 8 22 𝑥2 = 6 using
3 22 82 𝑥3 −10
cholesky method.
Solution:
1 2 3
Given 𝐴 = 2 8 22
3 22 82
1 2
Since 1 = 1, =8−4=4
2 8
1 2 3
2 8 22 = 1 × 656 − 484 − 2 × 164 − 66 + 3 × (44 − 24)
3 22 82
= 36
112
𝑙11 2 𝑙11 𝑙21 𝑙11 𝑙31
SPACE OF HINTS
= 𝑙21 𝑙11 𝑙21 2 + 𝑙22 2 𝑙21 𝑙31 + 𝑙22 𝑙32
𝑙31 𝑙11 𝑙21 𝑙31 + 𝑙22 𝑙32 𝑙31 2 + 𝑙32 2 + 𝑙33 2
1 0 0
∴𝐿= 2 2 0
8 8 3
Here, 𝐿 −1 𝑋 = 𝑧 2
∴ 1 ⟹ 𝐿𝑍 = 𝑏 (3)
1 0 0 𝑧1 5
𝑖𝑒) 2 2 0 𝑧2 = 6
8 8 3 𝑧3 −10
𝑧1 = 5 2𝑧1 + 2𝑧2 = 6 ⟹ 𝑧2 = −2
1 2 3 𝑥1 5
∴ 2 ⟹ 0 2 𝑥
8 2 = −2
0 0 3 𝑥3 −3
3𝑥3 = −3 ⟹ 𝑥3 = −1
2𝑥2 + 8𝑥3 = −2 ⟹ 𝑥2 = 3
113
𝑥1 + 2𝑥2 + 3𝑥3 = 5 ⟹ 𝑥1 = 2
SPACE FOR HINTS
𝑥1 2
∴ The solution of given system of equation is 𝑥2 = 3 .
𝑥3 −1
Example: 2.2.12
4 −1 0 0 𝑥1 1
−1 4 −1 0 𝑥2 0
Solve the equation
0 −1 4 −1 𝑥3 = 0 using the cholesky
0 0 −1 4 𝑥4 0
method. Determine 𝐴−1 .
Solution:
4 −1 0 0
−1 4 −1 0
Given 𝐴 =
0 −1 4 −1
0 0 −1 4
4 −1
Since 4 = 4, = 16 − 1 = 15,
−1 4
4 −1 0
−1 4 −1 = 4 × 16 − 1 + 1 × −4 = 56
0 −1 4
4 −1 0 0
4 −1 0 −1 −1 0
−1 4 −1 0
= 4 −1 4 −1 + 0 4 −1
0 −1 4 −1
0 −1 4 0 −1 4
0 0 −1 4
= 4 × 56 + 16 − 1 + 1 × 0
= 224 − 15 = 209
114
𝑙11 0 0 0 𝑙11 𝑙21 𝑙31 𝑙41
𝑙 𝑙22 0 0 0 𝑙22 𝑙23 𝑙24 SPACE OF HINTS
𝐴 = 21
𝑙31 𝑙32 𝑙33 0 0 0 𝑙33 𝑙34
𝑙41 𝑙42 𝑙43 𝑙44 0 0 0 𝑙44
𝑙11 2 = 4 ⟹ 𝑙11 = 2
−1
𝑙11 𝑙21 = −1 ⟹ 𝑙21 =
2
15 15
𝑙21 2 + 𝑙22 2 = 4 ⟹ 𝑙22 2 = ⟹ 𝑙22 =
4 4
4
𝑙21 𝑙31 + 𝑙22 𝑙32 = −1 ⟹ 𝑙32 = −
15
56 56
𝑙31 2 + 𝑙32 2 + 𝑙33 2 = 4 ⟹ 𝑙33 2 = ⟹ 𝑙33 =
15 15
15
𝑙31 𝑙41 + 𝑙32 𝑙42 + 𝑙33 𝑙43 = −1 ⟹ 𝑙43 = −
56
115
209 209
SPACE FOR HINTS 𝑙41 2 + 𝑙42 2 + 𝑙43 2 + 𝑙44 2 = 4 ⟹ 𝑙44 2 = ⟹ 𝑙44 =
56 56
2 0 0 0
−1 15 0 0
2 4
∴𝐿= 0 − 4 15 56 0
15
0 0 − 15 56 209
56
𝐴𝑋 = 𝑏 ⟹ 𝐿𝐿−1 𝑋 = 𝑏 (1)
Here, 𝐿 −1 𝑋 = 𝑧 2
∴ 1 ⟹ 𝐿𝑍 = 𝑏 (3)
2 0 0 0
−1 15 0 0
2 4
𝑧1 1
𝑧2 0
− 4 15 56
0 15 0 𝑧3 = 0
𝑧4 0
0 0 − 15 56 209
56
1
2𝑧1 = 1 ⟹ 𝑧1 =
2
−1 15 1
𝑧1 + 𝑧2 = 0 ⟹ 𝑧2 =
2 4 60
4 56 1
− 𝑧2 + 𝑧3 = 0 ⟹ 𝑧3 =
15 15 840
116
15 209 1 SPACE OF HINTS
− 𝑧3 + 𝑧4 = 0 ⟹ 𝑧4 =
56 56 11704
(2) ⟹ 𝐿 −1 𝑋 = 𝑧
2 −1 0 0
2
1
2
0 15 4
4 − 15 0
𝑥1 1
𝑥2 60
56 15 𝑥3 = 1
0 0 15 − 56 𝑥4 840
1
209 11704
0 0 0 56
209 1 1
𝑥4 = ⟹ 𝑥4 =
56 11704 209
56 15 1 56 1 1 4
𝑥3 − 𝑥4 = ⟹ 𝑥3 = ⟹ 𝑥3 =
15 56 840 15 840 209 209
15 4 1 15
𝑥2 − 𝑥3 = ⟹ 𝑥2 =
4 15 60 209
1 1 56
2𝑥1 − 𝑥2 = ⟹ 𝑥1 =
2 2 209
56
209
𝑥1 15
209
𝑥2
∴ 𝑥 =
3 4
𝑥4 209
1
209
117
To find 𝑳−𝟏
SPACE FOR HINTS
2 0 0 0
−1 15 0 0
2 4
𝐿= 0 − 4 15 56 0
15
0 0 − 15 56 209
56
0 0 15 15
56 209 56
0 0 0 56
𝐿 =1
209
𝐿−1
209 0 0 0
4
209 2 209 15 0 0
60
1
=
209 209
840 2 209 210 15
56 209 0
1 2 1 14 15 56
56 56
118
0.5 0 0 0
0.1291 0.5164 0 0 SPACE OF HINTS
𝐿−1 =
0.0345 0.1380 0.5175 0
0.00921 0.0369 0.1387 0.5176
Partition method
𝐵 𝐶 𝑋 𝑌 𝐼 0
𝐴𝐴−1 = = 1
𝐸 𝐷 𝑍 𝑉 0 𝐼2
𝐵𝑋 + 𝐶𝑍 = 𝐼1 (1)
𝐵𝑌 + 𝐶𝑉 = 0 (2)
𝐸𝑋 + 𝐷𝑍 = 0 (3)
119
𝐸𝑌 + 𝐷𝑉
SPACE FOR HINTS = 𝐼2 (4) 2 ⟹ 𝐵𝑌
= −𝐶𝑉
−𝐶𝑉
⟹𝑌= = −𝐵−1 𝐶𝑉
𝐵
⟹ 𝑌 = −𝐵−1 𝐶𝑉
4 ⟹ 𝐸𝑌 + 𝐷𝑉 = 𝐼2
⟹ 𝐸 −𝐵−1 𝐶𝑉 + 𝐷𝑉 = 𝐼2
⟹ 𝐷 − 𝐸𝐵−1 𝐶 𝑉 = 𝐼2
𝐼2
⟹𝑉=
𝐷 − 𝐸𝐵−1 𝐶
⟹ 𝑉 = 𝐷 − 𝐸𝐵−1 𝐶 −1
1 ⟹ 𝐵𝑋 + 𝐶𝑍 = 𝐼1
⟹ 𝑋 = 𝐵−1 − 𝐵−1 𝐶𝑍
(3) ⟹ 𝐸𝑋 + 𝐷𝑍 = 0
⟹ 𝐸 𝐵−1 − 𝐵−1 𝐶𝑍 + 𝐷𝑍 = 0
⟹ 𝐸𝐵 −1 − 𝐸𝐵 −1 𝐶𝑍 + 𝐷𝑍 = 0
⟹ 𝐷 − 𝐸𝐵 −1 𝐶 𝑍 = −𝐸𝐵−1
1
= 𝑍
𝑉
= −𝐸𝐵−1
∴ 𝑍 = −𝐸𝐵−1 𝐷 − 𝐸𝐵 −1 𝐶 −1
120
⟹ 𝑍 = −𝑉𝐸𝐵−1
SPACE OF HINTS
𝐵 𝐶 𝑋 𝑌
1. Partition the given matrix 𝐴 as 𝐴 = and 𝐴−1 =
𝐸 𝐷 𝑍 𝑉
2. Find 𝐵−1
3. Find 𝑉, 𝑉 = 𝐷 − 𝐸𝐵−1 𝐶 −1
4. Find 𝑌, 𝑌 = −𝐵−1 𝐶𝑉
5. Find 𝑍, 𝑍 = −𝑉𝐸𝐵−1
6. Find 𝑋, 𝑋 = 𝐵−1 − 𝐵−1 𝐶𝑍
Example: 2.2.13
𝑥1 + 𝑥2 + 𝑥3 = 1, 4𝑥1 + 3𝑥2 − 𝑥3 = 6,
Solution:
1 1 1 𝑥1 1
Given 𝐴 = 4 3 −1 ; 𝑋 = 𝑥2 ; 𝑏 = 6
3 5 3 𝑥3 4
1 1 1
𝑋 𝑌
A can be partitioned as 𝐴 = 4 3 −1 and𝐴−1 =
𝑍 𝑉
5 5 3
1 1 1
From 𝐴, 𝐵 = , 𝑐= , 𝐷 = 3, 𝐸 = 3 5
4 3 −1
To find 𝑩−𝟏
1
𝐵−1 = 𝑎𝑑𝑗 𝐵
𝐵
121
3 −1
=−
−4 1
SPACE FOR HINTS
−3 1
𝐵−1 =
4 −1
To find 𝑽
𝑉 = 𝐷 − 𝐸𝐵−1 𝐶 −1
−3 1 1
𝐷 − 𝐸𝐵−1 𝐶 = 3 − 3 5
4 −1 −1
−4
=3− 3 5
5
= 3 − [−12 + 25] = 3 − 13 = 10
𝑉 = 𝐷 − 𝐸𝐵−1 𝐶 −1
−1
= −10
−1
𝑉=
10
To find 𝒀
𝑌 = −𝐵−1 𝐶𝑉
−3 1 1 −1
𝑌=−
4 −1 −1 10
1 4
=
10 5
−2
5
𝑌=
1
2
To find 𝒁
𝑍 = −𝐸𝐵−1 𝑉
122
−1 −3 1
𝑍=− 3 5 SPACE OF HINTS
10 4 −1
−1
= 11 −2
10
11 −1
𝑍= 10 5
To find 𝑿
𝑋 = 𝐵 −1 − 𝐵−1 𝐶𝑍
−3 1 −3 1 1 11 10 −1
= − 5
4 −1 4 −1 −1
−44 4
10 5
−3 1
= −
4 −1 55 −5
10 5
14 1
10 5
=
−15 0
10
1.4 0.2
𝑋=
−1.5 0
123
1
𝑋= 0.5
SPACE FOR HINTS
−0.5
∴ 𝑥1 = 1, 𝑥2 = 0.5, 𝑥3 = −0.5.
Example: 2.2.14
2 1 1 −2
4 0 2 1
Find the inverse of the matrix 𝐴 = using partition
3 2 2 0
1 3 2 −1
method. Hence, solve the system of equations 𝐴𝑋 = 𝑏, where
𝑏 = −10 8 7 −5 𝑇 .
Solution:
2 1 1 −2
4 0 2 1 𝑋 𝑌
𝐴= and𝐴−1 =
3 2 2 0 𝑍 𝑉
1 3 2 −1
2 1 1 −2 2 0 3 2
Here 𝐵 = , 𝐶= , 𝐷= , 𝐸=
4 0 2 1 2 −1 1 3
To find 𝑩−𝟏
1
𝐵−1 = 𝑎𝑑𝑗 𝐵
𝐵
1 0 −1
=−
4 −4 2
0 1
4
−1
𝐵 =
1 −1
2
124
To find 𝑽 ∶
SPACE OF HINTS
V = D − EB −1 C −1
0 1
4
2 0 3 2 1 −2
𝐷 − 𝐸𝐵−1 𝐶 = −
2 −1 1 3 1 −1 2 1
2
1 1
2 4
2 0 3 2
= −
2 −1 1 3 0 −5
2
3 −17
2 4
2 0
= −
2 −1 1 −29
2 4
1 17
2 4
−1
𝐷 − 𝐸𝐵 𝐶 =
1 25
2 4
−1
1 17
2 4
𝑉=
1 25
2 4
−1.9231 1.3077
𝑉=
0.4615 −0.1538
To find 𝒀
𝑌 = −𝐵−1 𝐶𝑉
0 1
4
1 −2 −1.9231 1.3077
𝑌=−
1 −1 2 1 0.4615 −0.1538
2
125
0 1
4
SPACE FOR HINTS −2.8461 1.6153
=−
1 −1 −3.3847 2.4616
2
−0.8462 0.6153
=−
−1.1537 0.3845
0.8462 −0.6153
𝑌=
1.1537 −0.3845
To find 𝒁
𝑍 = −𝑉𝐸𝐵 −1
0 1
4
3 2 −1.9231 1.3077
𝑍=−
1 3 1 −1 0.4615 −0.1538
2
2 −1
4
−1.9231 1.3077
=−
3 −5 0.4615 −0.1538
4
0.0769 −1.1537
=−
0.4616 0.0769
−0.0769 1.1537
𝑍=
−0.4616 −0.0769
To find 𝑿
𝑋 = 𝐵−1 − 𝐵−1 𝐶𝑍
0 1 0 1
4 4
1 −2 −0.0769 1.1537
𝑋= −
1 −1 1 −1 2 1 −0.4616 −0.0769
2 2
126
0 1 1 1
4 2 4 SPACE OF HINTS
−0.0769 1.1537
= −
1 −1 0 −15 −0.4616 −0.0769
2 2
0 1
4
−0.0539 0.5577
= −
1 −1 1.154 0.1923
2
0.1539 −0.3077
=
−0.154 −0.6923
𝑋 𝑌
We know that,𝐴−1 =
𝑍 𝑉
5
6
𝑋=
−10
8
∴ 𝑥1 = 5, 𝑥2 = 6, 𝑥3 = −10, 𝑥4 = 8.
127
SPACE FOR HINTS
Number of divisions:
First step [first equation (division by first pivot)]: n
Second step [second equation (division by second pivot)]: n – 1
.........................................
𝑛𝑡 step [nth equation (divisionby nth pivot)]: 1
𝑛
Total number of divisions= 𝛴𝑛 = (𝑛 + 1).
2
Number of multiplications:
First step: second equation : n
third equation : n
.........................
nth equation: n
𝑛
= 𝛴(𝑛 − 1)𝑛 = 𝛴 (𝑛2 − 𝑛) = (𝑛 + 1)(𝑛 − 1).
3
(n – 1)th equation : 1
(n – 2)th equation : 2
............................
first equation : n –1
128
Total multiplications in the back substitution
SPACE OF HINTS
𝑛
= (𝑛 − 1) = (𝑛 − 1).
2
𝑛 𝑛
Total multiplications= 𝑛 + 1 𝑛 − 1 + (𝑛 − 1)
3 2
𝑛
= 𝑛 − 1 (2𝑛 + 5)
6
𝑛 𝑛
= 𝑛 + 1 + 𝑛 − 1 (2𝑛 + 5)
2 6
𝑛 2
= (𝑛 + 3𝑛 − 1)
3
𝑛3
For large 𝑛, operational count = .
3
𝑛
Total additions and subtractions = 𝑛 − 1 2𝑛 + 5 .
6
𝑛3
(i). Gauss – Jordan elimination method requires operations.
2
𝑛3
(ii). 𝑳𝑼 decomposition methodrequires operations (sameas in Gauss
3
eliminationmethod).
𝑛3
(iii). Cholesky method requires operations.
6
If all calculations are performed exactly, then only we can hope to find
the exact solution to the system. Usually, during computation, it will be
necessary to round or chop the numbers. This will introduce round-off
errors in the computation. Because ofthis, the methods used will produce
results which will differ considerably from the exact solution. The exact
solution x and the corresponding approximate solution 𝑥 will
satisfyrespectively the equations
129
𝑨𝑿 = 𝒃
SPACE FOR HINTS
𝑨 + 𝜹𝑨 𝒙 = 𝒃 + 𝜹𝒃 (1)
−1
𝑥 − 𝑥 = 𝐴 + 𝛿𝐴 𝑏 + 𝛿𝑏 − 𝐴−1 𝑏
−1
= 𝐴 + 𝛿𝐴 − 𝐴−1 𝑏 + (𝐴 + 𝛿𝐴)−1 𝛿𝑏 (2)
which may be called the error equation. In order to estimate the error
vector 𝜖 = 𝑥 − 𝑥, we recall theconcept of a norm of a vector x and
amatrix𝐴.
Vector Norm:
The non-negative quantity || 𝑥 || isa measure of the size or length of
avector satisfying:
𝒙 = 𝑥𝑖 (1)
𝑖=1
𝑛 1
2
∗ 1 2
𝑥 2 = (𝑥 𝑥) 2 = 𝑥𝑖 (2)
𝑖=1
130
𝑥 ∞ = max 𝑥𝑖 (3)
1≤𝑖≤𝑛 SPACE OF HINTS
Matrix Norm:
The matrix norm, || 𝑨 ||, is a non-negative number which satisfies the
properties:
iii. || 𝑨 + 𝑩 || ≤ || 𝑨 || + || 𝑩 ||,
iv. || 𝑨𝑩 || ≤ || 𝑨 || ||𝑩||.
1
𝑛 2 2
𝐹(𝐴) = 𝑎𝑖𝑗
𝑖,𝑗 =1
A = A ∞
||𝐴|| = ||𝐴||1
𝜆 = 𝜌(𝐴2 ) = 𝜌2 (𝐴)
131
So that ||𝐴||2 = 𝜌(𝐴).
SPACE FOR HINTS
The matrix norm must be consistentwith the vector norm that we
areusing for any vector x and matrix A, i.e.
𝐴𝑥 ≤ 𝐴 𝑥 (1)
Error Estimate:
−1
𝑥−𝑥 ≤ 𝐴 + 𝛿𝐴 − 𝐴−1 𝑏 + (𝐴 + 𝛿𝐴)−1 𝛿𝑏
𝐴−1
𝑥−𝑥 ≤ 𝐴 𝐴−1 𝛿𝐴 𝑏 + 𝛿𝑏 (1)
𝐴−1 𝛿𝐴
𝐴−1
𝑥−𝑥 ≤ 𝒙 𝜹𝑨 + 𝛿𝑏
(1 − 𝐴−1 𝛿𝐴 )
or
132
𝑥−𝑥 𝐴−1 𝒙 𝛿𝐴 𝛿𝑏
≤ 𝐴 [ + ] SPACE OF HINTS
𝒙 (1 − 𝐴−1 𝛿𝐴 ) 𝐴 𝒙 𝐴 𝒙
or
𝑥−𝑥 𝐾(𝐴) 𝛿𝑏 𝛿𝐴
≤ + (2)
𝒙 (1 − 𝐴−1 𝛿𝐴 ) 𝑏 𝐴
𝑥−𝑥 𝐾(𝐴) 𝛿𝐴
≤ .
𝒙 (1 − 𝐴−1 𝛿𝐴 ) 𝐴
𝒙−𝒙 𝛿𝒃
≤𝐾 𝑨 [
𝒙 𝒃
−1
𝜆
𝐾 𝑨 = 𝐴 2 𝐴 2 =
𝜇
133
where λ and μ are the largest and smallest eigenvalues in modulus
𝜆∗
SPACE FOR HINTS of𝑨∗ 𝑨. If 𝑨 is Hermitian or real and symmetric, we have 𝐾(𝑨) =
𝜇∗
Example: 2.3.1
Determine the Euclidean and the maximum absolute row sum norms of
1 7 −4
the matrix 𝐴 = 4 −4 9
12 −1 3
Solution:
1
3 2 2
Euclidean norm = 𝐹(𝐴) = 𝑖,𝑗 =1 𝑎𝑖𝑗
= 1 + 49 + 16 + 16 + 16 + 81 + 144 + 1 + 9 = 333
3
Maximum absolute row sum norms = max𝑖 𝑘=1 𝑎𝑖𝑘
Example: 2.3.2
Solution:
42.85 36.64
𝐴∗ 𝐴 = 𝐴𝑇 𝐴 =
36.64 31.33
134
The eigenvalues of 𝐴∗ 𝐴 are the solutions of
SPACE OF HINTS
42.85 − 𝜆 36.64
=0
36.64 31.33 − 𝜆
⟹ 𝜆2 − 74.18𝜆 + 0.0009 = 0
𝜆2 = 0.00001213
𝜆1
𝐾 𝑨 = = 24.72.73
𝜆2
Example: 2.3.3
1 7 −4
𝐴= 4 −4 9
12 −1 3
Solution:
31 −44 17
8 8 8
−31 44 −17 −44 56 −20
−1 1
𝐴 =− 44 −56 20 = 8 8 8
8
−17 20 −7
17 −20 7
8 8 8
135
𝐴−1 ∞ = 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑎𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑟𝑜𝑤 𝑠𝑢𝑚 𝑛𝑜𝑟𝑚 𝑓𝑜𝑟 𝐴−1
SPACE FOR HINTS
31 44 17 44 56 20 17 20 7
= 𝑚𝑎𝑥 + + , + + , + +
8 8 8 8 8 8 8 8 8
92 44
= 𝑚𝑎𝑥 , 15, = 15
8 8
𝑘
(𝑘+1)
𝑏1 − (𝑎12 𝑥2 + 𝑎13 𝑥3 𝑘 + ⋯ + 𝑎1𝑛 𝑥𝑛 𝑘 )
𝑥1 =
𝑎11
(𝑘+1)
𝑏2 − (𝑎21 𝑥2 + 𝑎23 𝑥3 𝑘 + ⋯ + 𝑎2𝑛 𝑥𝑛 𝑘 )
𝑘
𝑥2 = (2)
𝑎22
⋮
𝑏𝑛 − (𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 𝑘 + ⋯ + 𝑎𝑛𝑛 −1 𝑥𝑛−1 𝑘 )
𝑘
𝑥𝑛 (𝑘+1) =
𝑎𝑛𝑛
𝑋 (𝑘+1) = −𝐷 −1 𝐿 + 𝑈 𝑋 𝑘
+ 𝐷 −1 𝑏 3
136
Where 𝐻 = −𝐷 −1 𝐿 + 𝑈 , 𝐶 = −𝐷 −1 𝑏 and 𝐿 and 𝑈 are respectively
SPACE OF HINTS
lower and upper triangular matrices with zero diagonal entries and 𝐷 is
the diagonal matrix such that
𝐴=𝐿+𝐷+𝑈
𝑋 (𝑘+1) = 𝑋 𝑘
−𝑋 𝑘
− 𝐷 −1 𝐿 + 𝑈 𝑋 𝑘
+ 𝐷 −1 𝑏
𝑘
=𝑋 − 𝐷 −1 𝐴𝑋 𝑘
+ 𝐷 −1 𝑏
𝑖𝑒) 𝑋 (𝑘+1) − 𝑋 𝑘
= −𝐷 −1 𝐴𝑋 𝑘
+ 𝐷 −1 𝑏
= 𝐷 −1 (𝑏 − 𝐴𝑋 𝑘
)
𝑘
𝑉
= 𝐷 −1 𝑟 𝑘
(4)
𝑘
where 𝑉 = 𝑋 𝑘+1 − 𝑋 𝑘
, 𝑟 𝑘
= 𝑏 − 𝐴𝑋 𝑘
and𝑉 𝑘
is the error in the
𝑘
approximation and 𝑟 is the residual vector.
𝑘 𝑘 𝑘+1 𝑘 𝑘
Now, 4 ⟹ 𝐷𝑉 =𝑟 and 𝑋 =𝑋 +𝑉
theseequation is the Jacobi iteration method in an error format.
Example: 2.4.1
𝑥2 = −1, 𝑥3 = −1.
Solution:
137
4 1 1 𝑥1 2
Where 𝐴 = 1 5 2 𝑋 = 𝑥2 𝑏 = −6
SPACE FOR HINTS 𝑥3
1 2 3 −4
0 0 0 4 0 0 0 1 1
Where 𝐿 = 1 0 0 𝐷= 0 5 0 𝑈= 0 0 2
1 2 0 0 0 3 0 0 0
1 0 0
4
0 1 0
Now, clearly, 𝐷 −1 = 5
0 0 1
3
1 0 0 0 1 1
4 4 4
1 0 1 1 1 2
𝐻=− 0 5 0 1 0 2 =− 5 0 5
1 2 0
0 0 1 1 2 0
3 3 3
0 −1 4 −1 4
1 −2 5
𝐻= − 5 0
−1 3 −2 3 0
𝐶 = −𝐷 −1 𝑏
138
1 0 0 1
4 2 SPACE OF HINTS
1 2 −6
= 0 5 0 5
−6 =
−4
0 0 13 −4
3
∴ 𝑋 𝑘+1 = 𝐻𝑋 𝑘
+𝐶
0 −1 4 −1 4 1
2
1 −2 5 𝑋 −6
𝑋 (𝑘+1) = − 5 0 𝑘
+ 5 ; 𝑘 = 0,1,2, …
−1 3 −2 3 0 −4
3
Put 𝑘 = 0,
0 −1 4 −1 4 1
2
1 −2 5 𝑋 −6
𝑋 (1) = − 5 0 0
+ 5
−1 3 −2 3 0 −4
3
0 −1 4 −1 4 1
2
1 0.5 −6
= − 5 0 −2 5 5
−0.5 +
−0.5
−1 3 −2 3 0 −4
3
0.25 0.5
= 0.1 + −1.2
−0.1667 −1.333
0.75
𝑋 (1) = −1.1
−1.1663
139
Put 𝑘 = 0,
SPACE FOR HINTS
0 −1 4 −1 4 1
2
1
𝑋 (2) = − 5 0 − 2 5 𝑋 1 + −6 5
−1 3 −2 3 0 −4
3
0 −1 4 −1 4 1
2
1 0.75 −6
= − 5 0 −2 5 5
−1.1 +
−1.1663
−1 3 −2 3 0 −4
3
1.067
(2)
𝑋 = −0.8835
−0.85
Put 𝑘 = 0,
0 −1 4 −1 4 1
2
1
𝑋 (3) = − 5 0 − 2 5 𝑋 2 + −6 5
−1 3 −2 3 0 −4
3
0 −1 4 −1 4 1
2
1 1.067 −6
= − 5 0 −2 5 5
−0.8835 +
−0.85
−1 3 −2 3 0 −4
3
0.9334
= −1.0734
−1.0997
140
1
𝑋 (3) ≅ −1 SPACE OF HINTS
−1
𝑥1 = 1, 𝑥2 = −1, 𝑥3 = −1
𝑘 𝑘 𝑘
where 𝑟 = 𝑏 − 𝐴𝑋 𝑎𝑛𝑑 𝑉 = 𝐷 −1 𝑟 𝑘
Put 𝑘 = 0,
0 0
𝑟 = 𝑏 − 𝐴𝑋
2 4 1 1 0.5
= −6 − 1 5 2 −0.5
−4 1 2 3 −0.5
1
0
𝑟 = −3
−2
0
𝑉 = 𝐷 −1 𝑟 0
1 0 0
4
1 1
= 0 5 0
−3
−2
0 0 1
3
0.25
0
𝑉 = −0.6
−0.6667
𝑋 (1) = 𝑋 0 + 𝑉 0
0.5 0.25
= −0.5 −0.6
−0.5 −0.6667
141
0.75
𝑋 (1) = −1.1
SPACE FOR HINTS
−1.1667
Put 𝑘 = 1,
1 1
𝑟 = 𝑏 − 𝐴𝑋
2 4 1 1 0.75
= −6 − 1 5 2 −1.1
−4 1 2 3 −1.1667
2 0.7333
= −6 − −7.0834
−4 −4.95
1.2667
1
𝑟 = 1.0834
0.95
𝑉 (1) = 𝐷 −1 𝑟 1
1 0 0
4
1 1.2667
= 0 5 0
1.0834
0.95
0 0 1
3
0.3167
(1)
𝑉 = 0.2167
0.3167
0.75 0.3167
= −1.1 + 0.2167
−1.1667 0.3167
1.0667
(2)
𝑋 = −0.8833
−0.85
Put 𝑘 = 2,
142
2 2
𝑟 = 𝑏 − 𝐴𝑋
SPACE OF HINTS
2 4 1 1 1.0667
= −6 − 1 5 2 −0.8833
−4 1 2 3 −0.85
−0.5335
2
𝑟 = −0.9502
−0.7501
𝑉 (2) = 𝐷 −1 𝑟 2
1 0 0
4
1 −0.5335
= 0 5 0
−0.9502
−0.7501
0 0 1
3
−0.1334
𝑉 2() = −0.19
−0.25
1
𝑋 (1) ≅ −1
−1
143
𝑎11 𝑥1 (𝑘+1) = − 𝑎12 𝑥2 (𝑘) + 𝑎13 𝑥3 (𝑘) + ⋯ + 𝑎1𝑛 𝑥𝑛 (𝑘) + 𝑏1
SPACE FOR HINTS
𝑎21 𝑥1 (𝑘+1) + 𝑎22 𝑥2 (𝑘+1) = − 𝑎23 𝑥3 (𝑘) + ⋯ + 𝑎2𝑛 𝑥𝑛 (𝑘) + 𝑏2
−𝑈𝑋 (𝑘) + 𝑏
⟹ 𝑋 (𝑘+1) =
𝐷+𝐿
⟹ 𝑋 (𝑘+1) = 𝐷 + 𝐿 −1
(𝑏 − 𝑈𝑋 (𝑘) )
⟹ 𝑋 (𝑘+1) = 𝐷 + 𝐿 −1
𝑏− 𝐷+𝐿 −1
𝑈𝑋 (𝑘)
𝑘+1 𝑘
⟹𝑋 = 𝐻𝑋 + 𝑐 ; 𝑘 = 0,1,2, … (3)
−1 −1
where 𝐻 = − 𝐷 + 𝐿 𝑈, 𝑐 = 𝐷+𝐿 𝑏
= 𝑋 (𝑘) − 𝑋 (𝑘) − 𝐷 + 𝐿 −1
𝑈𝑋 (𝑘) + 𝐷 + 𝐿 −1
𝑏
= 𝑋 (𝑘) − (𝐼 + 𝐷 + 𝐿 −1
𝑈)𝑋 (𝑘) + 𝐷 + 𝐿 −1
𝑏
= 𝑋 (𝑘) − 𝐷 + 𝐿 −1
[ 𝐷 + 𝐿 + 𝑈]𝑋 (𝑘) + 𝐷 + 𝐿 −1
𝑏
= 𝑋 (𝑘) − 𝐷 + 𝐿 −1
(𝐴𝑋 (𝑘) ) + 𝐷 + 𝐿 −1
𝑏
𝑋 (𝑘+1) = 𝑋 (𝑘) − 𝐷 + 𝐿 −1
𝑏 − 𝐴𝑋 (𝑘) (4)
𝑋 (𝑘+1) − 𝑋 (𝑘) = 𝐷 + 𝐿 −1
𝑏 − 𝐴𝑋 (𝑘) (5)
∴ 𝑉 (𝑘) = 𝐷 + 𝐿 −1 (𝑘)
𝑟
144
Where𝑉 (𝑘) = 𝑋 (𝑘+1) − 𝑋 (𝑘) , 𝑟 (𝑘) = 𝑏 − 𝐴𝑋 (𝑘)
SPACE OF HINTS
(𝑘+1) (𝑘) (𝑘)
From 5 ⟹ 𝑋 −𝑋 𝐷 + 𝐿 = 𝑏 − 𝐴𝑋
𝑉 (𝑘) 𝐷 + 𝐿 = 𝑟 (𝑘)
Example: 2.4.2
Solution:
𝑋 𝑘+1 = 𝐻𝑋 𝑘 + 𝐶
−1 −1
Where 𝐻 = − 𝐷 + 𝐿 𝑈, 𝑐 = 𝐷+𝐿 𝑏.
2 −1 0
𝐴 = −1 2 −1
0 −1 2
0 0 0 2 0 0
From matrix 𝐴, 𝐿 = −1 0 0 , 𝐷= 0 2 0,
0 −1 0 0 0 2
0 −1 0
𝑈= 0 0 −1
0 0 0
2 0 0
𝐷 + 𝐿 = −1 2 0
0 −1 2
145
−1
1
𝐷+𝐿 = 𝑎𝑑𝑗 (𝐷 + 𝐿)
SPACE FOR HINTS 𝐷+𝐿
1 0 0
2
−1
1 1 0
⟹ 𝐷+𝐿 = 4 2
1 1 1
8 4 2
−1
To find H & C:𝐻 = − 𝐷 + 𝐿 𝑈
1 0 0
2
1 1 0 −1 0
=− 4 2 0
0 0 −1
0 0 0
1 1 1
8 4 2
0 1 0
2
1 1
𝐻= 0 4 2
0 1 1
8 4
−1
𝑐 = 𝐷+𝐿 𝑏
1 0 0
2
1 1 7
= 4 2 0
1
1
1 1 1
8 4 2
146
7
2 SPACE OF HINTS
9
𝑐= 4
13
8
∴ 𝑋 (𝑘+1) = 𝐻𝑋 (𝑘) + 𝑐
0 1 0 7
2 2
1 1 9
⟹ 𝑋 𝑘+1 = 0 4 2 𝑋𝑘 + 4
0 1 1 13
8 4 8
1stIteration:𝑘 = 0
0 1 0 7 0 1 0 7
2 2 2 2
1 1 9 1 1 0 9
𝑋 1
= 0 4 2 𝑋 + 0 4 = 0 4 2 0 + 4
0
0 1 1 13 0 1 1 13
8 4 8 8 4 8
7
2
9
𝑋 (1) = 4
13
8
2nd Iteration:𝑘 = 1
0 1 0 7
2 2
1 1 9
𝑋 (2) = 0 4 2 𝑋 (1) + 4
0 1 1 13
8 4 8
147
0 1 0 7 7
2 2 2
SPACE FOR HINTS
1 1 9 9
= 0 4 2 4 + 4
0 1 1 13 13
8 4 8 8
1.125 3.5
= 2.1875 + 2.25
0.6875 1.625
4.625
(2)
𝑋 = 3.625
2.3125
3rdIteration: 𝑘 = 2
0 1 0 7
2 2
1 1 9
𝑋 (3) = 0 4 2 𝑋 (2) + 4
0 1 1 13
8 4 8
0 1 0 7
2 2
1 1 4.625 9
= 0 4 2 3.625 + 4
2.3125
0 1 1 13
8 4 8
5.3125
𝑋 (3) = 4.3125
2.6563
𝑟 (𝑘) = 𝑏 − 𝐴𝑋 (𝑘)
𝑉 (𝑘) = 𝐷 + 𝐿 −1 (𝑘)
𝑟
148
1st Iteration:𝑘 = 0
SPACE OF HINTS
𝑟 (0) = 𝑏 − 𝐴𝑋 (0)
7 2 −1 0 0 7
(0)
= 1 − −1 2 −1 0 𝑟 = 1
1 0 −1 2 0 1
𝑉 (0) = 𝐷 + 𝐿 −1 (0)
𝑟
1 0 0
2
1 1 7
= 4 2 0
1
1
1 1 1
8 4 2
3.5
(0)
𝑉 = 2.25
1.625
0 3.5
= 0 + 2.25
0 1.625
3.5
(1)
𝑋 = 2.25
1.625
2ndIteration: 𝑘 = 1
𝑟 (1) = 𝑏 − 𝐴𝑋 (1)
7 2 −1 0 3.5
= 1 − −1 2 −1 2.25
1 0 −1 2 1.625
149
7 4.75
= 1 − −0.625
SPACE FOR HINTS
1 1
2.25
(1)
𝑟 = 1.625
0
𝑉 (1) = 𝐷 + 𝐿 −1 (1)
𝑟
1 0 0
2
1 1 2.25
= 4 2 0
1.625
0
1 1 1
8 4 2
1.125
(1)
𝑉 = 1.375
0.6875
3.5 1.125
= 2.25 + 1.375
1.625 0.6875
4.625
(2)
𝑋 = 3.625
2.3125
3rdIteration:𝑘 = 2
𝑟 (2) = 𝑏 − 𝐴𝑋 (2)
7 2 −1 0 4.625
= 1 − −1 2 −1 3.625
1 0 −1 2 2.3125
7 5.625
= 1 − 2.625
1 1
150
1.375
𝑟 (2) = 0.6875 SPACE OF HINTS
0
𝑉 (2) = 𝐷 + 𝐿 −1 (2)
𝑟
1 0 0
2
1 1 1.375
= 4 2 0
0.6875
0
1 1 1
8 4 2
0.6875
𝑉 (2) = 0.6875
0.3438
4.625 0.6875
= 3.625 + 0.6875
2.3125 0.3438
5.3125
𝑋 (3) = 4.3125
2.6563
151
(𝑘+1)
𝑋 (𝑘+1) − 1 − 𝑤 𝑋 (𝑘)
⟹𝑋 =
SPACE FOR HINTS 𝑤
𝑋 (𝑘+1) − 1 − 𝑤 𝑋 (𝑘)
= −𝐷 −1 𝐿𝑋 (𝑘+1) − 𝐷 −1 𝑈𝑋 (𝑘) + 𝐷 −1 𝑏
𝑤
After simplification,
𝑋 (𝑘+1) = 𝐷 + 𝑤𝐿 −1
𝐷 1 − 𝑤 − 𝑤𝑈 𝑋 (𝑘) + 𝑤(𝐷 + 𝑤𝐿)−1 𝑏 (3)
−1
where 𝐻 = 𝐷 + 𝑤𝐿 𝐷 1 − 𝑤 − 𝑤𝑈 , 𝑐 = 𝑤(𝐷 + 𝑤𝐿)−1 𝑏
= 𝑋 (𝑘) − 𝐷 + 𝑤𝐿 −1
𝐷 + 𝑤𝐿 − 𝐷 1 − 𝑤 + 𝑤𝑈 𝑋 (𝑘)
+ 𝑤(𝐷 + 𝑤𝐿)−1 𝑏
= 𝑋 (𝑘) − 𝐷 + 𝑤𝐿 −1
𝐷 + 𝑤𝐿 − 𝐷 + 𝐷𝑤 + 𝑤𝑈 𝑋 (𝑘)
+ 𝑤(𝐷 + 𝑤𝐿)−1 𝑏
= 𝑋 (𝑘) − 𝐷 + 𝑤𝐿 −1
𝐿 + 𝐷 + 𝑈 𝑤𝑋 (𝑘) + 𝑤(𝐷 + 𝑤𝐿)−1 𝑏
= 𝑋 (𝑘) − 𝐷 + 𝑤𝐿 −1
𝐴𝑤𝑋 (𝑘) + 𝑤(𝐷 + 𝑤𝐿)−1 𝑏
= 𝑋 (𝑘) + 𝐷 + 𝑤𝐿 −1
𝑤[𝑏 − 𝐴𝑋 (𝑘) ]
= 𝑋 (𝑘) + 𝐷 + 𝑤𝐿 −1
𝑤𝑟 𝑘
(5)
𝑘
where 𝑟 = [𝑏 − 𝐴𝑋 (𝑘) ] is residual and 𝑉 (𝑘) = 𝐷 + 𝑤𝐿 −1
𝑤𝑟 𝑘
152
The above equation is the SOR method in its error format.
SPACE OF HINTS
Note:
Theorem: 2.4.1
Proof:
𝐴𝑚 = 𝐴𝑚 −1 . 𝐴
≤ 𝐴𝑚 −1 𝐴
≤ 𝐴𝑚 −2 . 𝐴 𝐴
≤ 𝐴𝑚 −2 𝐴 . 𝐴
≤ 𝐴𝑚 −2 𝐴 2
𝐴𝑚 ≤ 𝐴 𝑚
153
Then there exist a similarity transformation 𝑆 such that, 𝑨 =
SPACE FOR HINTS 𝑺−𝟏 𝑫𝑺where 𝑫 is the diagonal matrix, having eigenvalues of 𝑨 on the
diagonal.
𝑖𝑒) 𝐴 = 𝑆 −1 𝐷𝑆
𝐴2 = 𝐴. 𝐴 = (𝑆 −1 𝐷𝑆)(𝑆 −1 𝐷𝑆)
𝐴2 = 𝑆 −1 𝐷 2 𝑆
Similarly, 𝐴3 = 𝑆 −1 𝐷 3 𝑆
𝜆1 𝑚 0 ⋯ 0
𝑚
In general, 𝐴𝑚 = 𝑆 −1 𝐷 𝑚 𝑆 where 𝐷 𝑚 = 0 𝜆2 ⋯ 0
⋮ ⋮ ⋱ ⋮
0 0 ⋯ 𝜆𝑛 𝑚
Theorem: 2.4.2
Proof:
Let 𝑆𝑛 = 𝐼 + 𝐴 + 𝐴2 + ⋯ + 𝐴𝑚 + ⋯
∴ 𝑆𝑛 = (𝐼 − 𝐴)−1
154
𝐴𝑚 = 𝑆𝑚 − 𝑆𝑚 −1
SPACE OF HINTS
∴ lim 𝐴𝑚 = 0
𝑚 →∞
Suppose thatlim𝑚 →∞ 𝐴𝑚 = 0.
−1
Hence 𝐼 − 𝐴 ≠ 0 and hence 𝐼 − 𝐴 exists.
Theorem: 2.4.3
𝑘+1 𝑘
The iteration method of the form 𝑋 = 𝐻𝑋 + 𝐶, 𝑘=
0,1,2, … for the solution of𝑨𝑿 = 𝒃converges to the exact solution for
any initial vector if 𝐻 < 1 (or) if𝜌 𝐻 < 1.
Proof:
Without loss of generality, we take the initial method 𝑋 (0) and put
𝑘 = 0 in (1) we get
𝑋 (1) = 𝐻𝑋 (0) + 𝑐
𝑋 (1) = 𝑐
Put 𝑘 = 1, 𝑋 (2) = 𝐻𝑋 1 + 𝑐
= 𝐻𝑐 + 𝑐
𝑋 (2) = (𝐻 + 𝐼)𝑐
Put 𝑘 = 2, 𝑋 (3) = 𝐻𝑋 2 + 𝑐
155
𝑋 (3) = (𝐼 + 𝐻 + 𝐻 2 + ⋯ )𝑐
SPACE FOR HINTS
Applying lim𝑚 →∞ on both sides,
−1
𝐼−𝐻 𝑐 = [𝐼 − (−𝐷 −1 (𝐿 + 𝑈))]−1 𝐷 −1 𝑏
{∵ 𝐻 = −𝐷 −1 𝐿 + 𝑈 , 𝑐 = 𝐷 −1 𝑏}
= 𝐷𝐷 −1 + 𝐷 −1 (𝐿 + 𝑈)) −1
𝐷 −1 𝑏
= 𝐷 −1 (𝐷 + 𝐿 + 𝑈)) −1
𝐷 −1 𝑏
−1
= (𝐷 + 𝐿 + 𝑈)) 𝐷𝐷 −1 𝑏
= 𝐴−1 𝐷𝐷 −1 𝑏 [ since 𝐴 = 𝐷 + 𝐿 + 𝑈]
= 𝐴−1 𝑏
−1
𝐼−𝐻 𝑐=𝑋
−1
𝐼−𝐻 𝑐 satisfies the system of vectors X.
Theorem: 2.4.4
156
Proof:
SPACE OF HINTS
𝑘
𝜖 = 𝐻 𝑘 𝑐1 𝑋1 + 𝑐2 𝑋2 + ⋯ + 𝑐𝑛 𝑋𝑛
= 𝑐1 𝐻 𝑘 𝑋1 + 𝑐2 𝐻 𝑘 𝑋2 + ⋯ + 𝑐𝑛 𝐻 𝑘 𝑋𝑛 (1)
Since 𝐴𝑋 = 𝜆𝑋 ⟹ 𝐻𝑋 = 𝜆𝑋
𝑖𝑒) 𝐻 𝑘 𝑋 = 𝜆𝑖 𝑘 𝑋 𝑖 = 1 𝑡𝑜 𝑛
∴ 𝜖 𝑘
= 𝑐1 𝜆1 𝑘 𝑋1 + 𝑐2 𝜆2 𝑘 𝑋2 + ⋯ + 𝑐𝑛 𝜆𝑛 𝑘 𝑋𝑛
Necessary part:
𝑘 = 0,1,2, … is converges.
Hence lim𝑚 →∞ 𝜖 (𝑘) = 0for any arbitrary initial vector and for any
arbitrary error vector𝜖 (0) .
Sufficient part:
For 𝜆𝑖 < 1, 𝑖 = 1 𝑡𝑜 𝑛
157
∴ lim 𝜖 (𝑘) = 0 ∴ lim 𝜆𝑖 (𝑘) = 0
𝑘→∞ 𝑘→∞
SPACE FOR HINTS
Definition:
Theorem: 2.4.5
Proof:
where 𝐻 = −𝐷 −1 𝐿 + 𝑈 , 𝑐 = 𝐷 −1 𝑏
𝑋 (𝑘+1) = −𝐷 −1 𝐿 + 𝑈 𝑋 (𝑘) + 𝐷 −1 𝑏
= −𝐷 −1 𝐴 − 𝐷 𝑋 (𝑘) + 𝐷 −1 𝑏 {𝑠𝑖𝑛𝑐𝑒 𝐷 + 𝑈 + 𝐿
= 𝐴}
= 𝐼−𝐷 −1 𝐴 𝑋 (𝑘) + 𝐷 −1 𝑏
𝑛
1
𝑎𝑖𝑗 < 1, ∀𝑖
𝑎𝑖𝑖
𝑗 =1
𝑖≠𝑗
158
1 1
⟹ < 𝑛 , ∀𝑖 SPACE OF HINTS
𝑎𝑖𝑖 𝑗 =1 𝑎𝑖𝑗
𝑖≠𝑗
Theorem: 2.4.6
Proof:
−1
=− 𝐷+𝐿 𝐴 − 𝐷 + 𝐿 𝑋 (𝑘) + 𝐷 + 𝐿 −1
𝑏
{𝑠𝑖𝑛𝑐𝑒 𝐷 + 𝑈 + 𝐿 = 𝐴 ⟹ 𝑈 = 𝐴 − (𝐿 + 𝐷)}
−1
= 𝐼− 𝐷 + 𝐿 𝐴 𝑋 (𝑘) + 𝐷 + 𝐿 −1
𝑏
−1
𝜌 𝐼− 𝐷 + 𝐿 𝐴 <1
−1
Let 𝜆 be the eigen value of 𝐼− 𝐷 + 𝐿 𝐴.
−1
Then 𝐼− 𝐷 + 𝐿 𝐴 𝑋 = 𝜆𝑋 {∵ 𝐴𝑋 = 𝜆𝑋}
Multiply by 𝐷 + 𝐿
159
⟹ 𝐷 + 𝐿 𝑋 − 𝐴𝑋 = 𝜆 𝐷 + 𝐿 𝑋
SPACE FOR HINTS
⟹ 𝐷+𝐿 −𝐴 𝑋 =𝜆 𝐷+𝐿 𝑋
⟹ −𝑈𝑋 = 𝜆 𝐷 + 𝐿 𝑋 {𝑠𝑖𝑛𝑐𝑒 𝐷 + 𝑈 + 𝐿 = 𝐴
⟹ −𝑈 = (𝐷 + 𝐿 − 𝐴)}
𝑛 𝑖
⟹− 𝑎𝑖𝑗 𝑋𝑗 = 𝜆 𝑎𝑖𝑗 𝑋𝑗
𝑗 =𝑖+1 𝑗 =𝑖+1
𝑛 𝑖−1
𝑛 𝑖−1
𝑛 𝑖−1
𝑛 𝑖−1
𝑖−1 𝑛
𝑛
𝑗 =𝑖+1 𝑎𝑖𝑗
∴ 𝜆 ≤ (3)
𝑖−1
𝑎𝑖𝑖 − 𝑗 =1 𝑎𝑖𝑗
160
Since A is strictly diagonally dominant
SPACE OF HINTS
𝑖−1
𝑖−1 𝑛
𝑖−1
𝑎𝑖𝑖 − 𝑗 =1 𝑎𝑖𝑗
⟹ 𝑛
>1
𝑗 =𝑖+1 𝑎𝑖𝑗
𝑛
𝑗 =𝑖+1 𝑎𝑖𝑗
⟹ <1
𝑎𝑖𝑖 − 𝑖−1 𝑗 =1 𝑎𝑖𝑗
−1
From 3 ⟹ 𝜆 < 1 since 𝜌 𝐼− 𝐷 + 𝐿 𝐴 <1
Example:2.4.3
1 −𝑎 𝑥1 𝑏1
= where 𝑎 is a real constant.
−𝑎 1 𝑥2 𝑏2
(ii). For find the value of 𝑤 which minimizes the special radius of the
SOR iteration matrix.
Solution:
(i). The two iteration methods are Gauss Jacobi and Gauss-Seidel.
161
𝑋 (𝑘+1) = −𝐷 −1 𝐿 + 𝑈 𝑋 (𝑘) + 𝐷 −1 𝑏
SPACE FOR HINTS
1 −𝑎 0 0 0 −𝑎 1 0
Given 𝐴 = , 𝐿= , 𝑈= , 𝐷=
−𝑎 1 −𝑎 0 0 0 0 1
1 0 0 −𝑎
𝐷 −1 = , 𝐿+𝑈 =
0 1 −𝑎 0
1 0 0 −𝑎
Now, 𝐻=−
0 1 −𝑎 0
0 −𝑎
=−
−𝑎 0
0 𝑎
𝐻=
𝑎 0
1 0 𝑏1 𝑏
𝑐= = 1
0 1 𝑏2 𝑏2
0 𝑎 (𝑘) 𝑏
(1) ⟹ 𝑋 (𝑘+1) = 𝑋 + 1
𝑎 0 𝑏2
0 𝑎 𝜆 0
⟹ − =0
𝑎 0 0 𝜆
−𝜆 𝑎
⟹ =0
𝑎 −𝜆
⟹ 𝜆2 − 𝑎2 = 0
⟹ 𝜆2 = 𝑎2
⟹ 𝜆 = ±𝑎
∴𝜆= 𝑎 <1
∴ the condition for the convergesof the Jacobi iteration method is 𝑎 <
1.
162
Hence the spectral radius of Jacobi iteration matrix becomes𝜌 𝐻𝑗 =
SPACE OF HINTS
𝜆= 𝑎.
1 0 −1 1 0
𝐷+𝐿 = ⟹ 𝐷+𝐿 =
−𝑎 1 𝑎 1
1 0 0 −𝑎
𝐻=−
𝑎 1 0 0
0 −𝑎
=−
0 −𝑎2
0 𝑎
𝐻=
0 𝑎2
1 0 𝑏1
𝑐=
𝑎 1 𝑏2
0 𝑎 𝑘 1 0 𝑏1
2 ⟹ 𝑋 𝑘+1 = 2 𝑋 +
0 𝑎 𝑎 1 𝑏2
−𝜆 𝑎
𝑖𝑒) 2 =0
0 𝑎 −𝜆
⟹ −𝜆 𝑎2 − 𝜆 = 0
⟹ −𝜆 𝑎2 − 𝜆 = 0
⟹ 𝑎2 − 𝜆 = 0 𝑜𝑟 𝜆 = 0
⟹ 𝑎2 = 𝜆 𝑜𝑟 𝜆 = 0
163
For convergence 𝑎2 < 1 ⟹ 𝑎 < 1.
SPACE FOR HINTS
(ii). The optimal relaxation factor for SOR method is given by
2 1 − 1 − 𝜇2
𝑊𝑜𝑝𝑡 = 𝑒𝑟𝑒 𝜇 = 𝑎
𝜇2
2 1 − 1 − 𝑎2
=
𝑎2
2 1 − 1 − (0.5)2
= (𝑓𝑜𝑟 𝑎 = 0.5)
(0.5)2
𝑊𝑜𝑝𝑡 = 1.0718
Example: 2.4.4
1 𝑘 2
𝑋𝑛+1 = 𝑀𝑋𝑛 + 𝑏, suppose 𝐴 = , 𝑘≠ , 𝑘 𝑖𝑠 𝑟𝑒𝑎𝑙.
2𝑘 1 2
Solution:
1 𝑘
Given 𝐴 =
2𝑘 1
We know that, 𝐴 = 𝐿 + 𝑈 + 𝐷
0 0 0 𝑘 1 0
⟹𝐿= , 𝑈= , 𝐷=
2𝑘 0 0 0 0 1
164
1 1 1 0
𝐷 −1 = 𝑎𝑑𝑗 𝐷 = SPACE OF HINTS
𝐷 1 0 1
1 0
𝐷 −1 =
0 1
0 𝑘
𝐿+𝑈 =
2𝑘 0
1 0 0 𝑘 0 𝑘
∴𝐻=− =−
0 1 2𝑘 0 2𝑘 0
0 𝑘 𝑛 1 0 𝑏1
1 ⟹ 𝑋 𝑛+1 = − 𝑋 +
2𝑘 0 0 1 𝑏2
−𝜆 −𝑘
𝑖𝑒) =0
−2𝑘 −𝜆
⟹ 𝜆2 − 2𝑘 2 = 0
⟹ 𝜆2 = 2𝑘 2
⟹𝜆 =± 2𝑘
∴ 𝜌 𝐻𝑗 = 2 𝑘
1
For convergence 𝜌 𝐻𝑗 < 1 ⟹ 2 𝑘 < 1 ⟹ 𝑘 <
2
2 1 − 1 − 𝜇2 2
𝑊𝑜𝑝𝑡 = = 1 − 1 − 2𝑘 2
𝜇2 2𝑘 2
165
𝑨𝑿 = 𝝀 𝑿 (1)
SPACE FOR HINTS
The eigenvalues of a matrix 𝐴 are given by the roots of the
characteristic equation
𝑑𝑒𝑡 𝐴 − 𝜆𝐼 = 0 (2)
𝐵1 = 𝐴 𝑎𝑛𝑑 𝑎1 = 𝑡𝑟 𝐵1
1
𝐵2 = 𝐴 𝐵1 − 𝑎1 𝐼 𝑎𝑛𝑑 𝑎2 = 𝑡𝑟 𝐵2
2
1
𝐵3 = 𝐴 𝐵2 − 𝑎2 𝐼 𝑎𝑛𝑑 𝑎3 = 𝑡𝑟 𝐵3
3
1
𝐵𝑘 = 𝐴 𝐵𝑘−1 − 𝑎𝑘−1 𝐼 𝑎𝑛𝑑 𝑎𝑘 = 𝑡𝑟 𝐵𝑘
𝑘
1
𝐵𝑛 = 𝐴 𝐵𝑛−1 − 𝑎𝑛−1 𝐼 𝑎𝑛𝑑 𝑎𝑛 = 𝑡𝑟 𝐵𝑛
𝑛
𝐴𝑦𝑖 = 𝜆𝑖 𝑦𝑖 (5)
166
which shows that an eigenvector is determined only to within an
SPACE OF HINTS
arbitrary multiplicative constant.Premultiplying (1) 𝑚 times by A we
obtain
𝐴𝑚 𝑥 = 𝜆𝑚 𝑥 (6)
eigenvector.
𝑝(𝐴) = 0
which gives the result that a square matrix A satisfies its own
characteristic equation. This result is known as the Cayley-Hamilton
theorem. We also find
𝐴𝑢𝑖 = 𝜆𝑖 𝑢𝑖 (8)
𝐴𝑇 𝑣𝑗 = 𝜆𝑗 𝑣𝑗 (9)
𝑣𝑗 𝑇 𝐴 𝑢𝑖 = 𝜆𝑖 𝑣𝑗 𝑇 𝑢𝑖
𝑣𝑗 𝑇 𝐴 𝑢𝑖 = 𝜆𝑗 𝑣𝑗 𝑇 𝑢𝑖
(𝜆𝑖 − 𝜆𝑗 )𝑣𝑗 𝑇 𝑢𝑖 = 0.
167
𝑣𝑗 𝑇 𝑢𝑖 = 0.
SPACE FOR HINTS
If 𝑖 = 𝑗, 𝑣𝑗 𝑇 𝑢𝑖 ≠ 0 and since the length of eigenvectors is arbitrarywe
normalize them such that
𝑣𝑗 𝑇 𝑢𝑖 = 1
Thus, we have
0, 𝑖 ≠ 𝑗
𝑣𝑗 𝑇 𝑢𝑖 =
1 𝑖=𝑗
𝐵 = 𝑆 −1 𝐴 𝑆 (10)
then the matrices A and B are said to be similar and those equation is
𝐴 = 𝑆 𝐵 𝑆 −1 (11)
𝐴𝑢𝑖 = 𝜆𝑗 𝑢𝑖
or 𝑆 −1 𝐴𝑢𝑖 = 𝜆 𝑆 −1 𝑢𝑖 (12)
𝐵𝑣𝑖 = 𝜆𝑖 𝑣𝑖 (13)
168
A similarity transformation, where S is the matrix of eigenvectors,
SPACE OF HINTS
reduces a matrix A to its diagonal form. The eigenvalues of A are
located on the leading diagonal, of this diagonal matrix.
1
𝐴−1 = 𝑢𝑖 = 𝑢
𝜆𝑖 𝑖
The inverse matrix 𝐴−1 has the same eigenvectors as A but has the
1
eigenvalues .
𝜆𝑖
1 2 −2 3 2 2
(i). 𝐴 = 1 1 1 (ii). 𝐴 = 2 5 2
1 3 −1 2 2 3
(b). Verify that 𝑺−𝟏 𝑨𝑺is a diagonal matrix, where 𝑺 is the matrix of
eigenvectors.
Solution:
1 2 −2
(i). Given 𝐴 = 1 1 1
1 3 −1
𝑖𝑒) 𝐴 − 𝜆𝐼 𝑋 = 0 (1)
169
1 2 −2 𝜆 0 0
1 1 1 − 0 𝜆 0 =0
SPACE FOR HINTS
1 3 −1 0 0 𝜆
1−𝜆 2 −2
⟹ 1 1−𝜆 1 =0
1 3 −1 − 𝜆
⟹ 1 − 𝜆 −1 + 𝜆 − 𝜆 − 𝜆2 − 3 − 2 −1 − 𝜆 − 1 + 2 2 + 𝜆 = 0
⟹ 1 − 𝜆 −4 − 𝜆2 − 2 −2 − 𝜆 + 2 𝜆 + 2 = 0
⟹ 1 − 𝜆 𝜆2 − 4 = 0
⟹ 1 − 𝜆 = 0 𝑜𝑟 𝜆2 − 4 = 0
⟹𝜆=1 𝑜𝑟 𝜆 = ±2
Case: 1when 𝜆 = 1
1 ⟹ 𝐴−𝐼 𝑋 =0
1−1 2 −2
𝑖𝑒) 1 1−1 1 𝑋=0
1 3 −1 − 1
0 2 −2 𝑥1
1 0 1 𝑥2 = 0
1 3 −2 𝑥3
𝑥1 + 0𝑥2 + 𝑥3 = 0
𝑥1 + 3𝑥2 − 2𝑥3 = 0
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
2 − 0 −2 − 0 0 − 2
170
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘 SPACE OF HINTS
2 −2 −2
𝑥1 2𝑘
⟹ 𝑥2 = −2𝑘
𝑥3 −2𝑘
𝑥1 1
1
Put 𝑘 = − ⟹ 𝑥2 = −1
2
𝑥3 −1
1
∴ The eigen vectors corresponding the eigenvalue 𝜆 = 1 is 𝑋 = −1
−1
Case: 2when 𝜆 = 2
1 ⟹ 𝐴 − 2𝐼 𝑋 = 0
1−2 2 −2
1 1−2 1 𝑋=0
1 3 −1 − 2
−1 2 −2 𝑥1
1 −1 1 𝑥2 = 0
1 3 −3 𝑥3
⟹ 𝑥1 − 𝑥2 + 𝑥3 = 0
⟹ 𝑥1 + 3𝑥2 + 3𝑥3 = 0
𝑥1 𝑥2 𝑥3
⟹ = = = 𝑘 (𝑠𝑎𝑦)
2 − 2 −2 + 1 1 − 2
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
0 −1 −1
𝑥1 0
𝑥2 = −𝑘
𝑥3 −𝑘
𝑥1 0
𝑥
Put 𝑘 = −1, ⟹ 2 = 1
𝑥3 1
171
Case: 3when 𝜆 = −2
SPACE FOR HINTS
1 ⟹ 𝐴−𝐼 𝑋 =0
3 2 −2
1 3 1 𝑋=0
1 3 1
3 2 −2 𝑥1
1 3 1 𝑥2 = 0
1 3 1 𝑥3
𝑥1 + 3𝑥2 + 𝑥3 = 0
𝑥1 + 3𝑥2 + 𝑥3 = 0
𝑥1 𝑥2 𝑥3
⟹ = = = 𝑘(𝑠𝑎𝑦)
8 −5 7
𝑥1 𝑘
𝑥2 = −5𝑘
𝑥3 7𝑘
𝑥1 8
𝑥
Put 𝑘 = 1, ⟹ 2 = −5
𝑥3 7
−1 0 8
Now, 𝑆 = 1 1 −5 ⟹ 𝑆 = −1 7 + 5 + 8 1 − 1 = −12
1 1 7
−1
1 −12 8 8 −12 12 0
𝑆 = 12 15 −3 , 𝑎𝑑𝑗 𝑆 = 8 15 −1
12
0 −1 1 8 −3 1
−1
1 −12 8 8 1 2 −2 −1 0 8
𝑆 𝐴𝑆 = 12 15 −3 1 1 1 1 1 −5
12
0 −1 1 1 3 −1 1 1 7
1 12 0 0
= 0 24 0
12
0 0 −24
172
1 0 0
𝑆 −1 𝐴𝑆 = 0 2 0 SPACE OF HINTS
0 0 −2
3 2 2
(i). Given 𝐴 = 2 5 2
2 2 3
𝑖𝑒) 𝐴 − 𝜆𝐼 𝑋 = 0
3−𝜆 2 2
𝐴 − 𝜆𝐼 = 2 5−𝜆 2
2 2 3−𝜆
3−𝜆 2 2
𝐴 − 𝜆𝐼 = 0 ⟹ 2 5−𝜆 2 =0
2 2 3−𝜆
⟹ 3−𝜆 5 − 𝜆 3 − 𝜆 − 4 − 2 6 − 2𝜆 − 4 + 2 4 − 10 + 2𝜆
=0
⟹ 3 − 𝜆 15 − 8𝜆 + 𝜆2 − 4 − 4 + 4𝜆 + 4𝜆 − 12 = 0
⟹ 𝜆3 − 11𝜆2 + 27𝜆 − 17 = 0
𝜆 = 1, 𝜆2 − 10𝜆 + 17 = 0 1 1 − 11 27 − 17
10± 100−4(17)
𝜆= 0 1 − 10 17
2
10± 32
= 1 − 10 17 0
2
𝜆 =5±2 2
173
Case: 1When 𝜆 = 1
SPACE FOR HINTS
2 2 2
2 4 2 𝑋=0
2 2 2
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
4−8 4−4 8−4
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
−4 0 4
𝑥1 −4
𝑥2 = 0
𝑥3 4
𝑥1 −1
𝑥
Put 𝑘 = 4 ⟹ 2 = 0
𝑥3 1
Case: 2 when 𝜆 = 5 + 2 2
−2 − 2 2 2 2
2 −2 2 2 𝑋=0
2 2 −2 − 2 2
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
4+4 2 4+4+4 2 4 2+8−4
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
4+4 2 8+4 2 4 2+4
𝑥1 4+4 2
𝑥2 = 8 + 4 2
𝑥3
4+4 2
𝑥1 1+ 2 1
⟹ 𝑥2 = 2 + 2 = 2
𝑥3 1
1+ 2
Case: 3 when 𝜆 = 5 − 2 2
174
−2 + 2 2 2 2
SPACE OF HINTS
2 2 2 2 𝑋=0
2 2 −2 + 2 2
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
4−4 2 4+4−4 2 −2 2 + 8 − 4
𝑥1 𝑥2 𝑥3
⟹ = = =𝑘
4−4 2 8−4 2 4−2 2
𝑥1 4−4 2
𝑥2 = 8 − 4 2
𝑥3
4−4 2
𝑥1 1− 2 1
𝑥
⟹ 2 = 2− 2 = − 2
𝑥3 1
1− 2
1 1 1
𝑆= 0 2 2
−2 2 2 2
𝑆 =1 2 + 2 − − 2 + 1( 2)
2 2 2 2
𝑎𝑑𝑗 𝑆 = 0 2 −2
−2 2 2 2
2 2 0 −2 2 2 0 −2
−1
1 1
𝑆 = 2 2 2 = 1 2 1
4 2 4
2 −2 2 1 2 1
2 0 −2 3 2 2 1 1 1
−1
1
𝑆 𝐴𝑆 = 1 2 1 2 5 2 0 2 2
4
1 2 1 2 2 3 −2 2 2 2
1 0 0
−1
𝑆 𝐴𝑆 = 0 5+2 2 0
0 0 5− 2
175
2.6: Bounds on eigenvalues
SPACE FOR HINTS
Theorem:2.6.1State and prove Gerschgorin theorem
Proof:
𝑥 𝑖,𝑗
Since ≤ 1, 𝑗 = 1 𝑡𝑜 𝑛.
𝑥 𝑖,𝑘
Since 𝑘 is arbitrary,
176
𝑛
SPACE OF HINTS
3 ⟹ 𝜆 ≤ max 𝑎𝑖𝑗
𝑖
𝑗 =1
∴ Applying the above procedure to𝑨𝑻 , we see that the theorem is true for
columns.
𝜆 ≤ max 𝑎𝑖𝑗
𝑗
𝑖=1
Let 𝑃𝑘 be the sum of the moduliof the elements along the 𝑘 𝑡 row
excluding the diagonal element 𝑎𝑘𝑘 . Then every eigenvalue of 𝑨 lies
inside or on the boundary of atleast one of the circles 𝜆 − 𝑎𝑘𝑘 = 𝑃𝑘 ,
𝑘 = 1 𝑡𝑜 𝑛.
Proof:
177
𝑥𝑖,1 𝑥𝑖,2 𝑥𝑖,𝑛
⟹ 𝜆𝑖 = 𝑎𝑘1 + 𝑎𝑘2 + ⋯ + 𝑎𝑘𝑘 (1) + 𝑎𝑘𝑛
SPACE FOR HINTS 𝑥𝑖,𝑘 𝑥𝑖,𝑘 𝑥𝑖,𝑘
𝑥 𝑖,𝑗
Since ≤ 1, 𝑗 = 1 𝑡𝑜 𝑛.
𝑥 𝑖,𝑘
≤ 𝑎𝑘𝑖 = 𝑃𝑘
𝑖=1
𝑖≠𝑘
The eigenvalue of 𝑨 lie inside (or) on the union of the above circles.
Since 𝑨 and 𝑨𝑻 have the same eigenvalues, hence all the eigenvalues lie
in the union of the 𝑛 circles.
𝜆𝑖 − 𝑎𝑘𝑘 ≤ 𝑎𝑗𝑘 , 𝑘 = 1 𝑡𝑜 𝑛
𝑖=1
𝑗 ≠𝑘
Note:
The bounds obtained here are all independent. Hence all the
eigenvalues of A must lie in the intersection of these bounds. These
circles are called the Gerschgorin bounds. If any of the Gerschgorin
circle is isolated, then it contains exactly one eigenvalue.
178
Example:2.6.1
SPACE OF HINTS
1 2 −1
Estimate the eigenvalues of the matrix 𝐴 = 1 1 1 using the
1 3 −1
Gerschgorin bounds. The eigen values lie in the regions
(i). 𝜆 ≤ 5, 𝜆 ≤6
𝜆 − 1 ≤ 3, 𝜆 − 1 ≤ 2, 𝜆 + 1 ≤ 4 and
𝜆 − 1 ≤ 2, 𝜆 − 1 ≤ 5, 𝜆+1 ≤2
Solution:
1 2 −1
(i). Given 𝐴 = 1 1 1
1 3 −1
The eigenvalues lie in the region is given by, 𝜆 ≤ max (𝑟𝑜𝑤 𝑠𝑢𝑚)
𝑖𝑒) 𝜆 ≤ max 4, 3, 5 ⟹ 𝜆 ≤5
𝑖𝑒) 𝜆 ≤ max(3, 6, 3)
⟹ 𝜆 ≤6
𝑛 𝑛
179
Row Column
SPACE FOR HINTS
𝑖𝑒) 𝜆 − 1 ≤ 3, 𝜆−1 ≤2
𝜆 − 1 ≤ 2, 𝜆−1 ≤5
𝜆 + 1 ≤ 4, 𝜆+1 ≤2
Now, 𝜆 − 1 ≤ 3 ⟹ −3 ≤ 𝜆 − 1 ≤ 3 ⟹ −2 ≤ 𝜆 ≤ 4
𝜆 + 1 ≤ 4 ⟹ −4 ≤ 𝜆 + 1 ≤ 4 ⟹ −3 ≤ 𝜆 ≤ 5
𝜆 − 1 ≤ 5 ⟹ −5 ≤ 𝜆 − 1 ≤ 5 ⟹ −4 ≤ 𝜆 ≤ 6
𝜆 + 1 ≤ 2 ⟹ −2 ≤ 𝜆 + 1 ≤ 2 ⟹ −3 ≤ 𝜆 ≤ 1
𝜆𝑖𝑚𝑔
𝜆𝑟𝑒𝑎𝑙
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
180
SPACE OF HINTS
∴ −2 ≤ 𝜆 ≤ 1 is an Gerschgorin bound.
Example:2.6.2
Find the interval which contains the eigenvalue of the symmetric matrix
3 2 2
𝐴= 2 5 2
2 2 3
⟹ 𝜆 ≤9
⟹ 𝜆 ≤9
𝜆𝑖 − 𝑎𝑘𝑘 ≤ 𝑎𝑘𝑖
𝑖=1
𝑖≠𝑘
𝑛
𝜆𝑖 − 𝑎𝑘𝑘 ≤ 𝑎𝑗𝑘
𝑖=1
𝑗 ≠𝑘
Row Column
𝑖𝑒) 𝜆 − 3 ≤ 4, 𝜆−3 ≤4
𝜆 − 5 ≤ 4, 𝜆−5 ≤4
𝜆 − 3 ≤ 4, 𝜆−3 ≤4
181
∴ The union of the circles gives the following interval
SPACE FOR HINTS
−4 ≤ 𝜆 − 3 ≤ 4 −4≤𝜆−5≤4 −4≤𝜆−3≤4
⟹ −1 ≤ 𝜆 ≤ 7 ⟹1≤𝜆≤9 ⟹ −1 ≤ 𝜆 ≤ 7
Example:2.6.3
2 2
Find 𝑨10 when 𝑨 =
2 −1
∴ 𝑆 −1 𝐴𝑆 = 𝐷 𝑜𝑟 𝐴 = 𝑆𝐷𝑆 𝑇
cos 𝜃 − sin 𝜃
Let 𝑆 =
sin 𝜃 cos 𝜃
= 2 cos 2 𝜃 + 2 sin 𝜃 cos 𝜃 + 2 cos 𝜃 sin 𝜃 − sin2 𝜃 −2 cos 𝜃 sin 𝜃 − 2 sin2 𝜃 + 2 cos 2 𝜃 − sin 𝜃 cos 𝜃
−2 sin 𝜃 cos 𝜃 + 2 cos 2 𝜃 − 2 sin2 𝜃 − cos 𝜃 sin 𝜃 2 sin2 𝜃 − 2 sin 𝜃 cos 𝜃 − 2 cos 𝜃 sin 𝜃 − cos 2 𝜃
We know that, 𝑆 −1 𝐴𝑆 = 𝐷
182
∴ −3 2 sin 2𝜃 + 2 cos 2𝜃 = 0
SPACE OF HINTS
3
2 sin 2𝜃 = 2 cos 2𝜃
𝑠𝑖𝑛𝑒 2𝜃 2.2
=
𝑐𝑜𝑠 2𝜃 3
4
⟹ tan 2𝜃 =
3
⟹ 2𝜃 = tan−1 4 3
⟹ 𝜃 = 0.4637
2.99987 0 3 0
𝑆 −1 𝐴𝑆 = =
0 −1.999 0 −2
2 1
Let us consider the orthogonal matrix 𝑆 = . Here 𝑆 𝑇 = 𝑆 −1
−1 2
To find𝑨𝟏𝟎 = 𝑺𝑫𝟏𝟎 𝑺𝑻 :
1 1 2 1
𝑆 −1 = 𝑎𝑑𝑗 𝑆 =
𝑆 5 −1 2
2 1
5 5
−1 2 1
𝑆𝑆 =
−1 2 −1 2
5 5
4 1 2 2
5+ 5 5− 5
=
2 2 1 4
5− 5 5+ 5
1 0
𝑆𝑆 −1 =
0 1
2 1 2 1 4+1 2−2
𝑆𝑆 𝑇 = =
−1 2 −1 2 2−2 1+4
183
1 0
𝑆𝑆 𝑇 = 5
0 1
SPACE FOR HINTS
1 2 1
∴ 𝑆 −1 = 𝑆 𝑇 =
5 −1 2
𝐴10 = 𝑆𝐷10 𝑆 𝑇
=
2 −1 310 0 1 2 1
1 2 0 −210 5 −1 2
1 2 −1 310 × 2 310
=
5 1 2 −210 210 × 2
184
SPACE OF HINTS
Unit-3
3.1: Introduction
Consider the problem of approximating a given function by a class of
simpler functions, mainly polynomials. There are two main uses of
interpolation or interpolating polynomials. The first use is in
reconstructing the function 𝑓(𝑥) when it is not explicitly and only the
values of 𝑓(𝑥) and /or its certain order derivatives at a set of points,
called nodes, tabular points or arguments are known.
Definition:3.1.1
Taylor Series:
If the polynomial P(𝑥) is written as the Taylor‟s expansion, for the
function 𝑓(𝑥) about a point 𝑥0 , 𝑥0 ∈ [𝑎, 𝑏] in the form
185
1
𝑃 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 ′ 𝑥0 + (𝑥 − 𝑥0 )2 𝑓 ′′ 𝑥0 + ⋯
SPACE FOR HINTS 2!
1
+ 𝑥
𝑛!
− 𝑥0 𝑛 𝑓 𝑛
𝑥0 (1)
Which has been neglected in the Taylor series and is called the
reminder (or) truncation error.
𝑛+1
Also,𝑀𝑛+1 = max𝑎≤𝑥≤𝑏 𝑓 (𝑥)
Example 3.1.1:
Solution:
1
Given 𝑓 𝑥 =
1+𝑥 2
1 + 𝑥 2 0 − 1. (2𝑥)
𝑓′ 𝑥 =
(1 + 𝑥 2 )2
−2𝑥
=
(1 + 𝑥 2 )2
186
1 + 𝑥2 2
−2 − −2𝑥 2 1 + 𝑥 2 2𝑥
𝑓 ′′ 𝑥 = SPACE OF HINTS
(1 + 𝑥 2 )4
1 + 𝑥 2 [ −2 1 + 𝑥 2 + 8𝑥 2 ]
=
(1 + 𝑥 2 )4
′′′
1 + 𝑥 2 3 2 6𝑥 − 2 3𝑥 2 − 1 3(1 + 𝑥 2 )2 2𝑥
𝑓 𝑥 =
(1 + 𝑥 2 )6
2 2
12𝑥 1 + 𝑥 2 − 12𝑥 3𝑥 2 − 1
= 1+𝑥
1 + 𝑥2 6
24𝑥 − 24𝑥 3
=
(1 + 𝑥 2 )4
24𝑥(1 − 𝑥 2 )
=
(1 + 𝑥 2 )4
To find at 𝑥 = 1,
1
𝑓 1 =
2
1
𝑓′ 1 = −
2
2(3 − 1) 1
𝑓 ′′ 1 = =
23 2
24 0
𝑓 ′′′ 1 = =0
24
Hence, the Taylor series approximation is given by
2
′
𝑥 − 𝑥0
𝑓 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 + 𝑓 ′′ 𝑥0 + ⋯
2!
2
𝑥−1 ′
𝑓 𝑥 =𝑓 1 + 𝑥−1 𝑓 1 + 𝑓 ′′ (1)
2!
2
1 1 𝑥−1 1
= + 𝑥−1 − +
2 2 2! 2
2
1 1 𝑥−1
𝑓 𝑥 = − 𝑥−1 +
2 2 4
187
The error bound is given by,
SPACE FOR HINTS (𝑥−1)3
𝑅2 ≤ 𝑀3 where 𝑀3 = max1≤𝑥≤1.4 𝑓 ′′′ (𝑥)
3!
24 1.4 [1 − 1.4 2 ]
=
[1 + 1.4 2 ]4
24 1.4 (0.96)
=
(2.96)4
32.256
=
76.7656
= 0.42019
(𝑥 − 1)3
∴ 𝑅3 ≤ 𝑀3
3!
3
1.4 − 1
= 0.42019
3!
= 0.00448
Example 3.1.2:
Obtain polynomial approximation 𝑃(𝑥) to 𝑓 𝑥 = 𝑒 −𝑥 using the
Taylors expansion about 𝑥0 = 0 and determine
i) 𝑥 when the error in 𝑃(𝑥) obtained from the first four terms
only is to be less then 10−6 after rounding.
ii) The number of terms in the approximation to find results
correct to 10−10 for 0 ≤ 𝑥 ≤ 1.
Solution:
Given 𝑓 𝑥 = 𝑒 −𝑥
𝑓 ′ 𝑥 = −𝑒 −𝑥
𝑓 ′′ 𝑥 = (−1)2 𝑒 −𝑥
𝑟
Hence integral 𝑓 𝑥 = (−1)𝑟 𝑒 −𝑥
188
𝑟
∴At 𝑥0 = 0 , 𝑓 0 = (−1)𝑟 𝑒 −0 = (−1)𝑟 , 𝑟 = 0,1,2, ⋯
SPACE OF HINTS
′ 𝑥−𝑥 0 2 ′′
∴The polynomial 𝑃 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 + 𝑓 𝑥0 +
2!
⋯
𝑥2 𝑥3
= 1 + 𝑥 −1 + 1 + −1 + ⋯
2! 3!
𝑥2 𝑥3
𝑃 𝑥 =1−𝑥+ − +⋯
2 6
1 𝑛+1
The error term is 𝑥 − 𝑥0 𝑀𝑛+1 ≤ 𝜖
𝑛+1 !
1
𝑥 − 0 4 𝑀4 ≤ 𝜖
4!
1 4
𝑥 𝑀4 ≤ 𝜖
24
Let us consider 𝜖 = 5 × 10−7
𝑥 4 𝑀4 ≤ 5 × 10−7 × 24 (1)
Where 𝑀4 = max0≤𝑥≤1 𝑓 4 (𝑥)
= max 𝑒 −𝑥 = 1
0≤𝑥≤1
∴ 𝑀4 = 1
⟹ 20000000000 < 𝑛 + 1 !
∴ 𝑛 ≥ 14.
189
Lagrange‟s interpolation formula is,
SPACE FOR HINTS 𝑥 − 𝑥1 𝑥 − 𝑥0
𝑃 𝑥 = 𝑓 𝑥0 + 𝑓(𝑥1 )
𝑥0 − 𝑥1 𝑥1 − 𝑥0
𝑥 𝑥
𝑃 𝑥 = 𝐼0 𝑓 𝑥0 + 𝐼1 𝑓 𝑥1 (1)
𝑥 𝑥−𝑥 1 𝑥 𝑥−𝑥 0
where 𝑙0 = , 𝑙1 =
𝑥 0 −𝑥 1 𝑥 1 −𝑥 0
The functions 𝑙0 (𝑥) and 𝑙1 (𝑥) are called the Lagrange‟s fundamental
polynomials andit can be verified that satisfying conditions
𝑙0 𝑥 + 𝑙1 𝑥 = 1
𝑙0 𝑥0 = 1, 𝑙0 𝑥1 = 0
𝑙1 (𝑥0 ) = 0, 𝑙1 (𝑥1 ) = 1
1 𝑖𝑓 𝑖 = 𝑗
(i.e.)𝑙𝑖 (𝑥𝑗 ) = 𝛿𝑖𝑗 =
0 𝑖𝑓 𝑖 ≠ 𝑗
1 𝑓0 (𝑥0 ) 𝑥0 − 𝑥
=
𝑥1 − 𝑥0 𝑓1 (𝑥1 ) 𝑥1 − 𝑥
1 𝐼0 (𝑥) 𝑥0 − 𝑥
𝑃 𝑋 = (2)
𝑥1 − 𝑥0 𝐼1 (𝑥) 𝑥1 − 𝑥
= 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 , 𝑥1
𝑓 𝑥 1 −𝑓 𝑥 0
where 𝑓 𝑥0 , 𝑥1 =
𝑥 1 −𝑥 0
190
Here the ratio 𝑓 𝑥0 , 𝑥1 is called the first divided difference of 𝑓(𝑥)
SPACE OF HINTS
relative to 𝑥0 and 𝑥1 .
Example 3.2.1:
Given 𝑓 2 = 4 , 𝑓 2.5 = 5.5 find the linear interpolating
polynomial using
i) Lagrange interpolation
ii) Aitkin‟s interpolation
iii) Newton‟s divided difference interpolation, hence find an
approximation value of 𝑓(2.2).
Solution:
i) Given 𝑥0 = 2 𝑥1 = 2.5
𝑓 𝑥0 = 4 𝑎𝑛𝑑 𝑓 𝑥1 = 5.5
The formula for Lagrange‟s interpolation is
𝑥 − 𝑥1 𝑥 − 𝑥0
𝑃 𝑥 = 𝑓 𝑥0 + 𝑓(𝑥1 )
𝑥0 − 𝑥1 𝑥1 − 𝑥0
𝑥 − 2.5 𝑥 − 2 (5.5)
= 4 +
2 − 2.5 0.5
= −8 𝑥 − 2.5 + 11(𝑥 − 2)
= −8𝑥 + 20 + 11𝑥 − 22
𝑃 𝑥 = 3𝑥 − 2
Now 𝑃 𝑥 = 𝑓 𝑥 = 3𝑥 − 2
𝑓 2.2 = 3 2.2 − 2 = 4.6.
ii) It can iterated linear interpolating polynomial is
1
𝑃 𝑋 = 𝑥 − 𝑥 𝑓 𝑥0 − 𝑥0 − 𝑥 𝑓 𝑥1
𝑥1 − 𝑥0 1
1 𝐼0 (𝑥0 ) 𝑥0 − 𝑥
=
𝑥1 − 𝑥0 𝐼1 (𝑥1 ) 𝑥1 − 𝑥
1 𝑓(𝑥0 ) 𝑥0 − 𝑥
=
2.5 − 2 𝑓(𝑥1 ) 𝑥1 − 𝑥
191
1 4 2−𝑥
=
SPACE FOR HINTS 0.5 5.5 2.5 − 𝑥
= 3𝑥 − 2
∴ 𝑃 𝑥 = 3𝑥 − 2
𝑃 𝑥 =𝑓 𝑥
𝑓 2.2 = 3 2.2 − 2 = 4.6
iii) Newton‟s divided difference interpolating polynomial is
𝑓 𝑥1 − 𝑓 𝑥0
𝑃 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0
𝑥1 − 𝑥0
5.5 − 4
=4+ 𝑥−2
2.5 − 2
1.5
=4+ 𝑥−2
0.5
= 4 + 3 𝑥 − 2 = 4 + 3𝑥 − 6
𝑃 𝑥 = 3𝑥 − 2
𝑝 𝑥 = 𝑓(𝑥)
𝑓 2.2 = 3 2.2 = 3 2.2 − 2 = 4.6.
Truncation error bounds:
The polynomial 𝑃 𝑥 coincides with the function 𝑓 𝑥 at 𝑥0 and 𝑥1 and
it derivatives at all other points, in the interval 𝑥0 , 𝑥1 . This derivation
is called truncation error.
𝐸1 𝑓; 𝑥 = 𝑓 𝑥 − 𝑃(𝑥)
2
max 𝑓 ′′ (𝑥) ≤ 𝜖 𝑤𝑒𝑟𝑒 = 𝑥1 − 𝑥0
8 𝑎≤𝑥≤𝑏
Example 3.2.2:
192
Using the data sin 0.1 = 0.09983 and sin 0.2 = 0.19867, find an
SPACE OF HINTS
(0.15) by Lagrange‟s interpolation. Obtain a
approximate value of sin
bound on the truncation error.
Solution:
Given sin 0.1 = 0.09983
𝑓 𝑥0 = 0.09983
𝑓 𝑥1 = 0.1986
The formula for Lagrange‟s interpolation is,
𝑥 − 𝑥1 𝑥 − 𝑥0
𝑓 𝑥 = 𝑓 𝑥0 + 𝑓(𝑥1 )
𝑥0 − 𝑥1 𝑥1 − 𝑥0
(𝑥 − 0.20) 𝑥 − 0.1
= 0.09983 + (0.19867)
0.1 − 0.2 0.2 − 0.1
= −0.9983 𝑥 − 0.2 + 1.9867(𝑥 − 0.1)
𝑓 𝑥 = 0.9884𝑥 + 0.00099
Given 𝑓 𝑥 = sin 𝑥
𝑓 ′ 𝑥 = cos 𝑥
𝑓 ′′ 𝑥 = − sin 𝑥
= 0.19867
193
1
∴ 𝐸1 𝑓, 𝑥 = 0.15 − 0.1 0.15 − 0.2 (0.19867)
SPACE FOR HINTS 2
1
= 0.05 −0.05 (0.19867)
2
⇒ 𝐸1 𝑓, 𝑥 ≤ −0.000248 = 0.00025
Example 3.2.3:
Determine the step size that can be used in the tabulation of
𝑓 𝑥 = sin 𝑥 in theinterval [1, 3] so that the linear interpolation will be
correct to four decimal places after rounding.
Solution:
The formula for step size is given by,
2
max 𝑓 ′′ (𝑥) ≤ 𝜖
8 𝑎≤𝑥≤𝑏
Now, max 𝑓 ′′ (𝑥) = max − sin 𝑥
𝑎≤𝑥≤𝑏 1≤𝑥≤3
= 0.9095 ≅ 1
2
. 1 ≤ 5 × 10−5
8
2 ≤ 40 × 10−5 ⇒ 2 ≤ 0.02.
Example 3.2.4:
The function 𝑓 𝑥 = sin 𝑥 is defined on the interval [1, 3]
194
Hence find the approximate value of 𝑓(1.5) and 𝑓 2.5 .
SPACE OF HINTS
Compare with the exact values.
Solution:
i) Given 𝑓 𝑥 = sin 𝑥
The interval is [1, 3] , i.e.)𝑥0 = 1 , 𝑥1 = 3
∴ 𝑓 𝑥0 = 0.8415 𝑓 𝑥1 = 0.14112
The formula for Lagrange‟s linear interpolation is,
𝑥 − 𝑥1 𝑥 − 𝑥0
𝑓 𝑥 = 𝑓 𝑥0 + 𝑓(𝑥1 )
𝑥0 − 𝑥1 𝑥1 − 𝑥0
𝑥−3 𝑥−1
= 0.8415 + (0.14112)
1−3 3−1
𝑥−3 𝑥−1
= 0.8415 + (0.14112)
−2 2
= −0.4208𝑥 + 1.2623 + 0.0706𝑥 − 0.0706
𝑓 𝑥 = −0.3502𝑥 + 1.1917
∴ 𝑓 1.5 = 0.6664 𝑓 2.5 = 0.3162
Lagrange‟s truncation error bound is given by,
1
𝐸1 𝑓, 𝑥 = 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 ′′ (𝜉)
2
1
𝐸1 𝑓, 𝑥 ≤ (𝑥 − 𝑥0 ) 𝑥 − 𝑥1 𝑓 ′′ (𝜉)
2
Now,𝑓 𝑥 = sin 𝑥
𝑓 ′ 𝑥 = cos 𝑥
𝑓 ′′ 𝑥 = − sin 𝑥
𝑓 ′′ (𝜖) = − sin 𝜖
max − sin 𝜖 = max 0.8415 , 0.9093 ,0.1411
1≤𝑥≤3
= 0.9093
Now, the truncation error bound at 𝑥 = (1.5) is
1
𝐸1 𝑓, 𝑥 ≤ 1.5 − 1 1.5 − 3 (0.9093)
2
195
1
≤ 0.5 −1.5 (0.9093)
SPACE FOR HINTS 2
≤ 0.34098
The truncation error bounded at 𝑥 = 2.5 is
1
𝐸1 𝑓, 𝑥 ≤ 2.5 − 1 2.5 − 3 (0.9093)
2
≤ 0.34098
ii) Divide the given interval into two intervals [1, 2] and [2, 3]
Case i: In the interval [1, 2]
𝑥0 = 1, 𝑥1 = 2
𝑓 𝑥 = sin 𝑥
𝑓 1 = 0.8415
𝑓 2 = 0.9093
The formula for Lagrange‟s linear interpolation is
𝑥 − 𝑥1 𝑥 − 𝑥0
𝑓 𝑥 = 𝑓 𝑥0 + 𝑓(𝑥1 )
𝑥0 − 𝑥1 𝑥1 − 𝑥0
𝑥−2 𝑥−1
= (0.8415) + (0.9093)
1−2 2−1
= − 𝑥 − 2 0.8415 + 𝑥 − 1 0.9093
= 0.0678𝑥 + 0.7737
∴ 𝑓 1.5 = 0.8754
1
𝐸1 𝑓, 𝑥 ≤ (𝑥 − 𝑥0 ) 𝑥 − 𝑥1 𝑓 ′′ (𝜉)
2
= 0.9975
1
∴ 𝐸1 [ 𝑓, 𝑥] ≤ 1.5 − 1 (1.5 − 2) 0.9975
2
196
= 0.1247
SPACE OF HINTS
Case ii: In the interval [2, 3]
𝑥0 = 2 , 𝑥1 = 3
𝑓 𝑥 = sin 𝑥
𝑓 2 = 0.9093
𝑓 3 = 0.1411
𝑓 𝑥 = −0.7682𝑥 + 2.4457
𝑓 2.5 = 0.5252
1
𝐸1 𝑓, 𝑥 ≤ (𝑥 − 𝑥0 ) 𝑥 − 𝑥1 𝑓 ′′ (𝜉)
2
Where 𝑓 ′′ 𝜉 = − sin 𝜉
= 0.9093
1
𝐸1 𝑓, 𝑥 ≤ 2.5 − 2 (2.5 − 3) 0.9093
2
= 0.1137
𝑓 2.5 = 0.5985
In case ii) 𝑓 1.5 = 0.8754 and 𝑓 2.5 = 0.5252 is nearer to the exact
value.
197
SPACE FOR HINTS
Quadratic interpolation:
The quadratic interpolation polynomial in Lagrange‟s Method is,
𝑥 − 𝑥1 𝑥 − 𝑥2 𝑥 − 𝑥0 (𝑥 − 𝑥2 )
𝑓 𝑥 = 𝑓 𝑥0 + 𝑓 𝑥1
𝑥0 − 𝑥1 𝑥0 − 𝑥2 𝑥1 − 𝑥0 𝑥1 − 𝑥2
𝑥 − 𝑥0 𝑥 − 𝑥1
+ 𝑓(𝑥2 )
𝑥2 − 𝑥0 𝑥2 − 𝑥0
= 𝑙0 𝑥 𝑓 𝑥0 + 𝑙1 𝑥 𝑓 𝑥1 + 𝑙2 𝑥 𝑓(𝑥2 )
The truncation error in the Lagrange‟s quadratic interpolation is
𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 ′′′
𝐸2 𝑓, 𝑥 = 𝑓 (𝜉)
6
where 𝑓 ′′′ 𝜉 = max𝑥 0 ≤𝑥≤𝑥 2 𝑓 ′′′ (𝑥)
𝑖 = 0,1,2, ⋯ 𝑛
𝑛
∴𝑓 𝑥 = 𝑙𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=1
198
𝑛+1
where 𝑓 𝜉 = max𝑥 0 ≤𝑥≤𝑥 2 𝑓 (𝑛+1) (𝑥) = 𝑀𝑛+1
SPACE OF HINTS
Example 3.2.5:Given that 𝑓 0 = 1 , 𝑓 1 = 3 , 𝑓 3 = 55 find the
unique polynomial of degree 2 or less which fits the given data.
Solution:
Given 𝑥0 = 0 , 𝑥1 = 1 , 𝑥2 = 3
𝑓 𝑥0 = 1 𝑓 𝑥1 = 3 𝑓 𝑥2 = 55
𝑥 − 1 (𝑥 − 3) 𝑥 𝑥 − 3 𝑥 𝑥−1
= + 3 + 55
3 −2 6
𝑥 2 − 4𝑥 + 3 3𝑥 2 − 9𝑥 55𝑥 2 − 55𝑥
= + +
3 −2 6
1
= 2𝑥 2 − 8𝑥 + 6 − 9𝑥 2 + 27𝑥 + 55𝑥 2 − 55𝑥
6
1
= 48𝑥 2 − 36𝑥 + 6 = 8𝑥 2 − 6𝑥 + 1
6
The quadratic error formula is,
𝑥−𝑥 0 𝑥−𝑥 1 𝑥−𝑥 2
𝐸2 𝑓, 𝑥 ≤ 𝑓 ′′′ (𝜉) where 𝑀3 = max0≤𝑥≤3 𝑓 ′′′ (𝜉)
6
1
= 𝑀 [ max 𝑥 𝑥 − 1 𝑥 − 3 ]
6 3 0≤𝑥≤3
199
1
= 2.1126 𝑀3 (since the maximum of 𝑥 𝑥 − 1 𝑥 − 3 occurs at
6
SPACE FOR HINTS
𝑥 = 2.2152
= 0.3521 𝑀3
Example 3.2.6
The following values of the function 𝑓 𝑥 = sin 𝑥 + cos 𝑥, are given
Solution:
𝜋 𝜋
𝑥1 = 20 × = = 0.3491; 𝑓 𝑥1 = 1.2817
180 9
𝜋 𝜋
𝑥2 = 30 × = = 0.5236 ; 𝑓 𝑥2 = 1.3660.
180 6
200
𝑥 − 0.3491 𝑥 − 0.5236
= 1.5885 SPACE OF HINTS
0.1745 − 0.3491 0.1745 − 0.5236
𝑥 − 0.1745 𝑥 − 0.5236
+ 1.2817
0.3491 − 0.1745)(0.3491 − 0.5236
𝑥 − 0.1745 𝑥 − 0.3491
+ (1.3660)
0.5236 − 0.1745 0.5236 − 0.1745
𝑥 − 0.3491 𝑥 − 0.5236
= 1.5885
0.06096
𝑥 − 0.1745 𝑥 − 0.5236
+ 1.2817
−0.03048
𝑥 − 0.1745 𝑥 − 0.3491
+ (1.3660)
0.06093
Iterated interpolation:
201
The iterated interpolation table is,
SPACE FOR HINTS
𝑥0 − 𝑥 = 𝐼0 (𝑥)
𝑥0 𝐼0,1 (𝑥)
𝑥1 − 𝑥 = 𝐼1 𝑥 = 𝑥 𝐼0,1,2 (𝑥)
𝑥1 𝐼0,2 (𝑥)
𝑥2 − 𝑥1 = 𝐼2 (𝑥)
𝑥2
⋮ 𝐼0,1,𝑛−1 (𝑥)
𝑥𝑛
𝑃𝑛 𝑥 = 𝑓 𝑥0
+ 𝑥 − 𝑥0 𝑓 𝑥0 , 𝑥1 ⋯ 𝑥 − 𝑥0 𝑥 − 𝑥1 ⋯ 𝑥
− 𝑥𝑛 −1 𝑓 𝑥0 , 𝑥1 , ⋯ , 𝑥𝑛
Example 3.2.7:
Find the unique polynomial of degree 2 or less such that 𝑓 0 = 1,
𝑓 1 = 3 , 𝑓 3 = 55, using i) The iterated interpolation
202
ii) The Newton divided difference interpolation.
SPACE OF HINTS
Solution:
Given 𝑥0 = 0 , 𝑥1 = 1 , 𝑥2 = 3
𝑓 𝑥0 = 1 , 𝑓 𝑥1 = 3 , 𝑓 𝑥2 = 55
i) The formula for iterated interpolation is
1 𝑓(𝑥0 ) 𝑥0 − 𝑥
𝐼0,1 𝑥 =
𝑥1 − 𝑥0 𝑓(𝑥1 ) 𝑥1 − 𝑥
1 1 0−𝑥
=
1−0 3 1−𝑥
= 1 − 𝑥 + 3𝑥 = 1 + 2𝑥
1 𝑓(𝑥0 ) 𝑥0 − 𝑥
𝐼0,2 𝑥 =
𝑥2 − 𝑥0 𝑓(𝑥2 ) 𝑥2 − 𝑥
1 1 0−𝑥
=
3 55 3 − 𝑥
1 1
= 3 − 𝑥 + 55𝑥 = (3 + 54𝑥)
3 3
= 1 + 18𝑥
1 𝐼0,1 𝑥 𝑥1 − 𝑥
𝐼0,1,2 𝑥 =
𝑥2 − 𝑥1 𝐼0,2 𝑥 𝑥2 − 𝑥
1 1 + 2𝑥 1−𝑥
=
3 − 1 + 18𝑥
1 3−𝑥
1
= 1 + 2𝑥 3 − 𝑥 − 1 − 𝑥 (1 + 18𝑥)
2
1
= (3 − 𝑥 + 6𝑥 − 2𝑥 2 − 1 − 18𝑥 + 𝑥 + 18𝑥 2 )
2
1
= (16𝑥 2 − 12𝑥 + 2)
2
= 8𝑥 2 − 6𝑥 + 1
The formula for divided difference method is,
𝑃 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 , 𝑥1
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓(𝑥0 , 𝑥1 , 𝑥2 )
203
SPACE FOR HINTS
0 1
3−1
=2
1−0
1 3 26 − 2
55 − 3 =8
=8 3−0
3−1
3 55
Now 𝑃 𝑥 = 1 + 𝑥 − 0 2 + 𝑥 − 0 𝑥 − 1 8
= 1 + 2𝑥 + 8𝑥 2 − 8𝑥
= 8𝑥 2 − 6𝑥 + 1
Example 3.2.8:
1
Calculate the 𝑛𝑡 divided difference of , based on the points
𝑥
𝑥0 , 𝑥1 , ⋯ 𝑥𝑛 .
Solution:
1
Given 𝑓 𝑥 = based on the points 𝑥0 , 𝑥1 , ⋯ 𝑥𝑛 .
𝑥
204
−1
𝑓 𝑥0 , 𝑥1 = SPACE OF HINTS
𝑥0 𝑥1
−1
Similarly, 𝑓 𝑥1 , 𝑥2 =
𝑥1 𝑥2
Now,
𝑓 𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘+1 − 𝑓 𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘
𝑓 𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘+1 =
𝑥𝑘+1 − 𝑥0
(−1)𝑘+1 𝑥𝑘+1 − 𝑥0
=
𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘+1 𝑥𝑘+1 − 𝑥0
(−1)𝑘+1
𝑓 𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘+1 =
𝑥0 , 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑘 +1
Example 3.2.9:
Construct the divided difference table for the data
𝑥 0.5 1.5 3.0 5.0 6.5 8.0
205
Hence find the interpolating polynomial and an approximation to the
SPACE FOR HINTS value of 𝑓(7).
Solution:
Newton‟s divided difference table is,
𝑥 𝑓(𝑥) First order 2nd order divided 3rd order 4th order
divided difference divided divided
difference difference difference
0.5 1.625
5.875 − 1.625
1.5 − 0.5
1.5 5.875 = 4.25 16.75 − 4.25
3 − 0.5
=5 9.5 − 5
31 − 5.875 3 − 0.5
3.0 31.0 3 − 1.5 =1 1−1
= 16.75 =0
6.5 − 0.5
50 − 16.75
5 − 1.5 14.5 − 9.5
131 − 31 = 9.5 6.5 − 1.5
5.0 131.0 5−3 =1 1−1
= 50 100.75 − 50 =0
8 − 1.5
6.5 − 3
282.12 − 131 = 14.5
6.5 282.125 6.5 − 5 19.5 − 14.5
= 100.75 8−3
159.25 − 100.75 = 1
521 − 282.125 8−5
8.0 521.0 8 − 6.5 = 19.5
= 159.25
𝑃 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥0 , 𝑥1 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥0 , 𝑥1 , 𝑥2
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 + ⋯
206
= 1.625 + 4.25𝑥 − 2.125 + 5𝑥 2 − 10𝑥 + 3.75 + 𝑥 3 − 2𝑥 2
SPACE OF HINTS
2
+ 0.75𝑥 − 3𝑥 + 6𝑥 − 2.25
𝑃 𝑥 = 𝑥3 + 𝑥 + 1 ∴ 𝑓 𝑥 = 𝑥3 + 𝑥 + 1
Hence, 𝑓 7 = 351.
1 2 1
∇ 1 − 𝐸 −1 1 − (1 + ∆)−1 ∇ 𝛿 +𝛿 1 + 𝛿2
2 4
1 1 1 1
𝛿 𝐸2 − 𝐸− 2 ∆(1 + ∆)−2 ∇(1 − ∇)− 2 1 1
− 𝛿2 + 𝛿 1 + 𝛿2
2 4
1 1
1 1 1 1+ ∆ 1− ∇
(𝐸 + 𝐸 −
) 2 2 1 1
𝜇 2 2 1 1
− 𝛿2 + 𝛿 1 + 𝛿2
2 (1 + ∆)2 (1 − ∇)− 2 2 4
207
1
SPACE FOR HINTS 1 + 𝛿2
4
1
∆𝑓𝑖 = ∇𝑓𝑖+1 = 𝛿𝑓𝑖 +
2
∆= 𝐸 − 1 ⇒ 𝐸 = ∆ + 1
∇= 1 − 𝐸 −1 ⇒ 𝐸 −1 = 1 − ∇
1 −1
𝐸= = 1−∇
1−∇
1 1
𝛿 = 𝐸 2 − 𝐸 −2
1 1 1
𝜇= 𝐸 2 + 𝐸 −2
2
Example 3.3.1: Show that
1
i) 𝛿 = ∇(1 − ∇)− 2
𝛿2 1
ii) 𝜇 = (1 + )2
4
Solution:
1 1
i) Consider ∇(1 − ∇)−2 = 1 − 𝐸 −1 (1 − (1 − 𝐸 −1 ))−2
1
= 1 − 𝐸 −1 (1 − 1 − 𝐸 −1 )−2
1
= 1 − 𝐸 −1 (𝐸 2 )
1 1
= 𝐸 2 − 𝐸 −2 = 𝛿
1
∴ ∇(1 − ∇)−2 = 𝛿
1 1
ii) 𝛿 = 𝐸 2 − 𝐸 −2
1 1
𝛿 2 = (𝐸 2 − 𝐸 −2 )2 = 𝐸 + 𝐸 −1 − 2
𝛿2 𝐸+𝐸 −1 −2
Now =
4 4
𝛿2 𝐸 + 𝐸 −1 − 2 4 + 𝐸 + 𝐸 −1 − 2
1+ =1+ =
4 4 4
𝐸 + 𝐸 −1 + 2
=
4
208
1
1 1 1 1
2 2 − 2 SPACE OF HINTS
𝛿 𝐸 + 𝐸 −1 + 2 2 (𝐸 + 𝐸 )
2 2 2
⟹ 1+ = =
4 4 22
1 1
𝐸 2 + 𝐸 −2
=
2
1
𝛿2 2 1 1 1
∴ 1+ = 𝐸 2 + 𝐸 −2 = 𝜇.
4 2
3.4: Interpolating Polynomials Using Finite Difference:
Gregory Newton Forward Difference Interpolation:
𝑥 − 𝑥0 𝑥 − 𝑥0 𝑥 − 𝑥1 2
𝑃 𝑥 = 𝑓 𝑥0 + ∆𝑓 𝑥0 + ∆ 𝑓 𝑥0
1! 2! 2
𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 ⋯ 𝑥 − 𝑥𝑛−1 𝑛
+ ∆ 𝑓(𝑥0 )
𝑛! 𝑛
This is called Gregory-Newton forward difference interpolating
polynomial.
𝑥−𝑥 0
Put 𝑢 =
𝑢 𝑢 𝑢−1 2
𝑃 𝑥0 + 𝑢 = 𝑓 𝑥0 + ∆𝑓 𝑥0 + ∆ 𝑓 𝑥0 + ⋯
1! 2!
𝑢 𝑢 − 1 ⋯ (𝑢 − 𝑛 − 1) 𝑛
+ ∆ 𝑓 𝑥0
𝑛!
𝑢 𝑢 −1 ⋯ 𝑢−𝑛
An error term is 𝐸𝑛 𝑓; 𝑥 = 𝑛+1 𝑓 𝑛+1
(𝜉)
𝑛+1 !
209
𝑢 𝑢2
𝑃 𝑥 = 𝑓 𝑥0 + 𝛿𝑓1 + 𝛿𝑓−1 + 𝑓0 𝛿 2
SPACE FOR HINTS 2 2 2 2!
𝑢 𝑢 2 − 12 1 2
+ 𝛿 𝑓1 + 𝛿 3 𝑓−1
3! 2 2 2
𝑢 𝑢 2 − 12 ⋯ 𝑢 2 − 𝑝 − 1 2
1 2𝑝−1
+⋯ 𝛿 𝑓1 + 𝛿 2𝑝−1 𝑓−1
2𝑝 − 1 ! 2 2 2
𝑢 2 𝑢 2 − 12 𝑢 2 − 22 ⋯ 𝑢 2 − 𝑝 − 1 2
𝛿 2𝑝 𝑓0
2𝑝 !
𝑥−𝑥 0
where 𝑢 =
Bessel’s Formula:
𝑦0 + 𝑦1 1 𝑢 𝑢−1 ∆2 𝑦 − 1 + ∆2 𝑦0
𝑃 𝑥 = + 𝑢 − ∆𝑦0 +
2 2 2! 2
1
𝑢− 𝑢(𝑢 − 1)
2
+ ∆3 𝑦 − 1
3!
𝑢+1 𝑢 𝑢−1 𝑢−2 ∆4 𝑦 − 2 + ∆4 𝑦 − 1
+
4! 2
𝑥−𝑥 0
Where 𝑢 = , Here 𝑥0 = 𝑚𝑖𝑑 𝑣𝑎𝑙𝑢𝑒.
Example 3.4.1:
For the following data calculate the difference and obtain the
forward and backward difference polynomials. Interpolate 𝑥 = 0.25 and
𝑥 = 0.35.
𝑥 0.1 0.2 0.3 0.4 0.5
Solution:
The difference table is
𝑥 𝑓(𝑥) ∆ ∆2 ∆3 ∆4
210
0.1 1.40
SPACE OF HINTS
0.16
0.5 2.28
𝑃 𝑥 = 2𝑥 2 + 𝑥 + 1.28
𝑃 0.25 = 1.655
𝑃 0.35 = 1.875
𝑢 𝑢+1
Now, 𝑃 𝑥 = 𝑓 𝑥𝑛 + 𝑢∇𝑓 𝑥𝑛 + ∇2 𝑓 𝑥𝑛 + ⋯
2!
211
𝑥−𝑥 𝑛 0.35−0.5
where 𝑢 = = = −1.5
0.1
SPACE FOR HINTS
𝑢 = −1.5
−1.5 (−0.5)
𝑃 0.35 = 2.28 + −1.5 0.28 + 0.04
2
= 2.28 − 0.42 + 0.015
= 1.875.
Example 3.4.2:
Determine the step size that can be used in the tabulation of a function
𝑓(𝑥),𝑎 ≤ 𝑥 ≤ 𝑏, at equally spaced nodal points so that the truncation
error of the quadratic interpolation is less than 𝜖.
Solution:
= 𝑡 +
= 𝑡+1
𝑥 − 𝑥𝑖+1 = 𝑥 − 𝑥𝑖 −
= 𝑡 − = 𝑡 − 1
Now 𝑥 − 𝑥𝑖−1 𝑥 − 𝑥𝑖 𝑥 − 𝑥𝑖+1 = 𝑡 + 1 𝑡 𝑡 − 1
= 𝑡 + 1 𝑡(𝑡 − 1)3
= 𝑡(𝑡 2 − 1)3
= 𝑔(𝑡) (say)
212
1
⟹ 3𝑡 3 − 1 3 = 0 Put 𝑡 = − we attains a minimum value. SPACE OF HINTS
3
3𝑡 2 − 1 = 0 ⇒ 3𝑡 2 = 1
1
𝑡2 =
3
1
𝑡=±
3
9𝜖 3
3 <
𝑀3
1
3
9𝜖 3
< .
𝑀3
Example 3.4.3:
Determine the step size that can be used in the tabulation of a
function 𝑓(𝑥) , 𝑎 ≤ 𝑥 ≤ 𝑏 at equally spaced nodal points so the
truncation error of the interpolation is less than 𝜖.
Solution:
213
Let 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 denote four consecutive equispaced points with
SPACE FOR HINTS stepsize .
𝑥0 ≤ 𝑥 ≤ 𝑥3
and 𝑀4 = max𝑥 0 ≤𝑥≤𝑥 3 𝑓 (4) (𝑥)
1 (𝑥 1 +𝑥 2 )
𝑡 = (𝑥 − (or)
2
𝑥1 + 𝑥2
⟹ 𝑡 = 𝑥 −
2
𝑥1 + 𝑥2
⟹ 𝑥 = 𝑡 +
2
𝑥1 + 𝑥2
𝑥 − 𝑥0 = 𝑡 + − 𝑥0
2
2𝑥0 + 3
= 𝑡 + − 𝑥0
2
3 3
= 𝑡 + = 𝑡+
2 2
𝑥1 + 𝑥2
𝑥 − 𝑥1 = 𝑡 + − 𝑥1
2
2𝑥1 +
= 𝑡 + − 𝑥1
2
1
= 𝑡 + = 𝑡 +
2 2
𝑥1 + 𝑥2
𝑥 − 𝑥2 = 𝑡 + − 𝑥2
2
1
= 𝑡 − = 𝑡 −
2 2
𝑥1 + 𝑥2
𝑥 − 𝑥3 = 𝑡 + − 𝑥3
2
3 3
= 𝑡 − = 𝑡−
2 2
Now
3 1 1
𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑥 − 𝑥3 = 𝑡 + 𝑡+ 𝑡−
2 2 2
214
9 1 4
= 𝑡2 − 𝑡2 − SPACE OF HINTS
4 4
= 𝑔(𝑡)4
Put 𝑔′ 𝑡 = 0 we get
9 1
𝑡2 − + 𝑡2 − 2𝑡 = 0 (or)
4 4
5
4𝑡 𝑡 2 − = 0 (or)
4
5
𝑡 = 0 (or) 𝑡 2 =
4
5
𝑡=±
4
𝑔′′ 𝑡 = 12𝑡 2 − 5
max 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 (𝑥 − 𝑥3 ) = 4 max 𝑔(𝑡)
𝑥 0 ≤𝑥≤𝑥 3 5 5
− <𝑡<
2 2
4
Hence 𝐸3 (𝑓; 𝑥) ≤
24
4
Choose ∋ : 𝑀4 < 𝜖
24
1
24 𝜖 4
<
𝑀4
3.5: Hermite Interpolation:
The formula for Hermite interpolation is
𝑛 𝑛
𝑃 𝑥 = 𝐴𝑖 𝑥 𝑓 𝑥𝑖 + 𝐵𝑖 𝑥 𝑓 ′ (𝑥𝑖 )
𝑖=0 𝑖=0
𝐵𝑖 𝑥 = 𝑥 − 𝑥𝑖 𝑙𝑖 2 𝑥
Example 3.5.1:
Determine the parameters in the formula
3 2
𝑃 𝑥 = 𝑎0 𝑥 − 𝑎 + 𝑎1 𝑥 − 𝑎 + 𝑎2 𝑥 − 𝑎 + 𝑎3 such that
P 𝑎 = 𝑓 𝑎 , 𝑃′ 𝑎 = 𝑓 ′ 𝑎 , 𝑃 𝑏 = 𝑓 𝑏 , 𝑃′ 𝑏 = 𝑓 ′ (𝑏) .
Solution:
215
3 2
Given 𝑃 𝑥 = 𝑎0 𝑥 − 𝑎 + 𝑎1 𝑥 − 𝑎 + 𝑎2 𝑥 − 𝑎 + 𝑎3 (1)
SPACE FOR HINTS Put 𝑥 = 𝑎 in (1), we get
𝑃 𝑎 = 𝑓 𝑎 = 𝑎3
∴ 𝑎3 = 𝑓(𝑎)
Differentiating equation (1) with respect to𝑥 , we get
𝑃′ 𝑥 = 𝑎0 3(𝑥 − 𝑎)2 + 2𝑎1 𝑥 − 𝑎 + 𝑎2 (2)
Put 𝑥 = 𝑎 in above equation (2), we get
𝑃′ 𝑎 = 𝑎2 = 𝑓 ′ (𝑎)
∴ 𝑎2 = 𝑓 ′ (𝑎)
Put 𝑥 = 𝑏 in (1), we get
𝑓 ′ 𝑏 − 𝑓 ′ 𝑎 = 3𝑎0 𝑏 − 𝑎 2
+ 2𝑎1 𝑏 − 𝑎 (5)
Multiply 4 × 3 − 5
𝑓 𝑏 −𝑓 𝑎
⟹3 − 𝑓′ 𝑏 − 𝑓′ 𝑎
𝑏−𝑎
= 3𝑎1 𝑏 − 𝑎 − 2𝑎1 𝑏 − 𝑎 + 3𝑓 ′ (𝑎)
= 𝑎1 𝑏 − 𝑎 + 3𝑓 ′ (𝑎)
𝑓 𝑏 −𝑓 𝑎
3 − 𝑓′ 𝑏 − 𝑓′ 𝑎 − 3𝑓 ′ 𝑎 = 𝑎1 𝑏 − 𝑎
𝑏−𝑎
𝑓 𝑏 −𝑓 𝑎 𝑓 ′ 𝑏 + 2𝑓 ′ 𝑎
⟹ 𝑎1 = 3 −
(𝑏 − 𝑎)2 𝑏−𝑎
216
𝑓 ′ 𝑏 − 𝑓1 𝑎
SPACE OF HINTS
2
𝑓 𝑏 −𝑓 𝑎
= 3𝑎0 𝑏 − 𝑎 +6 𝑏−𝑎
𝑏−𝑎 2
𝑓 ′ 𝑏 + 2𝑓 ′ 𝑎
− 2 × (𝑏
𝑏−𝑎
− 𝑎)
2
𝑓 𝑏 −𝑓 𝑎
= 3𝑎0 𝑏 − 𝑎 +6 − 2 𝑓′ 𝑏 + 𝑓′ 𝑎
(𝑏 − 𝑎)
2
𝑓 𝑏 −𝑓 𝑎
= 3𝑎0 𝑏 − 𝑎 +6 − 2𝑓 ′ 𝑏 − 2𝑓 ′ 𝑎
(𝑏 − 𝑎)
𝑓 𝑏 −𝑓 𝑎
𝑓 ′ 𝑏 − 𝑓 1 𝑎 + 2𝑓 ′ 𝑏 + 4𝑓 ′ 𝑎 = 3𝑎0 𝑏 − 𝑎 2
+6
(𝑏 − 𝑎)
𝑓 𝑏 −𝑓 𝑎
3𝑓 ′ 𝑏 + 3𝑓 ′ 𝑎 = 3𝑎0 𝑏 − 𝑎 2
+6
(𝑏 − 𝑎)
2
𝑓′ 𝑏 + 𝑓′ 𝑎 𝑓 𝑏 −𝑓 𝑎
𝐷𝑖𝑣𝑖𝑑𝑒𝑑 𝑏𝑦 3 𝑏 − 𝑎 ⟹ 2
= 𝑎0 + 2
𝑏−𝑎 (𝑏 − 𝑎)3
𝑓′ 𝑏 + 𝑓′ 𝑎 𝑓 𝑏 −𝑓 𝑎
∴ 𝑎0 = − 2
𝑏−𝑎 2 (𝑏 − 𝑎)3
𝑓 𝑎 −𝑓 𝑏 𝑓′ 𝑎 + 𝑓′ 𝑏
𝑜𝑟 𝑎0 = 2 +
(𝑏 − 𝑎)3 𝑏−𝑎 2
Example 3.5.2:
Given the following values 𝑓 𝑥 and 𝑓 ′ (𝑥)
𝑥 𝑓(𝑥) 𝑓 ′ (𝑥)
−1 1 −5
0 1 1
1 3 7
217
Estimate the value of 𝑓(−0.5) and 𝑓(0.5) using the Hermite
SPACE FOR HINTS 33 97
interpolation. The exact values are 𝑓 −0.5 = and 𝑓 0.5 = .
64 64
Solution:
Here 𝑖 = 0 , 1 , 2 and 𝑛 = 2
Given 𝑥0 = −1 , 𝑥1 = 0 , 𝑥2 = 1
𝑓 𝑥0 = 1 , 𝑓 𝑥1 = 1 , 𝑓 𝑥2 = 3
𝑓 ′ 𝑥0 = 5 , 𝑓 ′ 𝑥1 = 1 , 𝑓 ′ 𝑥2 = 7
The formula for Hermite interpolation is,
2 2
𝑃 𝑥 = 𝐴𝑖 𝑥 𝑓 𝑥𝑖 + 𝐵𝑖 𝑥 𝑓 ′ (𝑥𝑖 )
𝑖=0 𝑖=0
𝐵𝑖 𝑥 = 𝑥 − 𝑥𝑖 𝑙𝑖 2 (𝑥)
1
𝐴0 𝑥 = 3𝑥 5 − 2𝑥 4 − 5𝑥 3 + 4𝑥 2
4
Put 𝑖 = 1, 𝐴1 𝑥 = 1 − 2 𝑥 − 𝑥1 𝑙1 ′ 𝑥1 𝑙1 2 (𝑥)
𝑥 − 𝑥0 (𝑥 − 𝑥2 )
𝑙1 𝑥 =
𝑥1 − 𝑥0 (𝑥1 − 𝑥2 )
𝑥 + 1 (𝑥 − 1) 𝑥 2 − 1
= =
0 + 1 (0 − 1) −1
= − 𝑥2 − 1 = 1 − 𝑥2
𝑙1 2 𝑥 = (1 − 𝑥 2 )2 = 1 + 𝑥 4 − 2𝑥 2
𝑙1 ′ 𝑥 = −2𝑥
𝑥1 = 0 ⇒ 𝑙1 ′ 1 = 0
𝐴1 𝑥 = 1 − 2 𝑥 − 0 0 1 + 𝑥 4 − 2𝑥 2
= 1 + 𝑥 4 − 2𝑥 2 = 𝑥 4 − 2𝑥 2 + 1
Put 𝑖 = 2, 𝐴2 𝑥 = 1 − 2 𝑥 − 𝑥2 𝑙2 ′ 𝑥2 𝑙2 2 (𝑥)
𝑥 − 𝑥0 (𝑥 − 𝑥1 )
𝑙2 𝑥 =
𝑥2 − 𝑥0 (𝑥2 − 𝑥1 )
𝑥+1 𝑥−0 𝑥2 + 𝑥
= =
1+1 1−0 2
218
1
𝑙2 ′ 𝑥 = (2𝑥 + 1) SPACE OF HINTS
2
1 3
𝑙2 ′ 𝑥 = 3 =
2 2
2
2 𝑥2 + 𝑥 1 4
𝑙2 𝑥 = = (𝑥 + 𝑥 2 + 2𝑥 3 )
2 4
2 𝑥−1 3 1 4
𝐴2 𝑥 = 1 − (𝑥 + 𝑥 2 + 2𝑥 3 )
2 4
1
= 1 − 3𝑥 + 3 (𝑥 4 + 𝑥 2 + 2𝑥 3 )
4
1
= 4𝑥 4 + 4𝑥 2 + 8𝑥 3 − 3𝑥 5 − 3𝑥 3 − 6𝑥 4
4
1
= (−3𝑥 5 − 2𝑥 4 + 5𝑥 3 + 4𝑥 2 )
4
𝑖 = 0, 𝐵0 𝑥 = 𝑥 − 𝑥0 𝑙0 2 (𝑥)
𝑥 4 + 𝑥 2 − 2𝑥 3 1
= 𝑥+1 = 𝑥 5 + 𝑥 3 − 2𝑥 4 + 𝑥 4 + 𝑥 2 − 2𝑥 3
4 4
1 5
= (𝑥 − 𝑥 4 − 𝑥 3 + 𝑥 2 )
4
𝑖 = 1, 𝐵1 𝑥 = (𝑥 − 𝑥1 )𝑙1 2 𝑥
= 𝑥 − 0 (1 + 𝑥 4 − 2𝑥 2 )
= 𝑥 + 𝑥 5 − 2𝑥 3
= 𝑥 5 − 2𝑥 3 + 1
𝑖 = 2, 𝐵2 𝑥 = (𝑥 − 𝑥0 )𝑙2 2 𝑥
𝑥 4 + 𝑥 2 + 2𝑥 3
= (𝑥 − 1)
4
1 5
= 𝑥 + 𝑥 3 + 2𝑥 4 − 𝑥 4 − 𝑥 2 − 2𝑥 3
4
1
= 𝑥5 + 𝑥4 − 𝑥3 − 𝑥2
4
2 2
∴𝑃 𝑥 = 𝐴𝑖 𝑥 𝑓 𝑥𝑖 + 𝐵𝑖 𝑥 𝑓 ′ (𝑥𝑖 )
𝑖=0 𝑖=0
219
= 𝐴0 𝑥 𝑓 𝑥0 + 𝐴1 𝑥 𝑓 𝑥1 + 𝐴2 𝑥 𝑓 𝑥2 + 𝐵0 𝑥 𝑓 ′ 𝑥0
SPACE FOR HINTS + 𝐵1 𝑥 𝑓 ′ 𝑥1 + 𝐵2 𝑥 𝑓 ′ (𝑥2 )
1
= 3𝑥 5 − 2𝑥 4 − 5𝑥 3 + 4𝑥 2 1 + 𝑥 4 − 2𝑥 2 + 1 1
4
1
+ −3𝑥 5 − 2𝑥 4 + 5𝑥 3 + 4𝑥 2 3
4
1
+ 𝑥 5 − 𝑥 4 − 𝑥 3 + 𝑥 2 −1
4
+ 𝑥 5 − 2𝑥 3 + 𝑥 1
1 5
+ 𝑥 + 𝑥 4 − 𝑥 3 − 𝑥 2 (7)
4
= 1/4 3𝑥 5 − 2𝑥 4 − 5𝑥 3 + 4𝑥 2 + 4𝑥 4 − 8𝑥 2 + 4 − 9𝑥 5
− 6𝑥 4 + 15𝑥 3 + 12𝑥 2 − 5𝑥 5 + 5𝑥 4 + 5𝑥 3
− 5𝑥 2 + 4𝑥 5 − 8𝑥 3 + 4𝑥 + 7𝑥 5 + 7𝑥 4 − 7𝑥 3
− 7𝑥 2
1
𝑓 𝑥 = 8𝑥 4 − 4𝑥 2 + 4𝑥 + 4 = 2𝑥 4 − 𝑥 2 + 𝑥 + 1
4
97
𝑓 0.5 = 1.375 exact value is
64
33
𝑓 −0.5 = 0.375 exact value is .
64
𝑖 = 1,2,3, ⋯ , 𝑛
Then the interpolating polynomial is,
𝑛
𝑃 𝑥 = 𝑝𝑖,1 (𝑥)
𝑖=0
220
subinterval [𝑥𝑖−1 , 𝑥𝑖 ] can be written as
SPACE OF HINTS
𝑁
𝑃1 𝑥 = 𝑁𝑖 𝑥 𝑓(𝑥𝑖 )
𝑖=0
0 𝑥 ≥ 𝑥𝑖+1
𝑓(𝑥) 3 7 21 73
Solution:
In the interval [1, 2], we have
𝑥−2 𝑥−1
𝑃1 𝑥 = 𝑃1,1 𝑥 = ×3+ 𝑥
1−2 2−1
= − 𝑥 − 2 3 + 7(𝑥 − 1)
= −3𝑥 + 6 + 7𝑥 − 7 = 4𝑥 − 1
221
7𝑥 28 21 42
=− + + 𝑥−
SPACE FOR HINTS 2 2 2 2
14 14
= 𝑥− = 7𝑥 − 7
2 2
In the interval [4, 8], we have
𝑥−8 𝑥−4
𝑃1 𝑥 = 𝑃3,1 𝑥 = 21 + (73)
4−8 8−4
21 73
=− 𝑥−8 + (𝑥 − 4)
4 4
21𝑥 73
=− + 42 + 𝑥 − 73
4 4
= 13𝑥 − 31
∴ Piecewise linear interpolating polynomials are given by,
4𝑥 − 1 1≤𝑥≤2
𝑃1 𝑥 = 7𝑥 − 7 2𝑥 ≤ 𝑥 ≤ 4
13𝑥 − 31 4 ≤ 𝑥 ≤ 8
Using the polynomial in the interval [2, 4]
𝑓 3 = 7 3 − 7 = 21 − 7 = 14
𝑓 7 = 13 7 − 31 = 91 − 31 = 60
∴ 𝑓 3 = 14 & 𝑓 7 = 60
222
𝑥𝑖−1 < 𝜉𝑖 < 𝑥𝑖+1 .
SPACE OF HINTS
Example 3.6.2:
Obtain the piecewise quadratic interpolating polynomials for the
function 𝑓 𝑥 defined by the data
𝑥 −3 −2 −1 1 3 6 7
223
𝑥−1 𝑥−3 𝑥+1 𝑥−3
𝑃2,2 𝑥 = 171 + 165
SPACE FOR HINTS −1 − 1 1 − 3 1+1 1−3
𝑥+1 𝑥−1
+ (207)
3+1 3−1
171 2 165 2 207 2
= 𝑥 − 4𝑥 + 3 − 𝑥 − 2𝑥 − 3 + (𝑥 − 1)
8 4 8
1
= 171𝑥 2 − 684𝑥 + 513 − 330𝑥 2 + 660𝑥 + 990 + 207𝑥 2
8
− 207
1
= (48𝑥 2 − 24𝑥 + 1296)
8
= 6𝑥 2 − 3𝑥 + 162
Consider the interval [3, 7]
𝑥−6 𝑥−7 𝑥−3 𝑥−7
𝑃3,2 𝑥 = 207 + 996
3−6 3−7 6−3 6−7
𝑥−3 𝑥−6
+ 1779
7−3 7−6
207 𝑥 2 − 10𝑥 + 21
= 𝑥 2 − 13𝑥 + 149 − 990
12 −3
1779
+ 𝑥 2 − 9𝑥 + 18
4
= 132𝑥 2 − 927𝑥 + 1880
224
𝑓(𝑥) 369 222 171 165 207 990 1779
SPACE OF HINTS
−3 369
222 − 369
= −147
222 −2 + 3 −51 + 147
−2 = 48
171 − 222 −1 + 3
= −51 16 − 48
−1 + 2 −3 + 51 = −8
1+3
−1 171 165 − 171 = 16
= −3 1+2
1+1
1 165
225
difference
SPACE FOR HINTS
1 165
207 − 165
= 21
207 3−1 261 − 21
3 = 48
990 − 207 6 − 1
= 261 132 − 48
6−3 789 − 261 = 14
= 132 7−1
6 990 1779 − 990
= 789 7 − 3
7−6
7 1779
Hence,
𝑃2,3 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 𝑥, 𝑥1 + 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑓 𝑥0 , 𝑥1 , 𝑥2
+ 𝑥 − 𝑥0 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑓(𝑥0 , 𝑥1 , 𝑥2 , 𝑥3
= 165 + 𝑥 − 1 21 + 𝑥 − 1 𝑥 − 3 48 + 𝑥 − 1
𝑥 − 3 𝑥 − 6 (14)
(𝑥 − 𝑥𝑖−1 )2 2 𝑥 − 𝑥𝑖
𝐴𝑖 𝑥 = 1 +
𝑥𝑖−1 − 𝑥𝑖 2 𝑥𝑖−1 − 𝑥𝑖
𝑥 − 𝑥𝑖−1 (𝑥 − 𝑥𝑖 )2
𝐵𝑖−1 𝑥 =
𝑥𝑖−1 − 𝑥𝑖 2
226
𝑥 − 𝑥𝑖 (𝑥 − 𝑥𝑖−1 )2
𝐵𝑖 𝑥 = SPACE OF HINTS
𝑥𝑖−1 − 𝑥𝑖 2
Example 3.6.4:
Using the following values of 𝑓(𝑥) and 𝑓 ′ (𝑥)
𝑥 𝑓(𝑥) 𝑓 ′ (𝑥)
−1 1 −5
0 1 1
1 3 7
𝑓 𝑥𝑖−1 = 1, 𝑓 𝑥𝑖 = 1, 𝑓 𝑥𝑖+1 = 3
𝑥2 2 𝑥+1
= 1+ = 𝑥 2 (1 + 2𝑥 + 2)
1 1
= 2𝑥 3 + 3𝑥 2
(𝑥 − 𝑥𝑖−1 )2 2 𝑥 − 𝑥𝑖
𝐴𝑖 𝑥 = 2
1+
𝑥𝑖−1 − 𝑥𝑖 𝑥𝑖−1 − 𝑥𝑖
2
𝑥+1 2𝑥
= 1+
1 −1
= 𝑥 2 + 2𝑥 + 1 1 − 2𝑥
= 𝑥 2 + 2𝑥 + 1 − 2𝑥 3 − 4𝑥 2 − 2𝑥
227
= −2𝑥 3 − 3𝑥 2 + 1
SPACE FOR HINTS
𝑥 − 𝑥𝑖−1 (𝑥 − 𝑥𝑖 )2
𝐵𝑖−1 𝑥 =
𝑥𝑖−1 − 𝑥𝑖 2
𝑥 + 1 𝑥2
= = 𝑥3 + 𝑥2
1
𝑥 − 𝑥𝑖 (𝑥 − 𝑥𝑖−1 )2
𝐵𝑖 𝑥 =
𝑥𝑖−1 − 𝑥𝑖 2
2
𝑥 𝑥+1
= = 𝑥(𝑥 2 + 2𝑥 + 1)
1
= 𝑥 3 + 2𝑥 2 + 𝑥
= 2𝑥 3 + 3𝑥 2 1 + −2𝑥 3 − 3𝑥 2 + 1 + 𝑥 + 𝑥 2 −5
+ 𝑥 3 + 2𝑥 2 + 𝑥 (1)
= 2𝑥 3 + 3𝑥 2 − 2𝑥 3 − 3𝑥 2 + 1 − 5𝑥 3 − 5𝑥 2 + 𝑥 3 + 3𝑥 2 + 𝑥
= −4𝑥 3 − 3𝑥 2 + 𝑥 + 1
2
2 −𝑥
= 𝑥−1 1+
−1
2
= 𝑥−1 + (1 + 2𝑥)
= 𝑥 2 − 2𝑥 + 1 + 2𝑥 3 − 4𝑥 2 + 12𝑥
= 2𝑥 3 − 3𝑥 2 + 1
228
2
𝑥−0 2 0−𝑥
𝐴𝑖 𝑥 = 2
1+ SPACE OF HINTS
0−1 0−1
𝑥2
= 1−2 𝑥−1
1
= 𝑥 2 (1 − 2𝑥 + 2)
= 𝑥 2 − 2𝑥 3 + 2𝑥 2 = −2𝑥 3 + 3𝑥 2
(𝑥 − 0)(𝑥 − 1)2
𝐵𝑖−1 𝑥 = 2
= 𝑥(𝑥 − 1)2 = 𝑥(𝑥 2 − 2𝑥 + 1)
(0 − 1)
= 𝑥 3 − 2𝑥 2 + 𝑥
(𝑥 − 1)(𝑥 − 0)2
𝐵𝑖 𝑥 = 2
= 𝑥 − 1 𝑥2 = 𝑥3 − 𝑥2
(0 − 1)
𝑃3 𝑥 = 2𝑥 3 − 3𝑥 2 + 1 1 + −2𝑥 3 + 3𝑥 2 3 + 𝑥 3 − 2𝑥 2 + 𝑥 1
+ 𝑥 3 − 𝑥 2 (7)
= 2𝑥 3 − 3𝑥 2 + 1 − 6𝑥 3 + 9𝑥 2 + 𝑥 3 − 2𝑥 2 + 𝑥 + 7𝑥 3 − 7𝑥 2
𝑃3 𝑥 = 4𝑥 3 − 3𝑥 2 + 𝑥 + 1 = 𝑓(𝑥)
𝑓 0.5 = 1.25
Example 3.6.5:
Solution:
Given 𝑓 𝑥 = sin 𝑥 cos 𝑥
sin 2𝑥
𝑓 𝑥 =
2
1
𝑓′ 𝑥 = . cos 2𝑥 . 2 = cos 2𝑥
2
𝑓 ′′ 𝑥 = − sin 2𝑥 . 2 = −2 sin 2𝑥
𝑓 ′′′ 𝑥 = −4 cos 2𝑥
𝑓 ′′′′ 𝑥 = 8 sin 2𝑥
229
The error term 𝐸𝑖 is given by,
SPACE FOR HINTS 1
𝐸𝑖 = (𝑥 − 𝑥𝑖−1 )2 (𝑥 − 𝑥𝑖 )2 + 𝜖 ; 𝑥𝑖−1 < 𝜖 < 𝑥𝑖
4!
Here 𝑀𝑖 = max𝑥 𝑖−1 ≤𝑥≤𝑥 𝑖 𝑓 𝑖𝑣 𝑥 = max 8 sin 2𝑥
𝑥 𝑖−1 ≤𝑥≤𝑥 𝑖
2 2
1 𝑥𝑖 + 𝑥𝑖−1 𝑥𝑖−1 + 𝑥𝑖
=
4! 2 2
1
= (𝑥 − 𝑥𝑖−1 )2 (𝑥𝑖 − 𝑥𝑖−1 )2
24 × 16 𝑖
1
= (𝑥 − 𝑥𝑖−1 )4
384 𝑖
1
∴ at 0,1 , 𝐸1 = (1 − 0)4 𝑀1
384
1
= 8 = 0.0208
384
1
at 1,1.5 , 𝐸2 = (1.5 − 1)4 𝑀2
384
1
= (0.5)4 × 7.2744
384
230
= 0.0012
SPACE OF HINTS
1
at 1.5,2 , 𝐸3 = (2 − 1.5)4 𝑀3
384
1
= (0.5)4 6.0544 = 0.00099
384
1
at 2,3 , 𝐸4 = (3 − 2)4 𝑀4
384
1
= 8 = 0.0208
384
The maximum error term attained at the interval 0, 1 & (2, 3)
∴ max 𝑓 𝑥 − 𝑆3 𝑥 = max( 𝐸1 , 𝐸2 , 𝐸3 , 𝐸4
0≤𝑥≤3
= 0.0208
Spline interpolation
Definition 3.6.1:
i) 𝐹 𝑥𝑖 = 𝑓 𝑥𝑖 , 𝑖 = 0, 1, … , 𝑛.
ii) On each subintervals 𝑥𝑖−1 , 𝑥𝑖 , 1 ≤ 𝑖 ≤ 𝑛, 𝐹(𝑥) is a polynomial
of degree 𝑛.
iii) 𝐹(𝑥) and its first (𝑛 − 1) derivatives are continuous
interpolation.
𝐹 𝑥𝑖 = 𝑃𝑖 𝑥 = 𝑎𝑖 𝑥 2 + 𝑏𝑖 𝑥 + 𝑐𝑖 , 𝑖 = 1,2,3, ⋯ , 𝑛 1
𝑥𝑖−1 ≤ 𝑥 ≤ 𝑥𝑖
𝑏1 𝑥0 + 𝑐1 = 𝑓0
𝑏1 𝑥1 + 𝑐1 = 𝑓1 (2)
𝑎2 𝑥1 2 + 𝑏2 𝑥1 + 𝑐2 = 𝑓1
231
𝑎2 𝑥2 2 + 𝑏2 𝑥2 + 𝑐2 = 𝑓2 (3)
SPACE FOR HINTS 2𝑎2 𝑥1 + 𝑏2 = 2𝑎1 𝑥1 + 𝑏1
𝑎3 𝑥2 2 + 𝑏3 𝑥2 + 𝑐3 = 𝑓2
𝑎3 𝑥3 2 + 𝑏3 𝑥3 + 𝑐3 = 𝑓3 (4)
2𝑎3 𝑥2 + 𝑏3 = 2𝑎2 𝑥2 + 𝑏2
Example 3.6.1:
Given the data
𝑥 0 1 2 3
𝑓(𝑥) 1 2 33 244
Solution:
The spline approximation is
𝑃1 𝑥 = 𝑎1 𝑥 2 + 𝑏1 𝑥 + 𝑐1 , 0 ≤ 𝑥 ≤ 1 (1)
𝑃2 𝑥 = 𝑎2 𝑥 2 + 𝑏2 𝑥 + 𝑐2 , 1 ≤ 𝑥 ≤ 2 (2)
𝑃3 𝑥 = 𝑎3 𝑥 2 + 𝑏3 𝑥 + 𝑐3 , 2 ≤ 𝑥 ≤ 3 (3)
Since 𝑀 0 = 𝑓 ′′ 0 = 0
1 ⟹ 𝑃1 ′ 𝑥 = 2𝑎1 𝑥 + 𝑏1
𝑃1 ′′ 𝑥 = 2𝑎1
Now, 𝑥0 = 0 , 𝑥1 = 1 , 𝑥2 = 2 , 𝑥3 = 3
𝑓 𝑥0 = 1 , 𝑓 𝑥1 = 2 , 𝑓 𝑥2 = 33 , 𝑓 𝑥3 = 244
1 ⟹ 𝑏1 𝑥 + 𝑐1 = 𝑓0
⟹ 𝑏1 0 + 𝑐1 = 1
⟹ 𝑐1 = 1 (4)
1 ⟹ 𝑏1 𝑥 + 𝑐1 = 𝑓1
⟹ 𝑏1 + 1 = 2
232
⟹ 𝑏1 = 1 (5)
SPACE OF HINTS
2
(2) ⟹ 𝑎2 𝑥1 + 𝑏2 𝑥1 + 𝑐2 = 𝑓1
⟹ 𝑎2 + 𝑏2 + 𝑐2 = 2 (6)
⟹ 𝑎2 𝑥2 2 + 𝑏2 𝑥2 + 𝑐2 = 𝑓2
⟹ 4𝑎2 + 2𝑏2 + 𝑐2 = 33 7
⟹ 2𝑎2 𝑥1 + 𝑏2 = 2𝑎1 𝑥1 + 𝑏1
⟹ 2𝑎2 + 𝑏2 = 1 8
8 × 2 ⟹ 4𝑎2 + 2𝑏2 = 2
(4) ⟹ 2 + 𝑐2 = 33
∴ 𝑐2 = 31
𝑎2 + 𝑏2 + 𝑐2 = 2
4𝑎2 + 2𝑏2 + 𝑐2 = 33
-3𝑎2 − 𝑏2 = −31
3𝑎2 + 𝑏2 = 31
2𝑎2 + 𝑏2 = 1
𝑎2 = 30
∴ 𝑎2 = 30
(8) ⟹ 2𝑎2 + 𝑏2 = 1
∴ 𝑏2 = −59
3 ⟹ 𝑎3 𝑥2 2 + 𝑏3 𝑥2 + 𝑐3 = 𝑓2
𝑎3 𝑥3 2 + 𝑏3 𝑥3 + 𝑐3 = 𝑓3
2𝑎3 𝑥2 + 𝑏3 = 2𝑎2 𝑥2 + 𝑏2
233
10) − (9 ⇒ 5𝑎3 + 𝑏3 = 211 (12)
SPACE FOR HINTS
11 ⟹ 4𝑎3 + 𝑏3 = 61
𝑎3 = 150 ⟹ 𝑎3 = 150
𝑏3 = −539
𝑐3 = 511
Hence 𝑎1 = 0 , 𝑏1 = 1 , 𝑐1 = 1
𝑎2 = 30 , 𝑏2 = −59 , 𝑐2 = 31
∴ 𝑃1 𝑥 = 𝑥 + 1 , 0 ≤ 𝑥 ≤ 1
2 1 2
𝑓𝑖−1 − 𝑀𝑖−1 + 𝑥 − 𝑥𝑖−1 𝑓𝑖 − 𝑀
6 6 𝑖
6
and 𝑀𝑖−1 + 4𝑀𝑖 + 𝑀𝑖+1 = (𝑓𝑖+1 − 2𝑓𝑖 + 𝑓𝑖−1 )
2
Example 3.6.2:
Obtain the cubic spline approximation for the function defined by the
data
𝑥 0 1 2 3
𝑓(𝑥) 1 2 33 244
234
with 𝑀 0 = 0, 𝑀 3 = 0. Hence find an estimate of 𝑓(2.5)
SPACE OF HINTS
Solution:
Here = 1 and we know that,
6
𝑚𝑖−1 + 4𝑚𝑖 + 𝑀𝑖+1 = 𝑓𝑖+1 − 2𝑓𝑖 + 𝑓𝑖−1 where 𝑖 = 1, 2
2
∴ 4𝑀1 + 𝑀2 = 6 33 − 4 + 1 = 180
∴ 𝑀1 + 4𝑀2 = 1080 2
𝑀1 + 4𝑀2 = 1080
15𝑀1 = −360
⟹ 𝑀1 = −24
⟹ 𝑀2 = 276
235
1 1
𝐹 𝑥 = (𝑥 − 𝑥)3 𝑀0 + (𝑥 − 𝑥0 )3 𝑀1 + 𝑥1 − 𝑥 𝑓0 − 𝑀0
SPACE FOR HINTS 6 1 6
1
+ 𝑥 − 𝑥0 (𝑓1 − 𝑀1 )
6
1 24
= ( 1 − 𝑥 30 + 𝑥 − 0 3
24 + 1 − 𝑥 1 − 0 + 𝑥 − 0 2+
6 6
1
= −24𝑥 3 + 1 − 𝑥 + 6𝑥
6
= −4𝑥 3 + 5𝑥 + 1
1 1
= ( 2 − 𝑥 3 (−24) + 𝑥 − 1 3
276 + 2 − 𝑥 2− −24
6 6
276
+ 𝑥−1 33 +
6
= −4 8 − 𝑥 3 − 12𝑥 + 6𝑥 2 + 𝑥 3 − 1 − 3𝑥 2 + 3𝑥 + 46
+ 2 − 𝑥 6 + (𝑥 − 1)(−13)
236
= −46𝑥 3 + 414𝑥 2 − 985𝑥 + 715
SPACE OF HINTS
3
𝐹 𝑥 = −4𝑥 + 5𝑥 + 1 , 0 ≤ 𝑥 ≤ 1
= 121.25
Unit – 4
4.1:Numerical Differentiation
Numerical differentiation methods are obtained using one of the
following three techniques:
237
(ii). Methods based on finite difference operators.
SPACE FOR HINTS (iii). Methods based on undetermined coefficients.
𝑃𝑛 𝑥 𝑎𝑛𝑑 𝑓 𝑥 have the same values at the nodal points, yet the
derivatives may differ considerably at these points.
Quadratic interpolation:
The formula for quadratic interpolation is,
238
2𝑥 − 𝑥1 − 𝑥2 2𝑥 − 𝑥 − 𝑥2
𝑃2 ′ 𝑥 = 𝑓0 + 𝑓 SPACE OF HINTS
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) 1
2𝑥 − 𝑥0 − 𝑥1
+ 𝑓
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 ) 2
Liner interpolation
𝑓1 − 𝑓0 𝑓1 − 𝑓0
𝑓 ′ 𝑥0 ≅ 𝑃1 ′ 𝑥 = , 𝐸1 ′ 𝑥0 = 𝑓 ′ 𝑥0 −
𝑓1 − 𝑓0 𝑓1 − 𝑓0
𝑓 ′ 𝑥1 ≅ 𝑃1 ′ 𝑥 = , 𝐸1 ′ 𝑥1 = 𝑓 ′ 𝑥1 −
Quadratic interpolation
1
𝑓 ′ 𝑥0 = −3𝑓0 + 4𝑓1 − 𝑓2
2
1
𝑓 ′ 𝑥1 = 𝑓 − 𝑓0
2 2
1
𝑓 ′ 𝑥2 = 𝑓 − 4𝑓1 + 3𝑓2
2 0
And the truncation error is,
239
−2 ′′′
𝐸2 ′ 𝑥0 = 𝑓 𝜉 , 𝑥0 < 𝜉 < 𝑥2
SPACE FOR HINTS 3
′ −2 ′′′
𝐸2 𝑥1 = 𝑓 𝜂1 , 𝑥0 < 𝜂1 < 𝑥2
6
−2 ′′′
𝐸2 ′ 𝑥2 = 𝑓 𝜂2 , 𝑥0 < 𝜂2 < 𝑥2
3
Similarly,
1
𝑓 ′′ 𝑥0 ≅ 𝑃2 ′′ 𝑥0 = 𝑓 − 2𝑓1 + 𝑓2
2 0
1
𝑓 ′′ 𝑥1 ≅ 𝑃2 ′′ 𝑥1 = 𝑓 − 2𝑓1 + 𝑓2
2 0
1
𝑓 ′′ 𝑥2 ≅ 𝑃2 ′′ 𝑥2 = 𝑓 − 2𝑓1 + 𝑓2
2 0
The truncation error is given by,
1
𝐸2 ′′ 𝑥0 = 𝑓 ′′ 𝑥0 − 𝑓 𝑥0 − 2𝑓 𝑥2 + 𝑓 𝑥2
2
= −𝑓 ′′′ 𝜉1 , 𝑥0 < 𝜉1 < 𝑥2
′′ −2 𝑖𝑣
𝐸2 𝑥1 = 𝑓 𝜉2 , 𝑥0 < 𝜉2 < 𝑥2
12
𝐸2 ′′ 𝑥2 = 𝑓 ′′′ 𝜉3 , 𝑥0 < 𝜉3 < 𝑥2
Example: 4.1.1
Given the following values of 𝑓 𝑥 = ln 𝑥find the approximate value of
𝑓 ′ 2.0 using linear and quadratic interpolation of 𝑓 ′′ 2.0 and using
quadratic interpolation. Find an upper bound on the error.
I 0 1 2
Solution:
(i). Given 𝑥0 = 2.0 , 𝑥1 = 2.2 , 𝑥2 = 2.6
240
The formula for linear interpolation is (non-uniform)
SPACE OF HINTS
𝑓1 − 𝑓0
𝑓 ′ 𝑥0 =
𝑥1 − 𝑥0
0.78846 − 0.69315
= = 0.4765
2.2 − 2.0
Quadratic interpolation
2𝑥0 − 𝑥1 − 𝑥2 𝑥0 − 𝑥2
𝑓 ′ 𝑥0 = 𝑓0 + 𝑓
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) 1
𝑥0 − 𝑥1
+ 𝑓
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 ) 2
𝑓 ′ 2.0
4 − 2.2 − 2.6
= (0.69315)
2.0 − 2.2 2.0 − 2.6
2 − 2.6
+ (0.78846)
2.2 − 2 2.2 − 2.6
2 − 2.2
+ (0.95551)
2.6 − 2 2.6 − 2.2
To find 𝒇′′ 𝒙𝟎
𝑓 ′′ 𝑥0
𝑓0 𝑓1
=2 +
(𝑥0 − 𝑥1 )(𝑥0 − 𝑥2 ) (𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 )
𝑓3
+
(𝑥2 − 𝑥0 )(𝑥2 − 𝑥1 )
𝑓 ′′ 2.0
0.69315 0.78846
=2 +
(2 − 2.2)(2 − 2.6) (2.2 − 2)(2.2 − 2.6)
0.95551
+
(2.6 − 2)(2.6 − 2.2)
𝑓 ′′ 2.0 = −0.19642
241
𝑥0 − 𝑥1 ′′
𝐸1 ′ 𝑥0 = 𝑓 𝜉 , 𝑥0 < 𝜉 < 𝑥1
SPACE FOR HINTS 2
1
𝐸2 ′ 𝑥0 = 𝑥0 − 𝑥1 𝑥0 − 𝑥2 𝑓 ′′′ 𝜉 , 𝑥0 < 𝜉 < 𝑥2
6
1
𝐸2 ′′ 𝑥0 = 2𝑥0 − 𝑥1 − 𝑥2 𝑓 ′′′ 𝜉
3
1
+ 𝑥0 − 𝑥1 𝑥0 − 𝑥2 𝑓 𝐼𝑣 𝜂1 + 𝑓 𝐼𝑣 𝜂2
24
𝑥0 < 𝜉, 𝜂1 , 𝜂2 < 𝑥2
Given 𝑓 𝑥 = ln 𝑥
1 1 2 −6
𝑓′ 𝑥 = , 𝑓 ′′ 𝑥 = − , 𝑓 ′′′ 𝑥 = , 𝑓 𝑖𝑣 𝑥 =
𝑥 𝑥2 𝑥3 𝑥4
1
Now, 𝑀2 = max𝑥 0 <𝜉 <𝑥 1 𝑓 ′′ (𝜖) = max2<𝜉 <2.2 − = 0.25
𝑥2
2
𝑀3 = max 𝑓 ′′′ (𝜖) = max = 0.25
𝑥 0 <𝜉 <𝑥 2 2<𝜉 <2.6 𝑥3
6
𝑀4 = max 𝑓 𝑖𝑣 (𝜖) = max − = 0.375
𝑥 0 <𝜉 , 𝜂 1 ,𝜂 2 <𝑥 2 2<𝜉 ,𝜂 1 ,𝜂 2 <2.6 𝑥4
2 − 2.2
𝐸1 ′ 2.0 = 0.25 = 0.025
2
1
𝐸2 ′ 2.0 = 2 − 2.2 2 − 2.6 0.25 = 0.005
6
𝐸2 ′′ 2.0
1
= 4 − 2.2 − 2.6 0.25
3
1
+ 2 − 2.2 2 − 2.6 0.375 + 0.375
24
𝐸2 ′′ 2.0 = 0.0704
Example: 4.1.2
242
find 𝑓 ′ 0.8 and 𝑓 ′′ 0.8 using quadratic interpolation. Compare the
SPACE OF HINTS
exact solution obtain the bound on the truncation errors.
Solution:
Here intervals are equal.
1
= 0.0256 − 2(0.1296) + 0.4096 = 4.4
0.04
To find the exact solution:
Given 𝑓 𝑥 = 𝑥 4
′ −2 ′′′
𝐸2 𝑥2 = 𝑓 𝜂2
3
𝐸2 ′′ 𝑥2 = 𝑓 ′′′ 𝜖3
2
′ 0.2
𝐸2 𝑥2 ≤ 19.2 = 0.256
3
243
Example: 4.1.3
SPACE FOR HINTS a) Derive the formulas for the first derivative of 𝑦 = 𝑓 𝑥 of
𝑂 2 using
i. Forward difference approximation
ii. Backward difference approximation
iii. Central difference approximation
b) When 𝑓 𝑥 = sin 𝑥estimate 𝑓 ′ 𝜋 4 with = 𝜋 4using the
above formulas. Obtain the bounds on the truncation error and
compare with the exact solution.
Solution:
(a). (i) Newton‟s forward difference formula is given by,
𝑢(𝑢 − 1) 2 (𝑥 − 𝑥0 )
𝑓 𝑥 = 𝑓0 + 𝑢∆𝑓0 + ∆ 𝑓0 𝑤𝑒𝑟𝑒 𝑢 =
2
𝜕𝑓 𝜕𝑢
𝑓′ 𝑥 = .
𝜕𝑢 𝜕𝑥
𝜕𝑢 1 𝜕𝑓 (2𝑢 − 1) 2
= , = ∆𝑓0 + ∆ 𝑓0
𝜕𝑥 𝜕𝑢 2
1 (2𝑢 − 1) 2
∴ 𝑓′ 𝑥 = ∆𝑓0 + ∆ 𝑓0
2
′ ′
2
𝐸 𝑥0 = 𝐸 𝑢=0 ≤ 𝑀3 , 𝑤𝑒𝑟𝑒 𝑀3 = max 𝑓 ′′′ 𝜉 .
3 𝑥 0 <𝜖<𝑥 2
244
2
𝐸 ′ 𝑥2 = 𝐸′ 𝑢 = 0 ≤ 𝑀, 𝑤𝑒𝑟𝑒 𝑀3 = max 𝑓 ′′′ 𝜉 SPACE OF HINTS
3 3 𝑥 0 <𝜖<𝑥 2
= 1 2 𝑓1 − 𝑓−1
1 1
∴ 𝑓 ′ 𝑥 = 1 2 𝑓1 − 𝑓−1 = 𝑓 − 𝑓−1
2 1
2
The error term is, 𝐸 ′ 𝑥 = 𝑀3
6
(b). 𝑓 𝑥 = sin 𝑥
𝑥 𝑓(𝑥) ∆ ∆2
𝜋 0.7071
4
0.1589
𝜋 0.8660 −0.059
3
0.0999
0.9659
5𝜋
12
1 (2𝑢 − 1) 2
𝑓′ 𝑥 = ∆𝑓0 + ∆ 𝑓0
2
245
12 0.059
𝑓′ 𝜋 4 = 0.1589 +
SPACE FOR HINTS 𝜋 2
𝑓 ′ 𝜋 4 = 0.71963
Now,
′
2
𝐸 𝑥 ≤ 𝑀3 , 𝑤𝑒𝑟𝑒 𝑀3 = max 𝑓 ′′′ 𝜉
3 𝜋
4 <𝜖<
5𝜋
12
∴ 𝑀3 = max − cos 𝑥
𝜋 5𝜋
4 <𝜉< 12
𝑀3 = cos 𝜋 4 = 0.70711
𝜋 2
𝐸′ 𝑥 ≤ 12 × 0.70711 = 0.0162
3
Backward difference table
𝑥 𝑓 𝑥 ∇ ∇2
𝜋 0.2588
12
0.2412
𝜋 0.5 -0.0341
6
0.2071
𝜋 0.7071
4
1 2𝑢 + 1 2
𝑓′ 𝑥 = ∇𝑓2 + ∇ 𝑓2
2
(𝑥 − 𝑥0 ) 𝑥2 − 𝑥2
𝑢= = =0
12 1
𝑓′ 𝜋 4 = 0.2071 + −0.0341
𝜋 2
= 0.72593
𝑓 ′ 𝜋 4 ≅ 0.7260
2
𝐸′ 𝑥 ≤ 𝑀 , 𝑤𝑒𝑟𝑒 𝑀3 = 𝜋 max𝜋 − cos 𝑥
3 3 12 <𝜉 < 4
246
𝜋 2
𝑥 𝑓(𝑥) 𝛿
𝜋 6 0.5
0.20711
𝜋 4 0.7071
0.1589
𝜋 3 0.8660
1
𝑓′ 𝜋 4 = 𝑓 − 𝑓−1
2 1
1
= 0.8660 − 0.5 = 0.6991
2 × 𝜋 12
′
2
𝐸 𝑥 ≤ 𝑀3 , 𝑤𝑒𝑟𝑒 𝑀3 = 𝜋 max𝜋 − cos 𝑥 = 0.86603
3 6<𝜉 < 3
𝜋 2
= 12 0.86603
3
𝐸′ 𝑥 = 0.00989 ≅ 0.0099
𝑓 ′ 𝜋 4 = cos 𝜋 4 = 0.70711
247
Determine the values of 𝛼0 , 𝛼1 , 𝛼2 𝑎𝑛𝑑 𝛼4 so that the rule is exact for a
SPACE FOR HINTS polynomial of degree 4.
Solution:
𝑓 ′ 𝑥2 = 𝛼0 𝑓 𝑥0 + 𝛼1 𝑓 𝑥1 + 𝛼2 𝑓 𝑥3 + 𝛼3 𝑓 𝑥4 (1)
Given 𝑥𝑗 = 𝑥0 + 𝑗, 𝑗 = 0, 1, 2, 3, 4
∴ We have 𝑥0 = 𝑥2 − 2 , 𝑥1 = 𝑥1 −
𝑥3 = 𝑥2 + , 𝑥4 = 𝑥1 + 2
∴ 1 ⟹ 𝑓 ′ 𝑥2 = 𝛼0 𝑓 𝑥2 − 2 + 𝛼1 𝑓 𝑥1 − + 𝛼2 𝑓 𝑥2 +
+𝛼3 𝑓 𝑥1 + 2
𝑥 = 𝑥2 − 2
′
𝑓 ′ 𝑥2 𝑓 ′′ 𝑥2 2
∴ 𝑓 𝑥2 = 𝛼0 𝑓 𝑥2 + −2 + −2 +⋯
1! 2!
𝑓 ′′ 𝑥2
+ 𝛼1 𝑓 𝑥2 + 𝑓 ′ 𝑥2 − + − 2
+⋯
2!
′
𝑓 ′′ 𝑥2 2
+𝛼2 𝑓 𝑥2 + 𝑓 𝑥2 + +⋯
2!
𝑓 ′′ 𝑥2
+𝛼3 𝑓 𝑥2 + 𝑓 ′ 𝑥2 2 + 2 2
+⋯
2!
248
= 𝛼0 + 𝛼1 + 𝛼2 + 𝛼3 𝑓 𝑥2
SPACE OF HINTS
′
+ 𝑓 𝑥2 −2𝛼0 − 𝛼1 + 𝛼2 + 2𝛼3
𝑓 ′′ 𝑥0
+ 42 𝛼0 + 2 𝛼1 + 2 𝛼2 + 42 𝛼3 + ⋯
2
𝑓 ′ 𝑥2 = 𝛼0 + 𝛼1 + 𝛼2 + 𝛼3 𝑓 𝑥2
+ 𝑓 ′ 𝑥2 −2𝛼0 − 𝛼1 + 𝛼2 + 2𝛼3
𝑓 ′′ 𝑥0 2
+ 4𝛼0 + 𝛼1 + 𝛼2 + 4𝛼3 + ⋯
2
−2𝛼0 − 𝛼1 + 𝛼2 + 2𝛼3 = 0
𝑓 ′′ 𝑥 0
Comparing the coefficient of 2 on both sides, we get
2
4𝛼0 + 𝛼1 + 𝛼2 + 4𝛼3 = 0
𝑓 ′′′ 𝑥 0
Comparing the coefficient of 3 on both sides, we get
3!
−8𝛼0 − 𝛼1 + 𝛼2 + 8𝛼3 = 0
𝐵𝑖
Using Cramer‟s rule, we find 𝑥𝑖 = , 𝑖 = 0,1,2,3.
𝐴𝑖
= −12 + 48 + 48 − 12
𝐴 = 72
249
0 1 1 1
1 1 1
1 −1 1 2
SPACE FOR HINTS Now, 𝐵1 = =0−1 1 1 4
0 1 1 4
−1 1 8
0 −1 1 8
= −4 − 12 − 2 = 6
1 0 1 1
−2 1 1 2
𝐵2 =
4 0 1 4
−8 0 1 8
1 1 2 −2 1 2 −2 1 1
=1 0 1 4 −0+ 4 0 4 +1 4 0 1
0 1 8 −8 0 8 −8 0 1
= 1 8 − 4 + −2 0 + 1 32 + 32 + 2 0 + 2 6 − 0
+1 4−8 +0
𝐵2 = −48
𝐵3 = 48
𝐵4 = −6
𝐵1 6 1 𝐵2 −48 −2
⟹ 𝛼0 = = = 𝛼1 = = =
𝐴 72 12 𝐴 72 3
𝐵3 48 2 𝐵4 −6 −1
𝛼2 = = = 𝛼3 = = =
𝐴 72 3 𝐴 72 12
1 −2 2 1
∴ 𝑓 ′ 𝑥2 = 𝑓 𝑥0 + 𝑓 𝑥1 + 𝑓 𝑥2 − 𝑓(𝑥3 )
12 3 3 12
1 1 −2 2 1
∴ 𝑓 ′ 𝑥2 = 𝑓 𝑥0 + 𝑓 𝑥1 + 𝑓 𝑥2 − 𝑓(𝑥3 )
12 3 3 12
i. The error term becomes
5 5
𝛼0 −2 𝛼1 − 𝛼2 5 𝛼3 2 5
𝐸= + + + 𝑓5 𝜉 ,
5! 5! 5! 5!
𝑥2 − 2 ≤ 𝑥 ≤ 𝑥2 + 2
5
= [−32𝛼0 − 𝛼1 + 𝛼2 + 32𝛼3 ]𝑓 5 𝜉
120
ii. To find round of error in 𝑓 ′ (𝑥2 )
250
𝑓 𝑥2 − 2 , 𝑓 𝑥2 − , 𝑓 𝑥2 + , 𝑓 𝑥2 + 2 respectively.
SPACE OF HINTS
1 1 2 2 1
Then 𝑅𝐸 ≤ 𝜖 − 𝜖1 + 𝜖2 − 𝜖
12 0 3 3 12 3
𝜉 = max 𝜉0 , 𝜉1 , 𝜉2 , 𝜉3
1 1 2 2 1
𝑅𝐸 ≤ 𝜉− 𝜉+ 𝜉− 𝜉
12 3 3 12
1 1 2 2 1
≤ 𝜉 + 𝜉 + 𝜉 + 𝜉
12 3 3 12
1 2 4
≤ 𝜉 + 𝜉
12 3
1 2 + 16 𝜉
≤
12
1 3
≤ 𝜉
2
1 1
iii. 𝑓 ′ 𝑥2 = 𝑓 𝑥0 − 8𝑓 𝑥1 + 8𝑓 𝑥3 − 𝑓(𝑥4 )
12
1
= sin 0.1 − 8 sin 0.2 + 8 sin 0.4 − sin 0.5
12 × 0.1
1
= 0.09983 − 1.5894 + 3.11535 − 0.4794
1.2
= 0.95532
251
Generally it is possible to obtain highly accurate results by
SPACE FOR HINTS combining the computed values obtained by using a certain method with
different step sizes.
𝑔 𝑞 = 𝑔 + 𝑐𝑞𝑝 𝑝 + 𝑂(𝑝+1 )
1
𝑞𝑝 𝑔 − 𝑔 𝑞
𝑔 = 𝑝
= 𝑔 + 𝑂(𝑝+1 )
𝑞 −1
Richardson’s extrapolation
The formula for Richardson‟s extrapolation is,
4𝑚 𝑔 𝑚 −1 𝑚 −1
2 −𝑔
𝑚
𝑔 = , 𝑚 = 1,2, … 𝑤𝑒𝑟𝑒 𝑔(0)
4𝑚 −1
= 𝑔()
Extrapolation table:
252
𝑔
SPACE OF HINTS
′
𝑔 ()
𝑔( 2) 𝑔(2) ()
2
𝑔(1) ( 2) 𝑔(3) ()
𝑔(2) ( 2)
𝑔( 22 )
22
𝑔(1) ( 22 )
𝑔( 23 )
23
Example: 4.2.1
The following table of values is given
𝑥 -1 1 2 3 4 5 7
Find 𝑓 ′ 3 .
Solution:
𝑓 𝑥 2 −𝑓(𝑥 0 )
Let 𝑓 ′ 𝑥1 =
2
∴ 1 𝑏𝑒𝑐𝑜𝑚𝑒𝑠
𝑓 ′ 𝑥1 𝑓 ′′ 𝑥1 2
𝑓 𝑥0 = 𝑓 𝑥1 + 𝑥0 − 𝑥1 + 𝑥0 − 𝑥1 +⋯
1! 2!
′
𝑓 ′′ 𝑥1 2
= 𝑓 𝑥1 + 𝑓 𝑥1 (−) + − +⋯
2
253
2 ′′
𝑓 𝑥0 = 𝑓 𝑥1 − 𝑓 ′ 𝑥1 + 𝑓 𝑥1 + ⋯ (2)
SPACE FOR HINTS 2
Put 𝑥 = 𝑥2 , 𝑥0 = 𝑥1 𝑖𝑛 1 ,
𝑓 ′ 𝑥1 𝑓 ′′ 𝑥1 2
𝑓 𝑥2 = 𝑓 𝑥1 + 𝑥2 − 𝑥1 + 𝑥2 − 𝑥1 +⋯
1! 2!
′
𝑓 ′′ 𝑥1 2
= 𝑓 𝑥1 + 𝑓 𝑥1 + +⋯
2
′
2 ′′
𝑓 𝑥2 = 𝑓 𝑥1 + 𝑓 𝑥1 + 𝑓 𝑥1 + ⋯ (3)
2
3 − 2 ⟹ 𝑓 𝑥2 − 𝑓 𝑥0
23 ′′′ 25 5
= 2𝑓 ′ 𝑥1 + 𝑓 𝑥1 + 𝑓 𝑥1 + ⋯
3! 5!
′
2 ′′′ 4 5
= 2 𝑓 𝑥1 + 𝑓 𝑥1 + 𝑓 𝑥1 + ⋯
3! 5!
𝑓 𝑥2 − 𝑓 𝑥0 2 4 5
⟹ = 𝑓 ′ 𝑥1 + 𝑓 ′′′ 𝑥1 + 𝑓 𝑥1 + ⋯
2 6 120
Extrapolation table becomes,
=4 𝑔 = 𝑓(4)
𝑔′ ()
𝑔(2) ()
2=2 𝑔 2
𝑔(1) ( 2)
= 𝑔(2)
22 = 1
𝑔 22
= 𝑔(1)
254
𝑓 𝑥2 − 𝑓 𝑥0
𝑔 𝑥 = SPACE OF HINTS
2
Also
𝑓 𝑥1 = 81, 𝑓 𝑥2 = 625
625 − 1
= 2, 𝑔 2 = = 156
4
Take = 1, 𝑥0 = 2, 𝑥1 = 3, 𝑥2 = 4, 𝑓 𝑥0 = 16,
𝑓 𝑥1 = 81, 𝑓 𝑥2 = 256
256 − 1
= 1, 𝑔 1 = = 120
2
Richardson‟s extrapolation formula for higher derivatives is,
4𝑚 𝑔 𝑚 −1 𝑚 −1
2 −𝑔
𝑚
𝑔 = ,𝑚
4𝑚 − 1
= 1,2, … 4
𝑤𝑒𝑟𝑒 𝑔0 = 𝑔
4𝑔 0 0
4𝑔 2 − 𝑔
2 −𝑔
𝑔′ = =
4−1 3
4𝑔 2 − 𝑔(4) 4 × 156 − 300
= 4, 𝑔′ 4 = = = 108
3 3
4𝑔 1 − 𝑔(2) 4 × 120 − 156
= 2, 𝑔′ 2 = = = 108
3 3
Put 𝑚 = 2 in (4), we get
255
′′ 2
42 𝑔 1
2 −𝑔 1
4 16 108 − 108
𝑔 4 =𝑔 4 = = = 108
SPACE FOR HINTS 42 − 1 15
The extrapolation table becomes
4 300
108
2 156 108
108
1 120
∴ 𝑓 ′ 𝑥 = 4𝑥 3
𝑓 ′ 3 = 4 × 33 = 108
Example: 4.2.2
−𝑦 𝑥 + 2 + 4𝑦 𝑥 + − 3𝑦(𝑥)
Define𝑆 =
2
a) Show that 𝑦 ′ 𝑥 − 𝑆 = 𝑐1 2 + 𝑐2 3 + 𝑐1 4 + ⋯ and
state𝑐1 .
b) Calculate 𝑦 ′ (0.398) as accurately as possible using the table
below and with the aid of the approximation 𝑆 . Give an error
estimate (the values in the table are correctly rounded).
Solution:
Expanding 𝑦(𝑥 + ) and 𝑦(𝑥 + 2) in Taylor series about the
point 𝑥,
256
2 ′′′ 3 7 2 𝑣
𝑆 = 𝑦′ 𝑥 − 𝑦 𝑥 − 𝑦 𝑖𝑣 𝑥 − 𝑦 𝑥 −⋯ SPACE OF HINTS
3 4 603
= 𝑦 ′ 𝑥 − 𝑐1 2 − 𝑐2 3 − 𝑐1 4 + ⋯
⟹ 𝑦 ′ 𝑥 − 𝑆 = 𝑐1 2 − 𝑐2 3 − 𝑐1 4 + ⋯
𝑦 ′′′ 𝑥
where 𝑐1 = 3
(b). Taking = 0.001, we obtain, using the given formula and the data
−𝑦 0.400 + 4𝑦 0.399 − 𝑦(0.398)
𝑦 ′ 0.398 ≈
2(0.001)
= 1.0795
1 3
≈ ∆ 𝑦0
3
1
= (𝑦 − 3𝑦2 + 3𝑦1 − 𝑦0 )
3 3
1
= 𝑦 0.401 − 3𝑦 0.400 + 3𝑦 0.399 − 𝑦 0.398 =0
3(0.001)
Taking the next term in the error formula, we have
3
Error = 𝑦 𝑖𝑣 𝑥0
4
1 4
≈ ∆ 𝑦0
4
1
= (𝑦 − 4𝑦3 + 6𝑦2 −4𝑦1 − 𝑦0 )
4 4
1
= 𝑦 0.402 − 4𝑦 0.401 + 6𝑦 0.400 − 4𝑦 0.399
0.004
+ 𝑦(0.398)
= −0.0005.
257
Let the values of the function 𝑓 𝑥, 𝑦 be given at a set of points
SPACE FOR HINTS 𝑥𝑖 , 𝑦𝑗 in the plane with spacing and 𝑘 in 𝑥 and 𝑦 directions
respectively, we have
𝑥𝑖 = 𝑥0 + 𝑖, 𝑦𝑗 = 𝑦0 + 𝑗𝑘, 𝑖, 𝑗 = 1, 2, …
𝑓𝑖,𝑗 +1 − 𝑓𝑖,𝑗
+ 𝑂(𝑘)
𝑘
𝜕𝑓 𝑓𝑖,𝑗 − 𝑓𝑖,𝑗 −1
= + 𝑂(𝑘)
𝜕𝑥 𝑥𝑖 , 𝑦 𝑗 𝑘
𝑓𝑖,𝑗 +1 − 𝑓𝑖,𝑗 −1
+ 𝑂(𝑘 2 )
2𝑘
𝜕2 𝑓 1
= 𝑓 − 2𝑓𝑖,𝑗 + 𝑓𝑖+1,𝑗 + 𝑂(2 )
𝜕𝑥 2
𝑥𝑖 , 𝑦 𝑗
2 𝑖−1,𝑗
𝜕2 𝑓 1
= 𝑓 − 2𝑓𝑖,𝑗 + 𝑓𝑖,𝑗 +1 + 𝑂(𝑘 2 )
𝜕𝑦 2 𝑥𝑖 , 𝑦 𝑗
𝑘 2 𝑖,𝑗 −1
Example: 4.3.1
Find the Jacobian matrix for the system of equations
𝑓1 𝑥, 𝑦 = 𝑥 2 + 𝑦 2 − 𝑥 = 0, 𝑓2 𝑥, 𝑦 = 𝑥 2 − 𝑦 2 − 𝑦 = 0
Solution:
258
The Jacobian matrix is given by,
SPACE OF HINTS
𝜕𝑓1 𝜕𝑓1
𝜕𝑥 𝜕𝑦
𝐽=
𝜕𝑓2 𝜕𝑓2
𝜕𝑥 𝜕𝑦
𝜕𝑓 𝑓 𝑖+1,𝑗 −𝑓 𝑖−1,𝑗
Given = and
𝜕𝑥 𝑥 𝑖 ,𝑦 𝑗 2
𝜕𝑓 𝑓𝑖,𝑗 +1 − 𝑓𝑖,𝑗 −1
=
𝜕𝑦 𝑥 𝑖 ,𝑦 𝑗
2𝑘
Now = 1,
𝜕𝑓1 𝑓1 (1 + , 1) − 𝑓1 (1 − , 1) 𝑓1 (2,1) − 𝑓1 (0, 1)
= =
𝜕𝑥 1,1 2 2
3−1
= =1
2
𝜕𝑓2 𝑓2 (2,1) − 𝑓2 (0.1) (4 − 1 − 1) + 2
= = =2
𝜕𝑥 (1,1) 2 2
Put 𝑘 = 1,
𝜕𝑓1 𝑓1 (1,2) − 𝑓1 (1,2) 4 − 0
= = =2
𝜕𝑦 (1,1)
2 2
1 2
∴ The Jacobian matrix 𝐽 =
2 −3
Definition:
An integration method of the form
𝑛
𝑏
𝐼= 𝑤 𝑥 𝑓 𝑥 𝑑𝑥 ≅ 𝜆𝑘 𝑓𝑘 𝑤𝑒𝑟𝑒 𝑥𝑘 , 𝑘 = 0,1, … , 𝑛
𝑎 𝑘=0
259
are called the abscissas or nodes distributed within the limits of
SPACE FOR HINTS integration 𝑎, 𝑏 and 𝜆𝑘 , 𝑘 = 0,1, … , 𝑛 are called the weights of the
integration rule or the quadratic formula. The above integration is said to
be of order 𝑝 , if it produces exact results 𝑅𝑛 = 0 for all polynomials
of degree less than or equal to 𝑝.
𝑏−𝑎
where 𝑥𝑘 are equispaced with 𝑥0 = 𝑎, 𝑥𝑛 = 𝑏 with spacing = .
𝑛
Trapezoidal rule
The formula for Trapezoidal rule is,
𝑏
𝑏−𝑎
𝐼= 𝑓 𝑥 𝑑𝑥 = 𝑓 𝑎 + 𝑓(𝑏)
𝑎 2
Simpson’s rule:
The formula for Simpson‟s rule is,
𝑏
𝑏−𝑎 𝑎+𝑏
𝐼= 𝑓 𝑥 𝑑𝑥 = 𝑓 𝑎 + 4𝑓 + 𝑓(𝑏)
𝑎 6 2
260
4 − 𝑏 − 𝑎 5
−5 𝑖𝑣
𝑅2 = = 𝑓 𝑖𝑣 𝜂 = 𝑓 𝜂 SPACE OF HINTS
3! 2880 90
𝒕𝒉
Simpson’s 𝟑 𝟖 rule:
𝑡
The formula for Simpson‟s 3 8 rule is,
𝑥3
3
𝑓 𝑥 𝑑𝑥 = 𝑓 𝑥0 + 3𝑓 𝑥1 + 3𝑓 𝑥2 + 𝑓(𝑥3 )
𝑥0 8
i. Trapezoidal rule
ii. Simpson‟s rule.
Solution:
1 𝑑𝑥
Given 𝐼 = 0 1+𝑥
1 −1 2
Here 𝑓 𝑥 = , 𝑓′ 𝑥 = , 𝑓 ′′ 𝑥 =
1+𝑥 1+𝑥 2 1+𝑥 3
Here 𝑎 = 0, 𝑏 = 1
∴ 𝑓 𝑎 = 1, 𝑓 𝑏 =1 2
1−0 1
Hence 𝐼 = 1+ = 0.75
2 2
261
− 𝑏−𝑎 3
The truncation error 𝑅1 = 𝑓 ′′ 𝜂
12
SPACE FOR HINTS
Now,
2
𝑀2 = max 𝑓 ′′ 𝜂 = max 3
=2
𝑎≤𝑥≤𝑏 0≤𝑥≤1 1+𝑥
3
− 1−0 2 1
∴ 𝑅1 = (2) = ≤ = 0.1667
12 12 6
𝑏−𝑎 𝑎+𝑏
𝐼= 𝑓 𝑎 + 4𝑓 + 𝑓(𝑏)
6 2
1−0
= 1 + 2.6667 + 0.5
6
𝐼 = 0.69444
The error term is,
5
− 𝑏−𝑎
𝑅2 = 𝑓 𝑖𝑣 𝜂
2880
24
𝑀4 = max 𝑓 𝑖𝑣 𝜂 = max 5
= 24
0≤𝑥≤1 0≤𝑥≤1 1+𝑥
1 5
𝑅2 = . 24 = 0.00833
2880
Exact value
1 𝑑𝑥
Given 𝑓(𝑥) = 0 1+𝑥
1
𝑑𝑥 1
𝐼= = log 1 + 𝑥 0
0 1+𝑥
𝐼 = 0.69315
i. Mid-point rule:
262
𝑛 = 2 , 𝑥0 = 𝑎, 𝑥0 + , 𝑥0 + 2 = 𝑏
SPACE OF HINTS
𝑏 3
′′′
∴ 𝑓 𝑥 𝑑𝑥 = 2𝑓 𝑥0 + + 𝑓 (𝜉1 )
𝑎 3
𝑛 = 3 , 𝑥0 = 𝑎, 𝑥0 + , 𝑥0 + 2, 𝑥0 + 3 = 𝑏
𝑏
3 3
∴ 𝑓 𝑥 𝑑𝑥 = 𝑓 𝑥0 + + 𝑓(𝑥0 + 2) + 3 𝑓 ′′ (𝜉1 )
𝑎 2 4
iii. Three-point rule:
𝑛 = 3 , 𝑥0 = 𝑎, 𝑥0 + , 𝑥0 + 2, 𝑥0 + 3 = 𝑏
𝑏
4
∴ 𝑓 𝑥 𝑑𝑥 = 2𝑓 𝑥0 + − 𝑓 𝑥0 + 2 + 2𝑓 𝑥0 + 3
𝑎 3
14 5 𝑖𝑣
+ 𝑓 (𝜉3 )
45
where 𝑎 < 𝜉1 , 𝜉2 , 𝜉3 < 𝑏
Example: 4.4.2
1 sin 𝑥
Find the approximate value of 𝐼 = 0 𝑥
𝑑𝑥 using
i. Mid-point rule
ii. Two-point open type rule
Solution:
1 sin 𝑥
Given 𝐼 = 0 𝑥
𝑑𝑥
sin 𝑥 𝑏−𝑎 1
Here 𝑓 𝑥 = , 𝑎 = 0, 𝑏 = 1, = = 𝑥0 = 0,
𝑥 2 2
1
𝑥1 = , 𝑥2 = 1
2
1 sin 1 2
Now 𝑓 𝑥0 + = 𝑓 𝑥1 = 𝑓 = 1 = 0.9589
2 2
263
𝑏
3 ′
𝑓 𝑥 𝑑𝑥 = 2𝑓 𝑥0 + + 𝑓 (𝜖1 )
SPACE FOR HINTS 𝑎 3
=2 1 2 0.9589 + 𝑒𝑟𝑟𝑜𝑟
= 0.9589
ii. Two-point rule is,
𝑏
3 3
𝑓 𝑥 𝑑𝑥 = 𝑓 𝑥0 + + 𝑓(𝑥0 + 2) + 3 𝑓 ′′ (𝜖2 )
𝑎 2 4
𝑏−𝑎 1 1 2
Here = = , 𝑛 = 3, 𝑥0 = 0, 𝑥1 = , 𝑥2 = , 𝑥3 = 1
𝑛 3 3 3
1
3
𝐼= 𝑓 𝑥 𝑑𝑥 = 𝑓 1 3 +𝑓 2 3
0 8
1
= 0.9816 + 0.92756
2
𝐼 = 0.9546
Example: 4.4.3
Find the reminder of the Simpson three-eighth rule
𝑥3
3
𝑓 𝑥 𝑑𝑥 = 𝑓 𝑥0 + 3𝑓 𝑥1 + 3𝑓 𝑥2 + 𝑓(𝑥3 )
𝑥0 8
the error.
Solution:
𝑓 𝑥 = 𝑥 0 = 1. We get,
𝑥3
3
𝑑𝑥 = 𝑥3 − 𝑥0 = × 1 + 3 + 3 + 1 = 3
𝑥0 8
264
𝐶
The error term is given by, 𝐸 = 𝑓 𝑖𝑣 (𝜂)
4! SPACE OF HINTS
𝑥3 5 𝑥0 5 3
= − − 𝑥 4 + 3(𝑥0 + )4 + 3(𝑥0 + 2)4 + (𝑥0 + 3)4
5 5 8 0
(𝑥0 + 3)5 𝑥0 5
= −
5 5
3
− 𝑥0 4 + 3 𝑥0 4 + 4𝑥0 3 + 4𝐶2 𝑥0 2 2 + 4𝐶3 𝑥0 3 + 4
8
+3 𝑥0 4 + 4𝑥0 3 (2) + 4𝐶2 𝑥0 2 (2)2 + 4𝐶3 𝑥0 (2)3 + (2)4
265
5 3 9 9 3
= 𝑥0 4 (3) − − − −
SPACE FOR HINTS 5 8 8 8 8
3
10 2
362 722 362
+ 𝑥0 9 − − −
5 8 8 8
10(273 ) 543 2163 1623
+ 𝑥0 2 − − −
5 8 8 8
364 2884 3244
4
2435 95
+ 𝑥0 81 − − − + −
8 8 8 5 8
1445 2435
− −
8 8
−36
= 𝑥0 4 0 + 𝑥0 3 0 + 𝑥0 2 0 + 𝑥0 0 + 5
40
−9 5
𝐶=
10
𝐶
Hence the error term is 𝐸 = 𝑓 𝑖𝑣 𝜂
4!
9 5 𝑖𝑣
=− 𝑓 𝜂
10 24
−35 𝑖𝑣
𝐸= 𝑓 𝜂
80
Given 𝑥𝑖 = 𝑥0 + 𝑖, 𝑖 = 1,2,3.
𝑏−𝑎 1−0 1
∴ By two point rule 𝑛 = 3 , = = =
𝑛 3 3
∴ 𝑥0 = 0, 𝑥1 = 𝑥0 + = 1 3 , 𝑥2 = 𝑥0 + 2 = 2 3 , 𝑥3
= 𝑥0 + 3 = 𝑏 = 1
3
∴𝐼= 𝑓 𝑥0 + 3𝑓 𝑥1 + 3𝑓 𝑥2 + 𝑓(𝑥3 )
8
3 13
1
= 1+3 3 4 +3 3 5 +
8 2
266
1 9 9 1
= 1+ + + SPACE OF HINTS
8 4 5 2
𝐼 = 0.69375
Trapezoidal rule:
The formula for Trapezoidal rule is,
𝐼= 𝑓 + 2 𝑓1 + 𝑓2 + ⋯ + 𝑓𝑁−1 + 𝑓𝑁
2 0
Simpson’s rule: (No of interval is even)
The formula for Simpson‟s rule is,
𝐼= 𝑓 + 4 𝑓1 + 𝑓3 + ⋯ + 𝑓2𝑁−1 + 2 𝑓2 + 𝑓4 + ⋯ + 𝑓2𝑁−2 + 𝑓2𝑁
3 0
Gauss-Legendre three point formula:
1
1
𝑓 𝑥 𝑑𝑥 = 5𝑓 − 3 5 + 8𝑓 0 + 5𝑓 3
5
−1 9
Example: 4.5.1
1 𝑑𝑥
Evaluate the integral 𝐼 = 0 1+𝑥
using
Solution:
1 𝑑𝑥 1
i. When 𝑁 = 2, given 𝐼 = 0 1+𝑥
; 𝑓 𝑥 =
1+𝑥
𝑏−𝑎 1−0 1
we have = = = and three nodes 0, 1 2 and 1.
𝑁 2 2
𝑥 0 1 1
2
𝑓 𝑥 1 2 1
3 2
Trapezoidal rule:
267
1
2
SPACE FOR HINTS 17
𝐼 = 𝑓0 + 2𝑓1 + 𝑓2 = 1+2 2 3 +1 2 =
2 2 24
= 0.70833
Simpson’s rule:
1
2
𝐼 = 𝑓0 + 4𝑓1 + 𝑓2 = 1 + 4 2 3 + 1 2 = 0.69444
3 3
𝑥 0 1 1 3 1
4 2 4
𝑓 𝑥 1 4 2 4 1
5 3 7 2
Trapezoidal rule:
𝐼= 𝑓 + 2 𝑓1 + 𝑓2 + 𝑓3 + 𝑓4
2 0
1
4
= 1+2 4 5+2 3+4 7 +1 2
2
𝐼 = 0.697024
Simpson’s rule:
𝐼= 𝑓 + 4 𝑓1 + 𝑓3 + 2𝑓2 + 𝑓4
3 0
1
4
4 4 2 1
= 1+4 + +2 +
3 5 7 3 2
1
𝐼= 8.3190 = 0.69325
12
268
iii. 8 subintervals
SPACE OF HINTS
𝑥 0 1 1 3 1 5 3 7 1
8 4 8 2 8 4 8
𝑓(𝑥) 1 8 4 8 2 8 4 8 1
9 5 11 3 13 7 15 2
Trapezoidal rule:
𝐼= 𝑓 + 2 𝑓1 + 𝑓2 + ⋯ + 𝑓7 + 𝑓8
2 0
1
8
= 1 + 2 8 9 + 4 5 + 8 11 + 2 3 + 8 13 + 4 7 + 8 15
2
+1 2
𝐼 = 0.69412
Simpson’s rule:
𝐼= 𝑓 + 4 𝑓1 + 𝑓3 + 𝑓5 + 𝑓7 + 2(𝑓2 + 𝑓4 + 𝑓6 ) + 𝑓8
3 0
1
8
8 8 8 8 4 2 4 1
= 1+4 + + + +2 + + +
3 7 11 13 15 5 3 7 2
𝐼 = 0.693155
= ln 2 − ln 0
𝐼 = 0.693147
Example: 4.5.2
269
1 𝑑𝑥
Evaluate the integral 𝐼 = 0 1+𝑥
by subdividing the interval
SPACE FOR HINTS
0,1 into two equal parts and then applying the Gauss-Legendre three
point formula
1
1
𝑓 𝑥 𝑑𝑥 = 5𝑓 − 3 5 + 8𝑓 0 + 5𝑓 3
5
−1 9
Solution:
The formula for Gauss-Legendre three-point method is,
1
1
𝑓 𝑥 𝑑𝑥 = 5𝑓 − 3 5 + 8𝑓 0 + 5𝑓 3
5
−1 9
Given
1 1 1
𝑑𝑥 2 𝑑𝑥 𝑑𝑥
𝐼= = + = 𝐼1 + 𝐼2
1+𝑥 0 1+𝑥 1 1+𝑥
0 2
𝑑𝑡
𝑑𝑥 =
4
𝑦+3
Similarly, in 𝐼2 , 𝑦 + 3 = 4𝑥 ⟹ 𝑥 =
4 𝑥 1 2 1
𝑑𝑡 𝑦 −1 1
𝑑𝑥 =
4
𝑥 0 1 2
1 1 1
𝑑𝑥 𝑑𝑡 𝑑𝑡 𝑡 −1 1
∴ 𝐼1 = = 𝑡+1
=
0 1+𝑥 −1 4 1+ −1 𝑡 + 5
4
1
∴𝑓 𝑡 =
𝑡+5
Applying Legendre formula
270
1
𝑓 − 35 = = 0.23666 SPACE OF HINTS
3
− +5
5
1
𝑓 0 = = 0.2
0+5
3 1
𝑓 5 = = 0.17317
3
+5
5
1
∴ 𝐼1 = 5 0.23666 + 8 0.2 + 5(0.17317) = 0.40546
9
Similarly,
1 1 1
𝑑𝑥 𝑑𝑡 𝑑𝑡
∴ 𝐼2 = = 𝑦+3
=
1 1+𝑥 −1 4 1+ −1 𝑦 + 7
2 4
1
∴𝑓 𝑦 =
𝑦+7
1
𝑓 − 35 = = 0.16064
3
− +7
5
1
𝑓 0 = = 0.14286
0+7
3 1
𝑓 5 = = 0.128617
3
+7
5
1
∴ 𝐼2 = 5 0.16064 + 8 0.14286 + 5(0.128617) = 0.287682
9
∴ 𝐼 = 𝐼1 + 𝐼2 = 0.40546 + 0.287682 = 0.693146
1 𝑑𝑥 1
The exact solution is, 𝐼 = 0 1+𝑥
= log 𝑒 (1 + 𝑥) 0
= ln 2 − ln 0
𝐼 = 0.693147
271
Trapezoidal rule with Romeberg Integration:
SPACE FOR HINTS
4𝑚 𝐼𝑇 𝑚 −1 𝑚 −1
2 − 𝐼𝑇
𝑚
𝐼𝑇 = , 𝑚 = 1,2, …
4𝑚 − 1
Simpson’s rule with Romberg integration:
4𝑚 +1 𝐼𝑆 𝑚 −1 𝑚 −1
2 − 𝐼𝑆
𝑚
𝐼𝑆 = , 𝑚 = 1,2, …
4𝑚 +1 − 1
Example: 4.6.1
1 𝑑𝑥
Find the approximate value of the integral 𝐼 = 0 1+𝑥
using
Solution:
1 𝑑𝑥
Given 𝐼 = 0 1+𝑥
1
Here 𝑓 𝑥 =
1+𝑥
Number of nodes = 9
∴𝑁 =9−1=8
𝑏−𝑎 1−0 1
∴= = =
𝑁 8 8
𝑥 0 1 2 3 4 5 6 7 1
8 8 8 8 8 8 8
𝑓(𝑥) 1 8 4 8 2 8 4 8 1
9 5 11 3 13 7 15 2
272
Consider number of nodes = 2
SPACE OF HINTS
𝑥 0 1
𝑓(𝑥) 1 1 2
1
2
1
𝐼𝑇 = 𝑓0 + 𝑓1 = 1 + = 0.75
2 2 2
Number of nodes = 3, = 1 2
𝑥 0 4 8 1
𝑓(𝑥) 1 8 12 1 2
1 8 1
𝐼𝑇 = 𝑓0 + 2𝑓1 + 𝑓2 = 1 + 2 + = 0.70833
2 2 12 2
𝑏−𝑎 1
Number of nodes = 5, 𝑁 = 4, = =
𝑁 4
𝑥 0 2 8 4 8 6 1
8
𝑓(𝑥) 1 8 10 8 12 8 1 2
14
𝐼𝑇 = 𝑓 + 2(𝑓1 + 𝑓2 + 𝑓3 ) + 𝑓4
2 0
1 8 8 8 1
= 1+2 + + + = 0.697024
8 10 12 14 2
𝑏−𝑎 1
Number of nodes = 9, 𝑁 = 8, = =
𝑁 8
𝐼𝑇 = 𝑓 + 2 𝑓1 + 𝑓2 + ⋯ + 𝑓7 + 𝑓8
2 0
1 8 8 8 8 8 8 8 1
= 1+2 + + + + + + +
8 9 10 11 12 13 14 15 2
𝐼𝑇 = 0.694122
Using Trapezoidal rule with Romberg integration,
273
4𝑚 𝐼𝑇 𝑚 −1 𝑚 −1
SPACE FOR HINTS 2 − 𝐼𝑇
𝑚
𝐼𝑇 = , 𝑚 = 1,2, …
4𝑚 − 1
Put 𝑚 = 1 𝑎𝑛𝑑 = 1 (Fourth order derivatives)
4𝑚 𝐼𝑇 0 1 0
2 − 𝐼𝑇
4 0.70833 − 0.75
𝐼𝑇 ′ = =
4−1 3
𝐼𝑇 ′ 1 = 0.69444
= 1 2 we get,
0 1 0 1
4𝐼𝑇 4 − 𝐼𝑇 2
′ 1 4 0.697024 − 0.70833
𝐼𝑇 = =
2 4−1 3
= 0.693254
= 1 4 we get,
0 1 0 1
4𝐼𝑇 8 − 𝐼𝑇 4
′ 1 4 0.694122 − 0.697024
𝐼𝑇 = =
4 4−1 3
= 0.693155
42 𝐼𝑇 1 1 1
2 − 𝐼𝑇 1
16 0.693254 − 0.69444
𝐼𝑇 (2) = =
42 − 1 15
= 0.693175
= 1 2 we get,
1 1 1 1
16𝐼𝑇 4 − 𝐼𝑇 2
(2) 1 16 0.693155 − 0.693254
𝐼𝑇 = =
2 15 15
274
= 0.693148
SPACE OF HINTS
Put 𝑚 = 3 𝑎𝑛𝑑 = 1 (Eigth order derivatives)
43 𝐼𝑇 2 1 2
2 − 𝐼𝑇 1
64 0.693148 − 0.693175
𝐼𝑇 (3) 1 = =
43 −1 15
= 0.693148
1 0.75
0.69444
1 0.70833 0.693175
2
0.693254 0.693148
0.697024 0.693148
1
4 0.693155
0.694122
1
8
1 𝑑𝑥 1
Exact solution is, 𝐼 = 0 1+𝑥
= log 𝑒 (1 + 𝑥) 0
= ln 2 − ln 0
𝐼 = 0.693147
𝑏−𝑎
Simpson’s rule:Number of nodes = 3 𝑁 = 2 = =1 2
𝑁
𝑥 0 1 2 1
𝑓(𝑥) 1 2 3 1 2
1
1 2
2 1
𝑓𝑑𝑥 = 𝑓0 + 4𝑓1 + 𝑓2 = 1+4 +
0 3 3 3 2
275
= 0.69444
SPACE FOR HINTS
Number of nodes = 5, 𝑁 = 4 =1 4
𝑥 0 1 4 1 2 3 1
4
𝑓(𝑥) 1 4 5 2 3 4 1 2
7
1
1 4
4 4 2 1
𝑓𝑑𝑥 = 1+4 + +2 + = 0.693254
0 3 5 7 3 2
𝑏−𝑎 1
Number of nodes = 9 𝑁 = 8, = =
𝑁 8
𝑥 0 1 2 3 4 5 6 7 1
8 8 8 8 8 8 8
𝑓(𝑥) 1 8 4 8 2 8 4 8 1
9 5 11 3 13 7 15 2
1
1 8
8 8 8 8 4 2 4 1
𝑓𝑑𝑥 = 1+4 + + + +2 + + +
0 3 9 11 13 15 5 3 7 2
= 0.693155
Using Simpson‟s rule with Romberg integration,
4𝑚 +1 𝐼𝑆 𝑚 −1 1 𝑚 −1
2 − 𝐼𝑆
𝑚
𝐼𝑆 = , 𝑚 = 1,2, …
4𝑚 +1 − 1
Put 𝑚 = 1, = 1 2 we get,
0 1 0 1
42 𝐼𝑆 4 − 𝐼𝑆 2
(1) 1
𝐼𝑆 =
2 4−1
276
16 0.693254 − 0.69444
= = 0.0.693175 SPACE OF HINTS
15
= 1 4 we get,
0 1 0 1
42 𝐼𝑆 8 − 𝐼𝑆 4
(1) 1
𝐼𝑆 =
4 42 − 1
16 0.693155 − 0.693254
=
15
= 0.693148
Put 𝑚 = 2, = 1 2 we get,
1 1 1 1
43 𝐼𝑆 4 − 𝐼𝑆 2
(2) 1
𝐼𝑆 =
2 43 − 1
64 0.693148 − 0.693175
=
63
= 0.693148
0.693254 0.693148
1
4 0.693148
0.693155
1
8
277
2 ′′
𝑅1 = 𝑓 𝜖 , 0<𝜖<1
SPACE FOR HINTS 12
1
Given 𝑓 𝑥 = , 0≤𝑥≤1
1+𝑥
−1 2
𝑓′ 𝑥 = , 𝑓 ′′ 𝑥 =
1+𝑥 2 1+𝑥 3
Put 𝑥 = 0, 𝑓 ′′ 𝜖 = 2
𝑥 = 1, 𝑓 ′′ 1 = 1 4
∴ 1 4 ≤ 𝑓 ′′ 𝜖 ≤ 2
1 2 2 ′′
2
4 12 ≤ 12 𝑓 𝜖 ≤ 2 12
2 2 ′′ 2
≤ 𝑓 𝜖 ≤
48 12 6
Given error accuracy is 10−6
2
∴ ≤ 10−6
48
2 ≤ 10−6 . (48)
1
≤ 0.000048 2
≅ 0.007
0 ≤ 𝑥 ≤ 1 ⟹ 𝑥 = 0 𝑓 𝑖𝑣 0 = 24
𝑥 = 1 𝑓 𝑖𝑣 1 = 3 4
4 𝑖𝑣
𝑅2 = 𝑓 𝜂
180
∴ 3 4 ≤ 𝑓 𝑖𝑣 𝜂 ≤ 24
278
4 3 4 𝑖𝑣
4
4 ≤ 𝑓 𝜂 ≤ 24 SPACE OF HINTS
180 180 180
4 4 𝑖𝑣
24
≤ 𝑓 𝜂 ≤
240 180 15
4
∴ ≤ 10−6
240
4 ≤ 10−6 . (240)
1
≤ 10−6 × 240 4
≅ 0.1245
Unit - 5
Ordinary differential equations: Initial value problems
5.1: Introduction
An ordinary differential equation is a relation between a function,
its derivatives, and the variable upon which they depend. The most
general form of an ordinary differential equation is given by
𝜑 𝑡, 𝑦, 𝑦 ′ , 𝑦 ′′ , … , 𝑦 𝑚
=0 (1)
279
where 𝑚 represents the highest order derivative, and 𝑦 and its
SPACE FOR HINTS derivatives are functions of 𝑡. The order of the differential equation is
the order of its highest derivative and its degree is the degree of the
derivate of the highest order after the equation has been rationalized in
derivatives.
𝑦 (𝑚 ) = 𝐹(𝑡, 𝑦, 𝑦 ′ , 𝑦 ′′ , … , 𝑦 𝑚 −1
(3)
𝑤 𝑡, 𝑦, 𝑐1 , 𝑐2 , … , 𝑐𝑚 = 0 (4)
𝑦 = 𝑤 𝑡, 𝑐1 , 𝑐2 , … , 𝑐𝑚 (5)
280
𝑣
𝑦 𝑡0 = 𝜂𝑣 , 𝑣 = 0, 1, 2, … , 𝑚 − 1 (6) SPACE OF HINTS
Example: 5.1.1
Convert the following second order initial value problem into a
system of first order initial problems 𝑡𝑦 ′′ − 𝑦 ′ + 4𝑡 3 𝑦 = 0
𝑦 1 = 1, 𝑦 ′ 1 = 2.
Solution:
Given 𝑡𝑦 ′′ − 𝑦 ′ + 4𝑡 3 𝑦 = 0
⟹ 𝑡𝑦 ′′ = 𝑦 ′ − 4𝑡 3 𝑦
1 ′
∴ 𝑦 ′′ = 𝑦 − 4𝑡 3 𝑦 (1)
𝑡
Let 𝑣1 = 𝑦 𝑡 , 𝑣2 = 𝑦 ′ (𝑡)
Now 𝑣1 ′ = 𝑦 ′ 𝑡 , 𝑣2 ′ = 𝑦 ′′ (𝑡)
𝑖𝑒) 𝑣1 ′ = 𝑦 ′ 𝑡 = 𝑣2
281
∴ 𝑣1 = 𝑦 𝑡 = 𝑦 1 = 1 (𝑡 = 1)
SPACE FOR HINTS
Similarly, 𝑣1 ′ = 𝑦 ′ 𝑡 = 𝑦 ′ 1 = 2 (𝑡 = 1)
Hence the second order derivative can be changed into the first order
initial value problem, where 𝑣 = 𝑣1 , 𝑣2 𝑇 , 𝑓 = 𝑓1 , 𝑓2 𝑇 ,
𝑇
1
𝑑 = 𝑑1 , 𝑑2 𝑎𝑛𝑑 𝑓1 = 𝑣2 𝑎𝑛𝑑 𝑓2 = 𝑣2 − 4𝑡 3 𝑣1
𝑡
where 𝑑1 = 1, 𝑑2 = 2.
Example: 5.1.2
Convert the following system of two simultaneous third-order equations
into a system of six simultaneous first-order equations.
𝑦1 ′′′ = 𝑓1 𝑡, 𝑦1 , 𝑦2 , 𝑦1 ′ , 𝑦2 ′ , 𝑦1 ′′ , 𝑦2 ′′
𝑦2 ′′′ = 𝑓2 𝑡, 𝑦1 , 𝑦2 , 𝑦1 ′ , 𝑦2 ′ , 𝑦1 ′′ , 𝑦2 ′′
𝑦1 𝑡0 = 𝑎0 , 𝑦1 ′ 𝑡0 = 𝑎1 , 𝑦 ′′ 𝑡0 = 𝑎2 ,
𝑦2 = 𝑏0 , 𝑦2 ′ 𝑡0 = 𝑏1 , 𝑦 ′′ 𝑡0 = 𝑏2
Solution:
𝑦1 ′′′ = 𝑓1 𝑡, 𝑦1 , 𝑦2 , 𝑦1 ′ , 𝑦2 ′ , 𝑦1 ′′ , 𝑦2 ′′
(1)
𝑦2 ′′′ = 𝑓2 𝑡, 𝑦1 , 𝑦2 , 𝑦1 ′ , 𝑦2 ′ , 𝑦1 ′′ , 𝑦2 ′′
Let
𝑢1 𝑡 = 𝑦1 𝑡 , 𝑢3 𝑡 = 𝑦1 ′ 𝑡 , 𝑢5 𝑡 = 𝑦1 ′′ 𝑡
(2)
𝑢2 𝑡 = 𝑦2 𝑡 , 𝑢4 𝑡 = 𝑦2 ′ 𝑡 , 𝑢6 𝑡 = 𝑦2 ′′ 𝑡
282
𝑢1 ′ 𝑡 = 𝑦1 ′ 𝑡 , 𝑢3 ′ 𝑡 = 𝑦1 ′′ 𝑡 , 𝑢5 ′ 𝑡 = 𝑦1 ′′′ 𝑡
⟹ ′ (3) SPACE OF HINTS
𝑢2 𝑡 = 𝑦2 ′ 𝑡 , 𝑢4 ′ 𝑡 = 𝑦2 ′′ 𝑡 , 𝑢6 ′ 𝑡 = 𝑦2 ′′′ 𝑡
∴ 𝑢1 ′ 𝑡 = 𝑢3 𝑡 𝑢3 ′ 𝑡 = 𝑢5 𝑡
𝑢2 ′ 𝑡 = 𝑢4 𝑡 𝑢4 ′ 𝑡 = 𝑢6 𝑡
Given 𝑦1 𝑡0 = 𝑎0 , 𝑦2 (𝑡0 ) = 𝑏0
𝑦1 ′ 𝑡0 = 𝑎1 , 𝑦2 ′ 𝑡0 = 𝑏1
𝑦 ′′ 𝑡0 = 𝑎2 , 𝑦 ′′ 𝑡0 = 𝑏2
2 ⟹ 𝑢1 𝑡0 = 𝑎0 , 𝑢2 𝑡0 = 𝑎1 , 𝑢3 𝑡0 = 𝑎2 , 𝑢4 𝑡0 = 𝑏0 ,
𝑢5 𝑡0 = 𝑏1 , 𝑢6 𝑡0 = 𝑏2
Similarly, 𝑢′ 𝑡0 = 𝑦1 ′ 𝑡0 = 𝑓(𝑡, 𝑢) 𝑢 𝑡0 = 𝑢0
𝑦1 ′′′ = 𝑢5 ′ 𝑡 = 𝑓1 𝑡, 𝑢1 , 𝑢2 , 𝑢3 , 𝑢4 , 𝑢5 , 𝑢6 , 𝑢5 𝑡0 = 𝑎2
𝑦2 ′′′ = 𝑢6 ′ 𝑡 = 𝑓2 𝑡, 𝑢1 , 𝑢2 , 𝑢3 , 𝑢4 , 𝑢5 , 𝑢6 , 𝑢6 𝑡0 = 𝑏2
Theorem: 5.1.1
We assume that 𝑓 𝑡, 𝑢 satisfies the following conditions:
i. 𝑓 𝑡, 𝑢 is a real function.
ii. 𝑓 𝑡, 𝑢 is defined and continuous in the strip 𝑡 ∈ 𝑡0 , 𝑏 ,
𝑢 ∈ −∞, ∞
iii. There exists a constant 𝐿 such that for any 𝑡 ∈ 𝑡0 , 𝑏 and any 𝑣1
and 𝑣2 𝑓 𝑡, 𝑣1 − 𝑓 𝑡, 𝑣2 ≤ 𝐿 𝑣1 − 𝑣2 where 𝐿 is called the
Lipschitz constant.
𝑑𝑢
Then for any 𝑢0 the initial value problem = 𝑓 𝑡, 𝑢 and
𝑑𝑡
283
A first order linear system with constant coefficients is of the form
SPACE FOR HINTS 𝑢′ = 𝐴𝑢 + 𝑏 𝑡 (1)
𝑢 𝑡 = 𝑘 𝑖 𝑒 𝜆 𝑖 𝑡 𝑢𝑖 + 𝜙 𝑡 (2)
𝑖=1
𝑢′ = 𝑈𝑧 ′ = 𝐴 𝑈 𝑧 + 𝑏 𝑡 (3)
𝑈 −1 𝑈 𝑧 ′ = 𝑈 −1 𝐴𝑈𝑧 + 𝑈 −1 𝑏(𝑡)
or 𝑧 ′ = 𝐷𝑧 + 𝑡 (4)
𝑧𝑖 𝑡 = 𝑒 𝜆 𝑖 𝑡 𝑒 −𝜆 𝑖 𝑡 𝑖 𝑡 𝑑𝑡 + 𝑐𝑖 , 𝑖 = 1, 2, … , 𝑚.
284
The solutions to the system 𝑢′ = 𝐴𝑢 + 𝑏 𝑡 with 𝑏 𝑡 = 0 are said to be
SPACE OF HINTS
stable.
Example: 5.1.3
𝑑𝑢
Find the solution of the system of equations = 𝐴𝑢 where
𝑑𝑡
𝑢 = 𝑢1 𝑢2 𝑇 and 𝐴 = −3 4
.
−2 3
Solution:
The solution to the system of equations can be obtained by finding
−3 4
the eigenvalues and eigenvectors of the given matrix 𝐴 = .
−2 3
The characteristic equation of 𝐴 is 𝐴 − 𝜆𝐼 = 0.
−3 − 𝜆 4
=0
−2 3−𝜆
⟹ −3 − 𝜆 3 − 𝜆 + 8 = 0
⟹ −9 + 3𝜆 − 3𝜆 + 𝜆2 + 8 = 0
⟹ 𝜆2 − 1 = 0 ⟹ 𝜆 = ±1
−2𝑢1 + 2𝑢2 = 0
⟹ 𝑢1 = 𝑢2
𝑢2 = 1 ⟹ 𝑢1 = 1
𝑢1 1
∴ The eigenvector corresponding the eigenvalues 𝜆 = 1 is 𝑢 =
2 1
1
𝑣 (1) =
1
285
−2 4 𝑢1
For 𝜆 = −1, 𝑢2 = 0
−2 4
SPACE FOR HINTS
−2𝑢1 + 4𝑢2 = 0
−2𝑢1 + 4𝑢2 = 0
⟹ 𝑢1 = 2𝑢2
𝑢2 = 1 ⟹ 𝑢1 = 2
𝑢1 2
∴ The eigen vector corresponding the eigenvalues 𝜆 = −1 is 𝑢 =
2 1
2
𝑣 (2) =
1
Hence the solution to the system of equation is
𝑢 𝑡 = 𝑐1 𝑒 𝜆 1 𝑡 𝑉 1 𝑡 + 𝑐2 𝑒 𝜆 2 𝑡 𝑉 2 (𝑡)
1 2
= 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −𝑡
1 1
𝑐1 𝑒 𝑡 + 2𝑐2 𝑒 −𝑡
𝑢 𝑡 =
𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −𝑡
𝑢1 𝑡 = 𝑐1 𝑒 𝑡 + 2𝑐2 𝑒 −𝑡 , 𝑢2 (𝑡) = 𝑐1 𝑒 𝑡 + 𝑐2 𝑒 −𝑡
Example: 5.1.4
Find the solution of the initial value problem
𝑑𝑢 𝑇 −2 1 𝑢1
= 𝐴𝑢, 𝑢 0 = 1, 0 𝑤𝑒𝑟𝑒 𝐴 = 𝑎𝑛𝑑 𝑢 = 𝑢 .Is
𝑑𝑡 1 −20 2
Solution:
The solution to the system of linear equation can be obtained by finding
the eigenvalues and eigenvectors of the given matrix 𝐴.
286
−2 − 𝜆 1
=0 SPACE OF HINTS
1 −20 − 𝜆
⟹ −2 − 𝜆 −20 − 𝜆 − 1 = 0
⟹ 40 + 2𝜆 + 20𝜆 + 𝜆2 − 1 = 0
⟹ 𝜆2 + 22𝜆 + 39 = 0
−22 ± (22)2 − 4 × 1 × 39
𝜆= = −11 ± 82
2
∴ The eigen values are 𝜆1 = −11 + 82 , 𝜆2 = −11 − 82.
−2 + 11 − 82 1 𝑢1
For 𝜆1 = −11 + 82 , 𝑢 =0
1 −20 + 11 − 82 2
9 − 82 𝑢1 + 𝑢2 = 0
𝑢1 − 9 − 82 𝑢2 = 0
⟹ 9 − 82 𝑢1 = −𝑢2 ⟹ 82 − 9 𝑢1 = 𝑢2
Put 𝑢1 = 1 ⟹ 𝑢2 = 82 − 9
−2 + 11 + 82 1 𝑢1
For 𝜆 = −11 − 82 , =0
1 −20 + 11 + 82 𝑢2
9 + 82 𝑢1 + 𝑢2 = 0
𝑢1 + −9 + 82 𝑢2 = 0
⟹ 𝑢1 = − −9 + 82 𝑢2
Put 𝑢2 = 1 ⟹ 𝑢1 = 9 − 82
287
The general solution to the given system of equation is given by
SPACE FOR HINTS
𝑢 𝑡 = 𝑐1 𝑒 𝜆 1 𝑡 𝑣 1 𝑡 + 𝑐2 𝑒 𝜆 2 𝑡 𝑣 2 (𝑡)
1
= 𝑐1 𝑒 (−11+ 82)𝑡
82 − 9
+ 𝑐2 𝑒 (−11− 82)𝑡 9 − 82
1
𝑐1 𝑒 (−11+ 82)𝑡
+ (9 − 82)𝑐2 𝑒 (−11− 82)𝑡
𝑢 𝑡 =
( 82 − 9)𝑐1 𝑒 (−11+ 82)𝑡
+ 𝑐2 𝑒 (−11− 82)𝑡
𝑐1 + (9 − 82)𝑐2
𝑢 0 =
( 82 − 9)𝑐1 + 𝑐2
1 𝑐 + (9 − 82)𝑐2
𝑖𝑒) = 1
0 ( 82 − 9)𝑐1 + 𝑐2
𝑐1 + 9 − 82 𝑐2 = 1 (1)
82 − 9 𝑐1 + 𝑐2 = 0 (2)
1 ⟹ 𝑐1 = 1 − 9 − 82 𝑐2
(2) ⟹ (1 − 9 − 82 𝑐2 ) 82 − 9 + 𝑐2 = 0
2
⟹ 82 − 9 + 𝑐2 82 − 9 =0
2
⟹ 𝑐2 82 − 9 + 1 = 9 − 82
9 − 82
𝑐2 = 2 = −0.05522
82 − 9 +1
1 ⟹ 𝑐1 = 1 − 9 − 82 −0.05522 = 0.99694
288
1
𝑢1 𝑡 = 0.99694𝑒 (−11+ 82)𝑡
SPACE OF HINTS
82 − 9
Example: 5.1.5
Obtain a general solution of the system of equations
𝑑𝑢1 𝑑𝑢2
= −5𝑢1 + 2𝑢2 + 𝑡, = 2𝑢1 − 2𝑢2 + 𝑒 −𝑡
𝑑𝑡 𝑑𝑡
Solution:
𝑑𝑢
The given system of equation can be written as, = 𝐴𝑢 + 𝑏
𝑑𝑡
where
−5 2 𝑢1 𝑡
𝐴= , 𝑢= 𝑢 , 𝑏= .
2 −2 2 𝑒 −𝑡
The solution to the system of linear equation can be obtained by finding
the eigenvalues and eigenvectors of the given matrix 𝐴.
⟹ 10 + 7𝜆 + 6 = 0
⟹ 𝜆+1 𝜆+6 =0
⟹ 𝜆 = −1, −6
To find the eigenvectors,
−4 2 𝑢1
For 𝜆 = −1, =0
2 −1 𝑢2
−4𝑢1 + 2𝑢2 = 0, 2𝑢1 − 𝑢2 = 0
⟹ −2𝑢1 + 𝑢2 = 0, 2𝑢1 = 𝑢2
2𝑢1 = 𝑢2
Put 𝑢1 = 1, 𝑢2 = 2
289
𝑢1 1
∴ 𝑢 = = 𝑣 (1)
SPACE FOR HINTS 2 2
1 2 𝑢1
For 𝜆 = −6, =0
2 4 𝑢2
𝑢1 + 2𝑢2 = 0, 2𝑢1 + 4𝑢2 = 0
𝑢1 + 2𝑢2 = 0
𝑢1 = 2𝑢2
Put 𝑢2 = −1, 𝑢1 = 2
𝑢1 2
∴ 𝑢 = = 𝑣 (2)
2 −1
The formula for this method is, 𝑢′ = 𝑢𝑧 ′ 𝑎𝑛𝑑 𝑢𝑧 ′ = 𝐴 ∪ 𝑧 + 𝑏(𝑡)
𝑧 ′ = 𝐷𝑧 + (𝑡)
To find 𝒖:
𝑡 = 𝑈 −1 𝑏(𝑡)
1 2 −1 𝑡 1 2𝑡 − 𝑒 −𝑡
= =
5 1 2 𝑒 −𝑡 5 𝑡 + 2𝑒 −𝑡
To find 𝑫:
1 2 −1 −5 2 2 1
𝐷 = 𝑈 −1 𝐴𝑈 =
5 1 2 2 −2 −1 2
−6 0
𝐷=
0 −1
290
∴ 𝑧 −1 = 𝐷𝑧 + (𝑡)
SPACE OF HINTS
−6 0 𝑧1 1 2𝑡 − 𝑒 −𝑡
= +
0 −1 𝑧2 5 𝑡 + 2𝑒 −𝑡
𝑧1 ′ = −6𝑧1 + 1 5 2𝑡 − 𝑒 −𝑡
𝑧2 ′ = −𝑧2 + 1 5 𝑡 + 2𝑒 −𝑡
𝑧𝑖 (𝑡) = 𝑒 𝜆 𝑖 𝑡 𝑒 𝜆 𝑖 𝑡 𝑖 (𝑡)𝑑𝑡 + 𝑐𝑖
𝑧1 (𝑡) = 𝑒 𝜆 1 𝑡 𝑒 𝜆 1 𝑡 1 (𝑡)𝑑𝑡 + 𝑐1
𝑧1 𝑡 = 𝑐1 𝑒 𝜆 1 𝑡 + 𝑒 𝜆 1 𝑡 𝑒 −𝜆 1 𝑡 1 (𝑡)𝑑𝑡
𝑧1 𝑡 = 𝑒 𝜆 1 𝑡 𝑒 𝜆 1 𝑡 2 (𝑡)𝑑𝑡 + 𝑐1
𝑒 −6𝑡
= 𝑒 −6𝑡 (−2𝑡 + 𝑒 −𝑡 )𝑑𝑡 + 𝑐1
5
𝑒 −6𝑡 𝑢 = −2𝑡 ; 𝑑𝑣 = 𝑒 6𝑡 𝑑𝑡
= 𝑐1 𝑒 −6𝑡 + −2𝑡𝑒 −6𝑡 + 𝑒 −5𝑡 𝑑𝑡 𝑒 6𝑡
5 𝑑𝑢 = −2𝑑𝑡; 𝑣 =
6
𝑒 −6𝑡 𝑒 6𝑡
= 𝑐1 𝑒 −6𝑡 + −2𝑡𝑒 −6𝑡 − −2𝑑𝑡 + 𝑒 5𝑡 𝑑𝑡
5 6
−6𝑡
𝑒 −6𝑡 −𝑡𝑒 6𝑡 1 𝑒 6𝑡 𝑒 5𝑡
= 𝑐1 𝑒 + + . +
5 3 3 6 5
−6𝑡
−𝑡 1 𝑒 −𝑡
𝑧1 𝑡 = 𝑐1 𝑒 + + +
5 90 25
−6𝑡
18𝑒 −𝑡 − 30𝑡 + 5
= 𝑐1 𝑒 +
450
Similarly,
291
𝑧2 𝑡 = 𝑐2 𝑒 −𝑡 + 𝑒 −𝑡 𝑒 𝑡 1 5 𝑡 + 2𝑒 −𝑡 𝑑𝑡 𝜆2 = −1
SPACE FOR HINTS
𝑒 −𝑡 𝑢 = 𝑡; 𝑑𝑣 = 𝑒 𝑡 𝑑𝑡
= 𝑐2 𝑒 −𝑡 + 𝑡𝑒 𝑡 𝑑𝑡 + 2𝑑𝑡
5 𝑑𝑢 = 𝑑𝑡 ; 𝑣 = 𝑒𝑡
𝑒 −𝑡
= 𝑐2 𝑒 −𝑡 + 𝑡𝑒 𝑡 − 𝑒 𝑡 𝑑𝑡 + 2𝑑𝑡
5
1
𝑧2 𝑡 = 𝑐2 𝑒 −𝑡 + 𝑡 − 1 + 2𝑡𝑒 𝑡
5
The general solution is 𝑢 = 𝑈𝑍
𝑢1 2 1 𝑧1
𝑖𝑒) 𝑢2 = −1 2 𝑧2
𝑢1 2𝑧1 + 𝑧2
𝑢2 =
−𝑧1 + 2𝑧2
𝑢1 = 2𝑧1 + 𝑧2
−6𝑡
18𝑒 −𝑡 − 30𝑡 + 5 1
= 2 𝑐1 𝑒 + + 𝑐2 𝑒 −𝑡 + 𝑡 − 1 + 2𝑡𝑒 𝑡 −
450 5
1
𝑢1 = 2𝑐1 𝑒 −6𝑡 + 𝑐2 𝑒 −𝑡 + 180𝑡𝑒 −𝑡 − 36𝑒 −𝑡 + 150𝑡 − 100
450
𝑢2 = 2𝑧2 − 𝑧1
−𝑡
1 18𝑒 −𝑡 − 30𝑡 + 5
= 2 𝑐2 𝑒 + 𝑡 − 1 + 2𝑡𝑒 𝑡 − 𝑐1 𝑒 −6𝑡
+
5 450
1
𝑢2 = 2𝑐2 𝑒 −𝑡 − 𝑐1 𝑒 −6𝑡 + 360𝑡𝑒 −𝑡 + 18𝑒 −𝑡 + 150𝑡 − 175
450
5.2 Difference Equations
292
difference equation is the number of intervals separating the largest and
SPACE OF HINTS
the smallest argument of the dependent variable.
𝑎0 𝑢𝑛 +𝑘 + 𝑎1 𝑢𝑛+𝑘−1 + ⋯ , 𝑎𝑘 𝑢𝑛 = 0 (3)
𝑢𝑛 = 𝑢𝑛 (𝐻) + 𝑢𝑛 𝑝
(4)
𝐴 𝑎0 𝜉 𝑘 + 𝑎1 𝜉 𝑘−1 + ⋯ + 𝑎0 𝜉 𝑛 = 0
or 𝑎0 𝜉 𝑘 + 𝑎1 𝜉 𝑘−1 + ⋯ + 𝑎0 = 0 (5)
Example: 5.2.1
Find the general solution of the difference equation
i. ∆2 𝑢𝑛 − 3∆𝑢𝑛 + 2𝑢𝑛 = 0
293
ii. ∆2 𝑢𝑛 + ∆𝑢𝑛 + 1 4 𝑢𝑛 = 0
SPACE FOR HINTS
iv. ∆2 𝑢𝑛+1 − 1 3 ∆2 𝑢𝑛 = 0
Solution:
We know that, the forward difference table for 3 values.
∆ ∆2
𝑢𝑛
𝑢𝑛+1 − 𝑢𝑛
𝑢𝑛+2 − 𝑢𝑛 +1
𝑢𝑛+22
𝐴𝜉 𝑛 𝜉 2 − 5𝜉 + 6 = 0
⟹ 𝜉 2 − 5𝜉 + 6 = 0
𝜉 = 2, 3
∴ Roots are 2 and 3. Here the roots are real and distinct.
𝑢𝑛 = 𝑐1 2𝑛 + 𝑐2 3𝑛
294
Since 𝑢𝑛 → ∞ 𝑎𝑠 𝑛 → ∞,
SPACE OF HINTS
Hence the solution is unbounded.
Substituting 𝑢𝑛 = 𝐴𝜉 , we get,
(2) ⟹ 𝐴𝜉 𝑛+2 − 𝐴𝜉 𝑛 +1 + 1 4 𝐴𝜉 𝑛 = 0
1
𝐴𝜉 𝑛 𝜉 2 − 𝜉 + =0
4
1
⟹ 𝜉2 − 𝜉 + =0
4
1 1
𝜉= ,
2 2
1 1
Roots are and . Here the roots are real and equal.
2 2
Substituting 𝑢𝑛 = 𝐴𝜉 , we get,
𝐴𝜉 𝑛 𝜉 2 − 4𝜉 + 5 = 0
⟹ 𝜉 2 − 4𝜉 + 5 = 0
295
4 ± 16 − 20
𝜉= =2±𝑖
SPACE FOR HINTS 2
Here the roots are imaginary
∴ 𝑟 = 4+1= 5
𝛽
tan 𝜃 = 𝛼
𝜃 = tan−1 1 2 = 0.4636
𝑛 𝑛
∴ 𝑢𝑛 = 5 𝑒 𝑖𝑛𝜃 = 5 (𝑐1 cos 𝑛𝜃 + 𝑐2 cos 𝑛 𝜃
𝑛
= 5 cos n 0.4636 + 𝑖 sin 𝑛 0.4636
as 𝑛 → ∞ , 𝑢𝑛 → ∞
∆2 𝑢𝑛 = 𝑢𝑛+2 − 2𝑢𝑛+1 + 𝑢𝑛
𝑠𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦
∆2 𝑢𝑛+1 = 𝑢𝑛+3 − 2𝑢𝑛+2 + 𝑢𝑛+1
1 2 1
𝑢𝑛+3 − 𝑢𝑛+2 2 + + 𝑢𝑛+1 1 + − 𝑢𝑛 = 0
3 3 3
Substituting 𝑢𝑛 = 𝐴𝜉 , (∴ 𝐴 ≠ 0)
296
⟹ 𝐴𝜉 𝑛 3𝜉 3 − 7𝜉 2 + 5𝜉 − 1 = 0
SPACE OF HINTS
3 2
⟹ 3𝜉 − 7𝜉 + 5𝜉 − 1 = 0
⟹ 𝜉 =1, 3𝜉 2 − 4𝜉 + 1 = 0
𝜉 = 1, 1, 1 3
Here one root is distinct and also two roots are real and equal.
𝑛
𝑛
𝑢𝑛 = 𝑐1 + 𝑛𝑐2 (1) + 𝑐3 1 as 𝑛 → ∞ , 𝑢𝑛 → ∞
3
Example: 5.2.2
Solution:
Substituting the forward difference formula in the given equation,
we have
∆2 𝑦𝑗 = 𝑦𝑗 +2 − 2𝑦𝑗 +1 + 𝑦𝑗
∆𝑦𝑗 = 𝑦𝑗 +1 − 𝑦𝑗
𝑦𝑗 +2 − 2𝑦𝑗 +1 + 𝑦𝑗 + 3 𝑦𝑗 +1 − 𝑦𝑗 − 4𝑦𝑗 = 𝑗 2
⟹ 𝑦𝑗 +2 + 𝑦𝑗 +1 − 6𝑦𝑗 = 𝑗 2 (1)
𝑦𝑗 = 𝑦 (𝐻) + 𝑦 (𝑃)
Substitute 𝑦𝑗 = 𝐴𝜉𝑗 ,
297
∴ The auxiliary equation is 𝑦𝑗 +2 + 𝑦𝑗 +1 − 6𝑦𝑗 = 0
SPACE FOR HINTS
𝐴𝜉𝑗 +2 + 𝐴𝜉𝑗 +1 − 6𝐴𝜉𝑗 = 0
⟹ 𝐴𝜉𝑗 𝜉 2 + 𝜉1 − 6 = 0
⟹ 𝜉 2 + 𝜉1 − 6 = 0
𝜉 = 2, −3
⟹ −4𝑎𝑗 2 + 𝑗 6𝑎 − 4𝑏 + 5𝑎 + 3𝑏 − 4𝑐 = 𝑗 2
−4𝑎 = 1 ⟹ 𝑎 = − 1 4
5𝑎 + 3𝑏 − 4𝑐 = 0 ⟹ 5 −1 4 + 3 −3 8 − 4𝑐 = 0
1 −5 9 −19
⟹𝑐= − ⟹𝑐=
4 4 8 32
𝑝
−1 2 −3 −19
∴ 𝑦 = 𝑎𝑗 2 + 𝑏𝑗 + 𝑐 ⟹ 𝑦 𝑝
= 𝑗 + 𝑗+ .
4 8 32
Hence the general solution becomes, 𝑦𝑗 = 𝑦 (𝐻) + 𝑦 (𝑃)
298
𝑗 𝑗
−1 2 −3 −19
𝑦𝑗 = 𝑐1 −3 + 𝑐2 2 + 𝑗 + 𝑗+ (2) SPACE OF HINTS
4 8 32
Given the initial conditions are 𝑦0 = 0, 𝑦2 = 2
Put 𝑗 = 0 𝑖𝑛 2
−19
⟹ 𝑦0 = 𝑐1 + 𝑐2 + = 0 ⟹ 𝑐1 + 𝑐2
32
−19
= (3)
32
𝑗 = 2 𝑖𝑛 2
2 2
−1 2 −3 −19
⟹ 𝑦2 = 𝑐1 −3 + 𝑐2 2 + 2 + .2 +
4 8 32
75 139
2 = 9𝑐1 + 4𝑐2 − ⟹ 9𝑐1 + 4𝑐2 = (4)
32 32
Solving (3) & (4), we get
76
3 × 4 ⟹ 𝑐1 + 𝑐2 =
32
139
4 ⟹ 9𝑐1 + 4𝑐2 =
32
−63 −63
−5𝑐1 = ⟹ 𝑐1 =
32 160
−63 76 32
3 ⟹ + 𝑐2 = ⟹ 𝑐2 =
160 32 160
𝑗 𝑗
−1 2 −3 −19
∴ 𝑦𝑗 = 𝑐1 −3 + 𝑐2 2 + 𝑗 + 𝑗+
4 8 32
−63 𝑗
32 𝑗
−1 2 −3 −19
= −3 + 2 + 𝑗 + 𝑗+
160 160 4 8 32
1 𝑗 𝑗
𝑦𝑗 = 63 −3 + 32 2 − 40𝑗 2 − 60𝑗 − 95 .
160
Example: 5.2.3
Find the range for 𝛼, so that the roots of the characteristic equation
of the difference equations
i. 1 − 5𝛼 𝑦𝑛 +2 − 1 + 8𝛼 𝑦𝑛 +1 + 𝛼𝑦𝑛 = 0
299
ii. 1 − 9𝛼 𝑦𝑛 +3 − 1 + 19𝛼 𝑦𝑛 +2 + 5𝛼𝑦𝑛 +1 − 𝛼𝑦𝑛 = 0
SPACE FOR HINTS Are less than one in magnitude.
Solution:
i. The characteristic equation of the difference equation isobtain by
putting 𝑦𝑛 = 𝐴𝜉
𝐴𝜉 𝑛 1 − 5𝛼 𝐴𝜉 2 − 1 + 8𝛼 𝜉1 + 𝛼 = 0
⟹ 1 − 5𝛼 𝜉 𝑛 +2 − 1 + 8𝛼 𝜉1 + 𝛼 = 0 (1)
2
1+𝑧 1+𝑧
1 − 5𝛼 − 1 + 8𝛼 +𝛼 =0
1−𝑧 1−𝑧
2 2
1 − 5𝛼 𝑧 + 1 − 1 + 8𝛼 1 + 𝑧 1 − 𝑧 + 𝛼 1 − 𝑧 =0
1 − 5𝛼 (1 + 𝑧 2 + 2𝑧) − 1 + 8𝛼 1 − 𝑧 2 + 𝛼 1 + 𝑧 2 − 2𝑧 = 0
−2𝛼𝑧 = 0
𝑧 2 2 + 4𝛼 + 𝑧 2 − 12𝛼 − 12𝛼 = 0
The second and third inequalities are satisfied for all 𝛼 < 0.
⟹ 𝛼 = −1 2 ∴ ∀ 𝛼 = −1 2 , 0
For 𝛼 = 0, 1 ⟹ 𝜉 2 − 𝜉 = 0
𝜉 𝜉 − 1 = 0 ⟹ 𝜉 = 0, 1
300
ii. The characteristic equation of the difference equation is obtained
SPACE OF HINTS
by putting 𝑦𝑛 = 𝐴𝜉
⟹ 𝐴𝜉 𝑛 1 − 9𝛼 𝜉 3 − 1 + 19𝛼 𝜉 2 + 5𝛼𝜉 − 𝛼 = 0
3 2
1+𝑧 1+𝑧 1+𝑧
1 − 9𝛼 − 1 + 19𝛼 + 5𝛼 −𝛼 =0
1−𝑧 1−𝑧 1−𝑧
3 2
⟹ 1 − 9𝛼 1 + 𝑧 − 1 + 19𝛼 1 + 𝑧 1−𝑧
2 3
+ 5𝛼 1 + 𝑧 1 − 𝑧 −𝛼 1−𝑧 =0
⟹ 1 − 9𝛼 1 + 𝑧 3 + 3𝑧 2 + 3𝑧 − 1 + 19𝛼 1 + 𝑧 2 + 2𝑧 1 − 𝑧
+ 5𝛼 1 + 𝑧 (1 + 𝑧 2 − 2𝑧) − 𝛼(1 − 𝑧 3 + 3𝑧 2 − 3𝑧) = 0
𝑎3 = −24𝛼 > 0
= 8 1 − 4𝛼 1 − 24𝛼 + 48 1 + 8𝛼 𝛼
From 𝑎0 , 2 + 16𝛼 = 0 ⟹ 𝛼 = −1 8
∴ 𝛼 lies between −1 8 , 0 .
301
Euler Method
SPACE FOR HINTS
𝑢𝑗 +1 = 𝑢𝑗 + 𝑓𝑗 , 𝑗 = 0,1, … , 𝑁 − 1 𝑤𝑒𝑟𝑒 𝑓𝑗 = 𝑓 𝑡𝑗 , 𝑢𝑗
2
The truncation error formula is 𝑇 ≤ 𝑀2 where 𝑀2 = max 𝑡 0 ,𝑏 𝑢′′ 𝜉
2
and
𝑇 = max 𝑇𝑗 +1
𝑡 0 ,𝑏
Example: 5.3.1
Show that in Euler method the bound of the truncation error,
when applied to the test equation 𝑢′ = 𝜆𝑢 , 𝑢 𝑎 = 𝐵 , 𝜆 > 0 can be
written as,
𝑀
𝑢 𝑡𝑗 − 𝑢(𝑡𝑗 , 𝑢) ≤ exp 𝜆 𝑡𝑖 − 𝑎 −1
2𝜆
where 𝑀 = max 𝑢′′ (𝑡) . Generalize the result when applied to the
problem 𝑢′ = 𝑓(𝑡, 𝑢) , 𝑢 𝑎 = 𝐵 .
Solution:
𝑀
To prove: 𝑢 𝑡𝑗 − 𝑢(𝑡𝑗 , 𝑢) ≤ exp 𝜆 𝑡𝑖 − 𝑎 −1
2𝜆
Given 𝑢′ = 𝜆𝑢 , 𝑢 𝑎 = 𝐵 , 𝜆 > 0
𝑢𝑗 +1 = 𝑢𝑗 + 𝜆𝑢𝑗
𝑢𝑗 +1
= 𝑢𝑗 1
+ 𝜆 (1)
𝑢 𝑡𝑗 +1 = 𝐸 𝜆 𝑢 𝑡𝑗 + 𝑇𝑗 +1
𝑢 𝑡𝑗 +1 = 1 + 𝜆 𝑢 𝑡𝑗 + 𝑇𝑗 +1 (2)
302
2 𝑢′′ (𝜉) 2 𝑀
𝑇𝑗 +1 = ≤ SPACE OF HINTS
2 2
2 − 1 ⟹ 𝑢 𝑡𝑗 +1 − 𝑢𝑗 +1 = 1 + 𝜆 𝑢 𝑡𝑗 − 𝑢𝑗 + 𝑇𝑗 +1 (3)
𝜖𝑗 +1 = 1 + 𝜆 𝜖𝑗 + 𝑇𝑗 +1 , 𝑤𝑒𝑟𝑒 𝜖𝑗 = 𝑢 𝑡𝑗 − 𝑢𝑗 .
Hence 𝜖𝑗 +1 = 1 + 𝜆 𝜖𝑗 + 𝑇𝑗 +1 (4)
Let 𝐴 = 1 + 𝜆,
2 ′′ 2 𝑀
𝑇𝑗 +1 = 𝑢 (𝜉) ≤ (5)
2 2
where 𝑀 = max 𝑡 0 ,𝑏 𝑢′′ 𝑡
𝑎≤𝑡≤𝑏
2 𝑀
4 ⟹ 𝐸𝑗 +1 ≤ 𝐴𝐸𝑗 + 𝑇 𝑤𝑒𝑟𝑒 𝑇 =
2
Setting 𝑗 = 0,1,2, … we get
𝐸1 ≤ 𝐴𝐸0 + 𝑇
𝐸2 ≤ 𝐴𝐸1 + 𝑇 = 𝐴 𝐴𝐸0 + 𝑇 + 𝑇
= 𝐴2 𝐸0 + (1 + 𝐴)𝑇
In general, 𝐸𝑗 ≤ 𝐴𝑗 𝐸0 + (1 + 𝐴 + ⋯ + 𝐴𝑗 −1 )𝑇
𝐴𝑗 −1
𝑗
𝐸𝑗 ≤ 𝐴 𝐸0 + 𝑇 𝑤𝑒𝑟𝑒 𝐴 ≠ 1 6
𝐴−1
2 𝑀
6 ⟹ 𝐸𝑗 ≤ exp 𝜆 𝑡𝑗 − 𝑎 −1
2𝜆
303
𝑀
≤ exp 𝜆 𝑡𝑗 − 𝑎 −1
SPACE FOR HINTS 2𝜆
Since max 𝜖𝑗 = 𝐸𝑗 , we get
𝜖𝑗 ≤ 𝑢 𝑡𝑗 − 𝑢 𝑡𝑗 ,
𝑀
≤ exp 𝜆 𝑡𝑗 − 𝑎 −1
2𝜆
𝜕(𝜆𝑢 )
since 𝜆 = ,the result can be generalized as
𝜕𝑢
Example: 5.3.2
Solution:
Given 𝑦 ′ = 𝑧 , 𝑧 ′ = −𝑏𝑦 − 𝑎𝑧
𝑦𝑗 +1 = 𝑦𝑗 + 𝑧𝑗
𝑧𝑗 +1 = −𝑏𝑦𝑗 + 1 − 𝑎 𝑧𝑗
1 𝑦𝑗
where 𝐴 = , 𝑢𝑗 = 𝑧
−𝑏 1 − 𝑎 𝑗
304
1−𝜉
⟹ =0 SPACE OF HINTS
−𝑏 1 − 𝑎 − 𝜉
⟹ 1 − 𝜉 1 − 𝑎 − 𝜉 − −𝑏2 = 0
⟹ 1 − 𝑎 − 2𝜉 − 𝑎𝜉 + 𝜉 2 + 𝑏2 = 0
⟹ 𝜉 2 − 2 − 𝑎 𝜉 + 1 − 𝑎 + 𝑏2 = 0 ∗
1+𝑧
Putting 𝜉 = in ∗ , we get,
1−𝑧
2
1+𝑧 1+𝑧
− 2 − 𝑎 + 1 − 𝑎 + 𝑏2 = 0
1−𝑧 1−𝑧
1 + 𝑧 2 + 2𝑧 − 2 − 𝑎 1 − 𝑧 2 + 1 + 𝑧 2 − 2𝑧 − 𝑎 − 𝑎2
+ 2𝑎𝑧 + 𝑏2 + 𝑏2 𝑧 2 − 2𝑏2 𝑧 = 0
𝑖𝑒) 𝑎0 𝑧 2 + 𝑎1 𝑧 + 𝑎2 = 0
𝑎1 = 2 𝑎 − 𝑏 > 0 2
𝑎2 = 𝑏2
>0 3
For < 𝑎 𝑏 𝑜𝑟 𝑎 = 𝑏 .
∗ ⟹ 𝜉 2 − 2 − 𝑎 𝜉 + 1 − 𝑏2 + 𝑏2 = 0
305
⟹ 𝜉 2 − 2 − 𝑎 𝜉 + 1 = 0
SPACE FOR HINTS
2 − 𝑏2 ± 2 − 𝑏2 2 −4
𝜉=
2
∴ 2 − 𝑏2 2
−4<0
−2 ′′
𝑇𝑗 +1 = 𝑢 𝜉 , 𝑡𝑗 < 𝜉 < 𝑡𝑗 +1
2
Example:5.3.3
Solution:
𝑖𝑒) 𝑓 = −2𝑡𝑢2
The formula for backward Euler method is,
𝑢𝑗 +1 = 𝑢𝑗 + 𝑓𝑗 +1 1
Here 𝑓𝑗 +1 = −2𝑡𝑗 +1 𝑢𝑗 +1 2
1 ⟹ 𝑢𝑗 +1 = 𝑢𝑗 − 2 𝑡𝑗 +1 𝑢𝑗 +1 2
𝑓 𝑢𝑗 +1 = 𝑢𝑗 +1 − 𝑢𝑗 + 2 𝑡𝑗 +1 𝑢𝑗 +1 2
𝐹 𝑢𝑗 +1 = 𝑢𝑗 +1 − 𝑢𝑗 + 0.4 𝑡𝑗 +1 𝑢𝑗 +1 2
𝐹 ′ 𝑢𝑗 +1 = 1 + 4 𝑡𝑗 +1 . 𝑢𝑗 +1
306
𝐹 ′ 𝑢𝑗 +1 = 1 + 0.8 𝑡𝑗 +1 . 𝑢𝑗 +1 SPACE OF HINTS
The formula,
𝑠
𝑠+1 𝑠
𝐹(𝑢𝑗 +1 )
𝑢𝑗 +1 = 𝑢𝑗 +1 −
𝐹 ′ 𝑢𝑗 +1 𝑠
0
Taking 𝑢𝑗 +1 = 𝑢𝑗
0
𝑗 = 0 , 𝑡1 = 0.2 , 𝑢1 = 𝑢0 = 1 (𝑔𝑖𝑣𝑒𝑛 )
0
𝑠 = 0 ⟹ 𝐹 𝑢1 = 𝑢1 − 𝑢0 + 0.4 𝑡1 𝑢1 2 = 1 − 1 + 0.4 0.2 12
= 0.08
𝐹 ′ 𝑢1 0
= 1 + 0.8 0.2 1 = 1.16
1 0
𝐹 𝑢1 0 0.08
𝑢1 = 𝑢1 − ′ =1− = 0.9310
𝐹 𝑢1 0 1.16
𝑠 𝑠 𝑠
𝑗 𝑠 𝑢𝑗 +1 𝐹 𝑢𝑗 +1 𝐹 ′ 𝑢𝑗 +1 𝑠
𝑠+1 𝑠
𝐹(𝑢𝑗 +1 )
𝑢𝑗 +1 = 𝑢𝑗 +1 −
𝐹 ′ 𝑢𝑗 +1 𝑠
∴ 𝑢 0.2 = 0.9307 = 𝑢1
307
1 2 0.82249 0.00003 1.263196 0.82247
SPACE FOR HINTS
𝑢 0.4 = 0.82247
Midpoint method
The equation may be written as, 𝑢𝑗 +1 = 𝑢𝑗 −1 + 2 𝑓𝑗 ,
Truncation error,
3 ′′′
𝑇𝑗 +1 = 𝑢 𝜉 , 𝑡𝑗 −1 < 𝜉 < 𝑡𝑗 +1
3
3
𝑇𝑗 +1 ≤ 𝑀3 𝑤𝑒𝑟𝑒 𝑀3 = max 𝑢′′′ 𝑡
3 𝑡∈ 𝑡 0 ,𝑏
Example: 5.3.4
Solve the initial value problem 𝑢′ = −2𝑡𝑢2 , 𝑢 0 = 1using the
mid-point method with = 0.2 over the interval 0,1 . Use the Tayler
series method of second order to compute 𝑢 0.2 . Determine the
percentage relative error at 𝑡 = 1.
Solution:
𝑢𝑗 +1 = 𝑢𝑗 −1 − 4𝑡𝑗 𝑢𝑗 2
2 ′′ ′
𝑢1 = 𝑢 = 𝑢 0 + 𝑢 0 + 𝑢 0 2
2
Where 𝑢 0 = 1, 𝑢′ 𝑡 = −2𝑡𝑢2 , 𝑢′′ = −2𝑢2
𝑢′ 0 = 0 , 𝑢′′ 0 = −2
308
Now, we obtain from (1),𝑢2 , 𝑢3 , 𝑢4 , 𝑢5 ,we have
SPACE OF HINTS
Put 𝑗 = 1, 𝑢0 = 1, 𝑢1 = 0.96 , 𝑡1 = 0.2
𝑢 0.4 = 𝑢2 = 𝑢0 − 0.8 𝑡1 𝑢1 2
2
= 1 − 0.8 0.2 0.96
𝑢 0.4 = 𝑢2 = 0.852544
𝑢 0.6 = 𝑢3 = 𝑢1 − 0.8 𝑡2 𝑢2 2
2
= 0.96 − 0.8 0.4 0.852544
𝑢 0.6 = 𝑢3 = 0.7274139
𝑢 0.8 = 𝑢4 = 𝑢2 − 0.8 𝑡3 𝑢3 2
2
= 0.852544 − 0.8 0.6 0.7274139
𝑢 0.8 = 𝑢4 = 0.5985611
𝑢 1.0 = 𝑢5 = 𝑢3 − 0.8 𝑡4 𝑢4 2
2
= 0.7274139 − 0.8 0.8 0.5985611
𝑢 1.0 = 𝑢5 = 0.4981176
1
∴ 𝑢 1 = = 0.5
1+1
The percentage error is defined as
𝑢 − 𝑢∗ 𝑢 𝑖𝑠 𝑡𝑒 𝑒𝑥𝑎𝑐𝑡 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
× 100 𝑤𝑒𝑟𝑒 ∗
𝑢 𝑢 𝑖𝑠 𝑡𝑒 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
0.5 − 0.4981176
∴ 𝑝. 𝑒 = × 100 = 0.38 %
0.5
Example: 5.3.5
Find singlestep methods for the differential equation
309
𝑦 ′ = 𝑓 𝑡, 𝑦 which produce exact results for
SPACE FOR HINTS i. 𝑦 𝑡 = 𝑎 + 𝑏𝑒 −𝑡
ii. 𝑦 𝑡 = 𝑎 + 𝑏 cos 𝑡 + 𝑐 sin 𝑡
Solution:
i. For eliminating the arbitrary parameter 𝑎 and 𝑏 we need 3
relations 𝑦 𝑡 in 𝑦 ′ 𝑡 and to eliminate 𝑎 and 𝑏.
We have,
𝑦 𝑡𝑗 +1 = 𝑎 + 𝑏𝑒 −𝑡 𝑗 +1 ⟹ 𝑦𝑗 +1 − 𝑎 − 𝑏𝑒 −𝑡 𝑗 +1 = 0
𝑦 𝑡𝑗 = 𝑎 + 𝑏𝑒 −𝑡 𝑗 ⟹ 𝑦𝑗 − 𝑎 − 𝑏𝑒 −𝑡 𝑗 = 0
𝑦 ′ 𝑡𝑗 = −𝑏𝑒 −𝑡 𝑗 ⟹ 𝑦𝑗 ′ + 𝑏𝑒 −𝑡 𝑗 = 0
𝑦𝑗 +1 −1 −𝑒 −𝑡 𝑗 +1
𝑜𝑟 𝑦𝑗 −1 −𝑒 −𝑡 𝑗 = 0
𝑦𝑗 ′ 0 −𝑒 −𝑡 𝑗
𝑦𝑗 +1 −𝑒 −𝑡 𝑗 + 1 𝑦𝑗 𝑒 −𝑡 𝑗 + 𝑦𝑗 ′ 𝑒 −𝑡 𝑗 − 𝑒 −𝑡 𝑗 +1 𝑦𝑗 ′ = 0
⟹ − 𝑦𝑗 +1 𝑒 −𝑡 𝑗 + 𝑦𝑗 𝑒 −𝑡 𝑗 + 𝑦𝑗 ′ 𝑒 −𝑡 𝑗 − 𝑦𝑗 ′ 𝑒 −𝑡 𝑗 +1 = 0
𝑒 −𝑡 𝑗 +1
⟹ − 𝑦𝑗 +1 + 𝑦𝑗 + 𝑦𝑗 − 𝑦𝑗 ′ ′
= 0 (since dividev by𝑒 −𝑡 𝑗 )
𝑒 −𝑡 𝑗
⟹ − 𝑦𝑗 +1 + 𝑦𝑗 + 𝑦𝑗 ′ 1 − 𝑒 − = 0
⟹ 𝑦𝑗 + 𝑦𝑗 ′ 1 − 𝑒 − = 𝑦𝑗 +1
𝑦 𝑡𝑗 +1 = 𝑎 + 𝑏 cos(𝑡𝑗 +1 ) + 𝑐 sin(𝑡𝑗 +1 ) 1
𝑦 ′ 𝑡𝑗 +1 = −𝑏 sin(𝑡𝑗 +1 ) + 𝑐 cos 𝑡𝑗 +1 2
310
𝑦 𝑡𝑗 = 𝑎 + 𝑏 cos 𝑡𝑗 +1 + 𝑐 sin 𝑡𝑗 +1 3 SPACE OF HINTS
𝑦 ′ 𝑡𝑗 = −𝑏 sin(𝑡𝑗 ) + 𝑐 cos 𝑡𝑗 4
2 ⟹ 𝑦𝑗 +1 ′ + 𝑏 sin(𝑡𝑗 +1 ) − 𝑐 cos 𝑡𝑗 +1 = 0
4 ⟹ 𝑦𝑗 ′ + 𝑏 sin(𝑡𝑗 ) − 𝑐 cos 𝑡𝑗 = 0
⟹ 𝑦𝑗 +1 − 𝑦𝑗 sin 𝑡𝑗 − 𝑡𝑗 +1
− 𝑦𝑗 +1 ′ cos 𝑡𝑗 cos 𝑡𝑗 +1 − cos2 𝑡𝑗 +1
+ sin 𝑡𝑗 sin 𝑡𝑗 +1 − sin2 𝑡𝑗
+ 𝑦𝑗 ′ cos2 𝑡𝑗 +1 − cos 𝑡𝑗 cos 𝑡𝑗 +1 + sin2 𝑡𝑗 +1
− sin 𝑡𝑗 sin 𝑡𝑗 +1 =0
⟹ 𝑦𝑗 +1 − 𝑦𝑗 sin 𝑡𝑗 − 𝑡𝑗 +1 − 𝑦𝑗 +1 ′ cos 𝑡𝑗 − 𝑡𝑗 +1 − 1
+ 𝑦𝑗 ′ 1 − cos 𝑡𝑗 − 𝑡𝑗 +1 =0
311
⟹ 𝑦𝑗 +1 − 𝑦𝑗 sin − − 𝑦𝑗 +1 ′ cos(−) − 1 + 𝑦𝑗 ′ 1 − cos(−)
SPACE FOR HINTS
=0
⟹ − sin 𝑦𝑗 +1 − 𝑦𝑗 = − 𝑦𝑗 +1 ′ + 𝑦𝑗 ′ 1 − cos
1 − cos
⟹ 𝑦𝑗 +1 − 𝑦𝑗 = 𝑦𝑗 +1 ′ + 𝑦𝑗 ′
sin
(since divided by − sin )
1 − cos
⟹ 𝑦𝑗 +1 = 𝑦𝑗 + 𝑦𝑗 +1 ′ + 𝑦𝑗 ′
sin
5.4: Singlestep Methods
A general singlestep method can be written as
𝑢𝑗 +1 = 𝑢𝑗 + 𝜙(𝑡𝑗 +1 , 𝑡𝑗 , 𝑢𝑗 +1 , 𝑢𝑗 , )
𝑢𝑗 +1 = 𝑢𝑗 + 𝜙(𝑡𝑗 , 𝑢𝑗 , ) where 𝑗 = 0, 1, … , 𝑁 − 1
Euler-Cauchy Method:
The formula for Euler-Cauchy method is given by
𝑢𝑗 +1 = 𝑢𝑗 + [𝐾1 + 𝐾2 ] where 𝐾1 = 𝑓𝑗 and 𝐾2 = 𝑓(𝑡𝑗 +1 , 𝑢𝑗 + 𝐾1 )
2
𝑢𝑗 +1 = 𝑢𝑗 + 𝐾2
312
1
where 𝐾1 = 𝑓(𝑡𝑗 , 𝑢𝑗 ) and 𝐾2 = 𝑓(𝑡𝑗 + , 𝑢𝑗 + 𝐾1 )
2 2 SPACE OF HINTS
Heun Method:
1
𝑢𝑗 +1 = 𝑢𝑗 + [𝐾1 + 𝐾2 ]
2
Example: 5.4.1
Solution:
Given 𝑢′ = 𝑡 2 + 𝑢2 , 𝑢 0 = 0
⟹ 𝑢′ 0 = 0
𝑢4 0 = 0
𝑢5 0 = 0
𝑢6 𝑡 = 2 𝑢𝑢5 + 𝑢4 𝑢′ + 8 𝑢′′ 𝑢3 + 𝑢′ 𝑢4
+ 6 +𝑢3 𝑢′′ + 𝑢′′ 𝑢3
313
𝑢7 𝑡 = 2 𝑢𝑢6 + 𝑢5 𝑢′ + 10 𝑢4 𝑢′′ + 𝑢′ 𝑢5
SPACE FOR HINTS
+ 20 𝑢′′ 𝑢4 + 𝑢3 𝑢3
𝑢8 𝑡 = 2 𝑢𝑢7 + 𝑢6 𝑢′ + 12 𝑢5 𝑢′′ + 𝑢′ 𝑢6
+ 30 𝑢′′ 𝑢5 + 𝑢4 𝑢3
𝑢9 𝑡 = 2 𝑢𝑢8 + 𝑢7 𝑢′ + 14 𝑢6 𝑢′′ + 𝑢′ 𝑢7
+ 42 𝑢′′ 𝑢6 + 𝑢5 𝑢3 + 70 𝑢5 𝑢 3 + 𝑢4 𝑢4
314
𝑡3 𝑡7 𝑡 11
= 2 + 80 + 38400 + ⋯ SPACE OF HINTS
2.3 5040 39916800
𝑡3 𝑡7 2𝑡 11
𝑢 𝑡 = + + +⋯
3 63 2079
1 1 2
𝑢 1 = + + +⋯
3 63 2079
If only the first two terms are used them the value (or) 𝑡 is obtained
2𝑡 11
from, ≤𝜖
2079
⟹ 𝑡 ′′ ≤ 5.1995 × 10−5
𝑡 ≤ 0.4079
Example: 5.4.2
Find the three term Tayler series solution for the third order
initial value problem𝑤 ′′′ + 𝑤𝑤 ′′ = 0, 𝑤 0 = 0 , 𝑤 ′ 0 =
0 , 𝑤 ′′ 0 = 1 find the bound on the error for 𝑡 ∈ 0, 0.2
Solution:
Given 𝑤 ′′′ + 𝑤𝑤 ′′ = 0, 𝑤 0 = 0 , 𝑤 ′ 0 = 0 , 𝑤 ′′ 0 = 1
𝑤 ′′′ + 𝑤𝑤 ′′ = 0
𝑤 ′′′ 0 = −𝑤𝑤 ′′ = 0
𝑤 4 𝑡 = − 𝑤𝑤 ′′ + 𝑤 ′ 𝑤 ′′ , 𝑤4 0 = 0
𝑤 5 𝑡 = − 𝑤𝑤 4 + 𝑤 ′ 𝑤 ′′′ + 𝑤 ′ 𝑤 ′′′ + 𝑤 ′′ 𝑤 ′′ ,
𝑤 5 0 = −1
𝑤6 𝑡
= − 𝑤𝑤 5 + 𝑤 ′ 𝑤 4 + 𝑤 ′′ 𝑤 ′′′ + 𝑤 4 𝑤 ′
+ 𝑤 ′′ 𝑤 ′′′ + 𝑤 ′′ 𝑤 ′′′ + 𝑤 ′′ 𝑤 ′′′
315
= − 𝑤𝑤 5 + 3𝑤 ′ 𝑤 4 + 4𝑤 ′′ 𝑤 ′′′ , 𝑤6 0 = 0
SPACE FOR HINTS
𝑤7 𝑡
= − 𝑤𝑤 6 + 𝑤 ′ 𝑤 6 + 3𝑤 5 𝑤 ′ + 3𝑤 4 𝑤 ′′
+ 4𝑤 ′′ 𝑤 4 + 4𝑤 ′′′ 𝑤 ′′′
𝑤8 𝑡
= − 𝑤𝑤 7 + 𝑤 ′ 𝑤 6 + 4𝑤 5 𝑤 ′′ + 4𝑤 ′ 𝑤 6
+ 7𝑤 ′′ 𝑤 5 + 7𝑤 ′′′ 𝑤 4 + 4𝑤 ′′′ 𝑤 4
+ 4𝑤 4 𝑤 ′′′
= − 𝑤𝑤 7 + 5𝑤 ′ 𝑤 6 + 11𝑤 ′′ 𝑤 5 + 7𝑤 ′′′ 𝑤 4
+ 8𝑤 ′′′ 𝑤 4 , 𝑤 8 0 = 11
𝑤9 𝑡
= − 𝑤𝑤 8 + 𝑤 ′ 𝑤 7 + 5𝑤 ′ 𝑤 5 + 5𝑤 6 𝑤 ′′
+ 11𝑤 ′′ 𝑤 6 + 11𝑤 ′′′ 𝑤 5 + 7𝑤 4 𝑤 4
+ 7𝑤 ′′′ 𝑤 5 + 8𝑤 ′′′ 𝑤 5 + 8𝑤 4 𝑤 4
= − 𝑤𝑤 8 + 6𝑤 ′ 𝑤 7 + 16𝑤 ′′ 𝑤 6
+ 18𝑤 ′′′ 𝑤 5 + 7𝑤 4 𝑤 4 + 8𝑤 ′′′ 𝑤 5
+ 8𝑤 4 𝑤 4 , 𝑤9 0 = 0
𝑤 10 𝑡
= − 𝑤𝑤 9 + 𝑤 ′ 𝑤 8 + 6𝑤 ′′ 𝑤 7 + 6𝑤 ′ 𝑤 8
+ 16𝑤 ′′′ 𝑤 6 + 16𝑤 ′′′ 𝑤 6 + 18𝑤 ′′′ 𝑤 6
+ 18𝑤 4 𝑤 5 + 7𝑤 5 𝑤 4 + 7𝑤 4 𝑤 5 + 8𝑤 ′′′ 𝑤 3
+ 8𝑤 5 𝑤 4 + 8𝑤 5 𝑤 4 + 8𝑤 5 𝑤 4
316
SPACE OF HINTS
9 ′ 8 ′′ 7
= − 𝑤𝑤 + 7𝑤 𝑤 + 22𝑤 𝑤
+ 34𝑤 ′′′ 𝑤 6 + 56𝑤 4 𝑤 5
+ 8𝑤 ′′′ 𝑤 6 , 𝑤 10 0 = 0
𝑤 11 𝑡
= − 𝑤𝑤 10 + 𝑤 ′ 𝑤 9 + 7𝑤 ′′ 𝑤 8 + 7𝑤 ′ 𝑤 9
+ 22𝑤 ′′′ 𝑤 7 + 22𝑤 ′′ 𝑤 8 + 35𝑤 ′′′ 𝑤 7
+ 35𝑤 4 𝑤 6 + 56𝑤 5 𝑤 5 + 56𝑤 4 𝑤 6
+ 8𝑤 4 𝑤 6 + 8𝑤 ′′′ 𝑤 7
= − 𝑤𝑤 10 + 8𝑤 ′ 𝑤 9 + 29𝑤 ′′ 𝑤 8
+ 65𝑤 ′′′ 𝑤 7 + 91𝑤 4 𝑤 6
+ 56𝑤 5 𝑤 5 , 𝑤 11 0 = −375
Tayler series:
𝑡 ′ 𝑡 2 ′′ 𝑡 3 ′′′
𝑤 𝑡 = 𝑤 𝑡 + 𝑤 𝑡 + 𝑤 𝑡 +⋯
1! 2! 3!
𝑡 2 ′′ 𝑡5 𝑡8 𝑡 11 11
= 𝑤 𝑡 + 𝑤5 𝑡 + 𝑤8 𝑡 + 𝑤 𝑡
2! 5! 8! 11!
𝑡2 𝑡5 𝑡8 𝑡 11
= 1 + −1 + 11 + −375
2! 5! 8! 11!
The error term is,
11
𝑡 11
𝐸 ≤ max 𝑤 𝑡
0≤𝑡≤0.2 11!
11
−375 0.2
= 1.924001924 × 10−13
11!
𝐸 ≤ 1.924001924 × 10−13
Example: 5.4.3
317
Given the initial value problem𝑢′ = −2𝑡𝑢2 , 𝑢 0 = 1 estimate
SPACE FOR HINTS 𝑢 0.4 using
Solution:
i. The formula for modified Euler Cauchy method is
𝑢𝑗 +1 = 𝑢𝑗 + 𝑘2 𝑤𝑒𝑟𝑒 𝐾1 = 𝑓 𝑡𝑗 , 𝑢𝑗 ; 𝐾2
𝐾1
= 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
= 0.2 , 𝑘1 = −2 −2𝑡𝑗 𝑢𝑗 2
𝑗 = 0 ⟹ 𝑡0 = 0 , 𝑢0 = 1
𝐾1 = 0.2 −2 0 1 =0
𝐾2 = 0.2 𝑓 𝑡𝑗 + 0.2 2 , 𝑢𝑗 + 0 2
= 0.2 𝑓 0 + 0.2 2 , 1 + 0
= 0.2 𝑓 0.1 , 1
2
𝐾2 = −2 −2 0.1 1 = −0.04
∴ 𝑢𝑗 +1 = 𝑢𝑗 + 𝑘2
𝑗 = 0 , ⟹ 𝑢1 = 𝑢0 + 𝑘2 = 1 − 0.04 = 0.96
𝑢 0.2 = 𝑢1 = 0.96
For 𝑗 = 1, 𝐾1 = 𝑓 𝑡1 , 𝑢1
𝑡1 = 0.2 , 𝑢1 = 0.96
318
𝐾1 = −2 −2𝑡𝑗 𝑢𝑗 2 = 0.2 −2 0.2 0.96 2
SPACE OF HINTS
𝐾1 = −0.073728
𝑢𝑗 +1 = 𝑢𝑗 + 𝐾2
𝑗 = 1 ⟹ 𝑢2 = 𝑢1 + 𝐾2 = 0.96 + −0.102262
𝑢2 = 𝑢 0.4 = 0.857738
𝑢𝑗 +1 = 𝑢𝑗 + 1 2 𝐾1 + 𝐾2 𝑤𝑒𝑟𝑒 𝐾1 = 𝑓 𝑡𝑗 , 𝑢𝑗 ; 𝐾2
= 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝐾1
Here 𝑓 𝑡𝑗 , 𝑢𝑗 = 𝑢 ′ = −2𝑡𝑗 𝑢𝑗 2 , 𝑢 0 = 1
𝑡0 = 0 , 𝑢0 = 1 , = 0.2
𝐾1 = 0.2 −2 0 1 =0
𝐾2 = 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝑘1
= 0.2 −2 0.2 1
𝐾2 = −0.08
𝑢𝑗 +1 = 𝑢𝑗 + 1 2 𝐾1 + 𝐾2
𝑢1 = 𝑢0 + 1 2 𝐾1 + 𝐾2
𝑢 0.2 = 𝑢1 = 0.96
319
For 𝑗 = 1 , 𝑡1 = 0.2 , 𝑢1 = 0.96
SPACE FOR HINTS 𝐾1 = −0.073728
𝐾2 = 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝑘1
𝐾2 = −0.125676
𝑢𝑗 +1 = 𝑢𝑗 + 1 2 𝐾1 + 𝐾2
𝑗=1, 𝑢1 = 𝑢 0.4
𝑢1 = 0.860298
𝑢′ = −2𝑡𝑢2
1
𝑢 𝑡 =
1 + 𝑡2
1
𝑢 0.2 = = 0.961538
1 + 0.22
1
𝑢 0.4 = = 0.862069
1 + 0.42
The absolute errors in the numerical solutions are,
𝜖 0.4 = 0.004331
Example: 5.4.4
320
Solution:
SPACE OF HINTS
The formula for fourth order method is,
𝑢𝑗 +1 = 𝑢𝑗 + 1 6 𝐾1 + 2 𝐾2 + 𝐾3 + 𝐾4 where 𝐾1 = 𝑓 𝑡𝑗 , 𝑢𝑗
𝐾1
𝐾2 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
𝐾2
𝐾3 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
𝐾4 = 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝐾3
For 𝑗 = 0 , 𝑡0 = 0 , 𝑢0 = 1
2
𝐾1 = 𝑓 𝑡𝑗 , 𝑢𝑗 = 0.2 −2 0 0.1 =0
⟹ 𝐾1 = 0
𝐾1
𝐾2 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
0.2 0
= 𝑓 0 + , 1+
2 2
= 0.2 𝑓 0.1 , 1
2
= 0.2 −2 0.1 1
𝐾2 = −0.04
𝐾2
𝐾3 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
= 𝑓 0 + 0.2 2 , 1 + 0 2
𝐾3 = −0.038416
𝐾4 = 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝐾3
321
= 0.2 𝑓 0.2 , 0.961584
SPACE FOR HINTS 2
= 0.2 −2 0.2 0.961584
𝐾4 = −0.073972
∴ 𝑢𝑗 +1 = 𝑢𝑗 + 1 6 𝐾1 + 2 𝐾2 + 𝐾3 + 𝐾4
𝑢1 = 𝑢0 + 1 6 𝐾1 + 2 𝐾2 + 𝐾3 + 𝐾4
𝑢 0.2 = 0.961533
𝐾1 = 𝑓 𝑡𝑗 , 𝑢𝑗 = −0.073964
𝐾1
𝐾2 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
0.2 −0.073964
= 𝑓 0.2 + , 0.961533 +
2 2
= 0.2 𝑓 0.3 , 0.924551
2
= 0.2 −2 0.3 0.924551
𝐾2 = −0.1025753462
𝐾2
𝐾3 = 𝑓 𝑡𝑗 + 2 , 𝑢𝑗 + 2
𝐾3 = −0.0994255
𝐾4 = 𝑓 𝑡𝑗 + , 𝑢𝑗 + 𝑘3
322
= 0.2 𝑓 0.4, 0.9005745
SPACE OF HINTS
2
= 0.2 −2 0.4 0.9005745
𝐾4 = −0.1297655088
∴ 𝑢𝑗 +1 = 𝑢𝑗 + 1 6 𝐾1 + 2 𝐾2 + 𝐾3 + 𝐾4
𝑢2 = 𝑢1 + 1 6 𝐾1 + 2 𝐾2 + 𝐾3 + 𝐾4
𝑢 0.2 = 𝑢2
= 0.961533
+ 1 6 −0.073964
+ 2 −0.102575 − 0.0994255
− 0.1297955088
𝑢 0.2 = 0.8602395819
*******
323