Professional Documents
Culture Documents
Mathcity Notes (NA)
Mathcity Notes (NA)
ANALYSIS II
MUZAMMIL TANVEER
mtanveer8689@gmail.com
0316-7017457
Dedicated to
My honorable Teacher
&
My Parents
1
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 1
Operator:
E Shift Operator
Mu Average Operator
Relationship of Operators:
∆= −1
∇=1−
/ /
= −
/ /
+
=
2
Role of Shift Operator:
Ef(x) = f(x+h)
= f(x+h+h) = f(x+2h)
f(x) = f(x+3h)
. .
. .
. .
f(x) = f(x+nh)
2
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Now ∆f(x) = f(x+h) −f(x)
= Ef(x) −f(x)
∆f(x) = (E−1)f(x)
∆ = (E−1)
= f(x) − f(x)
= (1− )f(x)
∇ = 1−
f(x) = + − −
= ( )− ( )
f(x) = ( − )f(x)
= −
f(x) =
( ) ( )
=
f(x) = ( )
= ( )
E =
∆ = −
∇ = −
= −
3
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
=
Difference Equation:
An equation consists of an independent variable k, dependent variable and
one or several difference of the dependent variable as
∆ , ∆ , ∆ ,…. ∆ is called the difference equation.
f(∆) = F(k)
Example:
1. ∆ + 3∆ − ∆ + = 3k+2
2. ∆ + 3∆ −7 = 0
4
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 02
Definition:
The order of difference equation written in form free from ∆ s is difference
between the highest and lowest subscript of y’s. For example
Definition:
The degree of a difference equation written in a form free ∆ s is the highest
power of y’s. For example
Definition:
If in the difference equation the function of independent variable is zero (i.e.
F(k) = 0 in equation f(∆) = F(k) then the equation is called Homogeneous
Linear difference equation.
Definition:
If in the difference equation the function of independent variable is not zero (i.e.
F(k) 0 in equation f(∆) = F(k) then the equation is called Non-
Homogeneous Linear difference equation.
5
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
+6 + 11 +6 = 0
( + 6 + 11 + 6) = 0
The Auxiliary equation is
+ 6 + 11 + 6 = 0
By Synthetic division
1 6 11 6
1 1 5 6
1 5 6 0
m = 1 and +5 +6=0
±√ ±√
m= =
±
= ,
m = 1, 2, 3
−4 +4 = 0
( − 4 + 4) = 0
The Auxiliary equation is
−4 +4=0
m(m−2) −2(m−2) = 0
(m−2) (m−2) = 0
m = 2 and m = 2
m=2,2
6
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Example: Solve the difference equation
+ =0
+ =0
( + 1) = 0
The Auxiliary equation is
+1=0
= −1 =
m=±i
m=0±i
= tan = tan =
Thus = [ + ]
= (1) +
+4 =0
( + 4) = 0
The Auxiliary equation is
+4=0
+4 +4− 4 =0
( + 2) − (2 ) = 0
7
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
( + 2 + 2 )( +2−2 )=0
±√ ±√
= , =
± ±
= , =
m = −1 ± , m=1±
= tan = − , = tan =
Thus = ( ) [ + ]+ ( ) [ + ]
= √2 − + − + √2 +
= √2 − + √2 +
2 −5 +2 = 0
(2 − 5 + 2) = 0
The Auxiliary equation is
±√ ±√
2 −5 +2=0 m= =
±
= = , m=2,
8
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
−6 + 14 − 14 +5 =0
−6 + 14 − 14 +5 = 0
( − 6 + 14 − 14 + 5) = 0
The Auxiliary equation is
−6 + 14 − 14 + 5 = 0
By Synthetic Division
1 1 6 14 14 5
1 5 9 5
1 1 5 9 5 0
1 4 5
1 4 5 0
±
= =2±i
= tan = tan
−2 +1=0
± ± ( )
m= =
± ±
m= =
m = cosβ ± i sinβ
r=| |= ( ) +( ) =1
= tan = tan ( )=
Thus = [ + ]
= (1) [ + ]
10
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 03
To find particular solution of equation (1) we shall discuss the following type
When the R.H.S of given difference equation is constant (i.e. F(k) = constant).
Then in order to find ∗ (particular solution) we shall substitute a trial function
= c in the given non-homogeneous difference equation and evaluate the
value of c. If the trial function or any term of trial function is present in Y
(complementary solution) then the trail function will be multiplied by a suitable
.
E 3 yk 3 E 2 y k 2 yk 5
E 3
3 E 2 2 yk 5 ...(1)
m3 3m 2 2 0
1 3 0 2
1 1 2 2
1 2 2 0
m = 1 and m 2 2m 2 0
2 4 8 2 12
m
2 2
2 2 3
2
m 1 3
m 1, 1 3 , 1 3
Thus Y c1 (1) k c2 (1 3) k c3 (1 3) k
E 3
3E 2 2 c 5 ...(1)
E 3c 3E 2c 2c 5
c 3c 2c 5
5
2c 5 c
2
5 5
yk Y*
2 2
*
Yk Y Y
5
Hence Yk c1 (1)k c2 (1 3)k c3 (1 3)k is the required general
2
solution.
12
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 2 2 yk 1 6 yk 7
E 2 yk 2 Eyk 6 yk 7
E 2
2 E 6 yk 7 ...(1)
E 2
2 E 6 yk 0
m 2 2m 6 0
2 4 24 2 20 2 2 5i
m
2 2 2
m 1 5i & r m 1 5 6
5
tan 1 1
tan ( 5)
1
k
Thus Y c cos k c sin k
6 1 2
E 2
2E 6 c 7
E 2 c 2 Ec 6c 7
c 2c 6c 7
7 7 7
5c 7 c yk Y*
5 5 5
Yk Y Y *
c cos k c sin k 75
k
Hence Yk 6 1 2 is the requied general solution.
13
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 2 3 yk 1 4 yk 2
E 2 yk 3Eyk 4 yk 2
E 2
3 E 4 yk 2 ...(1)
E 2
3 E 4 yk 0
m 2 3m 4 0
3 9 16 3 25 35
m
2 2 2
35 35
m ,
2 2
m 4 , 1
Thus Y c1 (1)k c2 (4)k
E 2
3E 4 c 2
E 2 c 3Ec 4c 2
c 3c 4c 2
1
6c 2 c
3
1 1
yk Y*
3 3
*
Yk Y Y
1
Hence Yk c1 (1) k c2 (4) k is the requied general solution.
3
14
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 3 3 yk 2 3 yk 1 yk 9
E 3 yk 3E 2 yk 3Eyk yk 9
E 3
3E 2 3E 1 yk 9 ...(1)
E 3
3E 2 3E 1 ck 3 9
E 3ck 3 3 E 2ck 3 3Eck 3 ck 3 9
3 3 3
c k 3 3c k 2 3c k 1 ck 3 9
c k 3 9k 2 27 k 27 3c k 3 6k 2 12k 8 3c k 3 3k 2 3k 1 ck 3 9
k 3c 9ck 2 27ck 27c 3ck 3 18ck 2 36ck 24c 3ck 3 9ck 2 9ck 3c ck 3 9
3 3 3
6c 9 c , yk k 3 Y * k 3
2 2 2
Yk Y Y *
3
Hence Yk c1 c2 k c3 k 2 k 3 is the requied general solution.
2
15
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 4 6 yk 3 14 yk 2 14 yk 1 5 yk 1
E 4 yk 6 E 3 yk 14 E 2 yk 14 Eyk 5 yk 1
E 4
6 E 3 14 E 2 14 E 5 yk 1 ...(1)
E 4
6 E 3 14 E 2 14 E 5 0
1 1 5 9 5
1 5 9 5 0
1 1 4 5
1 4 5 0
m 1,1 , m 2 4m 5 0
4 16 20 4 4 4 2i
m
2 2 2
m 2 i
1
r m 4 1 5 tan 1
2
k
Thus Y c1 c2 k (1) k 5 c cos k c sin k
3 4
k
Thus Y c1 c2 k 5 c cos k c sin k
3 4
16
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For Particular solution Let =c put in (1)
E 4
6 E 3 14 E 2 14 E 5 ck 2 1
E 4ck 2 6 E 3ck 2 14 E 2ck 2 14 Eck 2 5ck 2 1
2 2 2 2
c k 4 6c k 3 14c k 2 14c k 1 5ck 2 1
c k 2 8k 18 6c k 2 6k 9 14c k 2 4k 4 14c k 2 2k 1 5ck 2 1
k 2 c 8ck 16c 6ck 2 36ck 54c 14ck 2 56ck 56c 14ck 2 28ck 14c 5ck 2 1
1
4c 1 c
4
1
yk k 2
4
1
Y* k2
4
Yk Y Y *
5 c cos k c sin k 14 k
k
2
Hence Yk c1 c2 k 3 4
1
where tan 1
2
17
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 04
f k a k where ‘’ and ‘a’ are constant, then in order to find particular
solution Y * we shall substitute yk Aa k (trial function) in the given difference
equation and find the value of A. If the trial function is present in
complementary solution Y then the trial function will be multiplied by a suitable
kn .
yk 2 6 yk 1 7 yk 3k
E 2 yk 6 Eyk 7 yk 3k
( E 2 6 E 7) yk 3k _____(1)
( E 2 6 E 7) yk 0
m 2 6m 7 0
6 36 28 6 8 6 2 2
m
2 2 2
m 3 2
Y c1 (3 2) k c2 (3 2) k
18
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For particular solution
( E 2 6 E 7) A3k 3k
9 A 18A 7 A 1
2A 1
1
A
2
1 k
Y* 3
2
Thus Yk Y Y *
1
Yk c1 (3 2) k c2 (3 2) k 3k is the required general solution.
2
yk 2 4 yk 1 4 yk 2k
E 2 yk 4 Eyk 4 yk 2k
( E 2 4 E 4) yk 2k _____(1)
( E 2 4 E 4) yk 0
19
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m 2 4m 4 0
m 2 2m 2m 4 0
m(m 2) 2(m 2) 0
( m 2)(m 2) 0
( m 2) 0 & (m 2) 0
m 2,2
( E 2 4 E 4) Ak 2 2k 2k
E 2 Ak 2 2k 2 4 E Ak 2 2k 1 4Ak 2 2k 2k
A(k 2) 2 2k 2 4 A(k 1) 2 2k 1 4 Ak 2 2k 2k
4 Ak 2 16 Ak 16 A 8Ak 2 16 Ak 8 A 4 Ak 2 1
8A 1
1
A
8
1
Y * k 2 2k
8
Thus Yk Y Y *
1
Yk (c1 c2 k )(2) k k 2 2 k is the required general solution.
8
20
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 2 4 yk 1 4 yk 2k 2
yk 2 4 yk 1 4 yk 4.2k
E 2 yk 4 Eyk 4 yk 4.2k
( E 2 4 E 4) yk 4.2k _____(1)
( E 2 4 E 4) yk 0
m 2 4m 4 0
m 2 2m 2m 4 0
m(m 2) 2(m 2) 0
( m 2)(m 2) 0
( m 2) 0 & (m 2) 0
m 2,2
( E 2 4 E 4) Ak 2 2k 4.2k
E 2 Ak 2 2k 2 4 E Ak 2 2k 1 4Ak 2 2k 4.2k
21
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
4 A(k 2 4k 4)2k 8A(k 2 2k 1)2 k 4Ak 2 2 k 4.2 k
4 Ak 2 16 Ak 16 A 8Ak 2 16 Ak 8 A 4 Ak 2 4
8A 4
1
A
2
1 2 k
Y* k 2
2
Thus Yk Y Y *
1
Yk (c1 c2 k )(2) k k 2 2k is the required general solution.
2
Question: Solve the difference equation
yk 2 4 yk 1 3 yk 3k 1
E 2 yk 4 Eyk 3 yk 3k 1
( E 2 4 E 3) yk 3k 1 _____(1)
( E 2 4 E 3) yk 0
m 2 4m 3 0
4 16 12 4 4 42
m
2 2 2
6 2
m ,
2 2
m 1,3
22
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Y c1 (1) k c2 (3) k
( E 2 4 E 3) yk 3k ________(2)
( E 2 4 E 3) yk 1 ________(3)
( E 2 4 E 3) Ak 3k 3k
E 2 Ak 3k 4 E Ak 3k 3A3k 3k
9 A(k 2) 12A(k 1) 3A k 1
6A 1
1
A
6
1 k
Y1* k3
6
( E 2 4 E 3) Bk 1
E 2 Bk 4 EBk 3Bk 1
B(k 2) 4 B( k 1) 3Bk 1
Bk 2 B 4 Bk 4 B 3Bk 1
23
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
2B 1
1
B
2
1
Y2* k
2
Y * Y1* Y2*
1 k 1
Y* k3 k
6 2
Thus Yk Y Y *
1 1
Yk c1 (1) k c2 (3) k k 3k k is the required general solution.
6 2
yk 2 4 yk 1 4 yk 3.2k 5.4k
( E 2 4 E 4) yk 3.2k 5.4k
( E 2 4 E 4) yk 0
m 2 4m 4 0
m 2 2m 2m 4 0
m(m 2) 2(m 2) 0
( m 2)(m 2) 0
( m 2) 0 & (m 2) 0
24
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m 2,2
( E 2 4 E 4) y k 3.2k ______(i)
( E 2 4 E 4) y k 5.4k ______(ii)
( E 2 4 E 4) Ak 2 2k 3.2k
E 2 Ak 2 2k 2 4 E Ak 2 2k 1 4 Ak 2 2 k 3.2k
4 Ak 2 16 Ak 16 A 8Ak 2 16 Ak 8 A 4Ak 2 3
8A 3
3
A
8
3
Y1* k 2 2k
8
( E 2 4 E 4) B 4k 5.4k
E 2 B 4k 4 EB 4k 4 B 4k 5.4k
B 4k 2 4 B 4k 1 4 B 4k 5.4k
14 B 4k 16 B 4k 4 B 4k 5.4k
25
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
4 B 4k 5.4k
5
B
4
5 k
Y2* 4
4
Y * Y1* Y2*
3 2 k 5 k
Y* k 2 4
8 4
Thus Yk Y Y *
3 5
Yk (c1 c2 k )(2) k k 2 2 k 4k is the required general solution.
8 4
yk 2 4 yk 1 4 yk 3.2k 5.4k 7
( E 2 4 E 4) yk 3.2k 5.4k 7
( E 2 4 E 4) yk 0
m 2 4m 4 0
m 2 2m 2m 4 0
m(m 2) 2(m 2) 0
( m 2)(m 2) 0
( m 2) 0 & (m 2) 0
26
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m 2,2
( E 2 4 E 4) y k 3.2k ______(i)
( E 2 4 E 4) y k 5.4k ______(ii)
( E 2 4 E 4) y k 7 ______(iii)
( E 2 4 E 4) Ak 2 2k 3.2k
E 2 Ak 2 2k 2 4 E Ak 2 2k 1 4 Ak 2 2 k 3.2k
4 Ak 2 16 Ak 16 A 8Ak 2 16 Ak 8 A 4Ak 2 3
8A 3
3
A
8
3
Y1* k 2 2k
8
( E 2 4 E 4) B 4k 5.4k
E 2 B 4k 4 EB 4k 4 B 4k 5.4k
B 4k 2 4 B 4k 1 4 B 4k 5.4k
27
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
14 B 4k 16 B 4k 4 B 4k 5.4k
4 B 4k 5.4k
5
B
4
5 k
Y2* 4
4
For equation (iii)
( E 2 4 E 4)C 7
E 2C 4 EC 4C 7
C 4C 4C 7
C=7
Y3* 7
3 5
Y * k 2 2k 4 k 7
8 4
Thus Yk Y Y *
3 5
Yk (c1 c2 k )(2) k k 2 2 k 4k 7 is the required general solution.
8 4
28
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 05
E 2 yk Eyk yk k 2 k 1
( E 2 E 1) yk k 2 k 1 _____(1)
( E 2 E 1) yk 0
m2 m 1 0
1 1 4 1 3i 1 3i
m
2 2 2 2
2 2
1 3 1 3 1 3
m 1
2 2 4 4 4
3
tan 2 tan 1 3
1
1 2
29
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
k
Y 1 c1 cos k c2 sin k
Y c1 cos k c2 sin k
( E 2 E 1) Ak 2 Bk C k 2 k 1
E 2 Ak 2 Bk C E Ak 2 Bk C Ak 2 Bk C k 2 k 1
2 2
A k 2 B( k 2) C A k 1 B (k 1) C Ak 2 Bk C k 2 k 1
A k 2 4k 4 B (k 2) C A k 2 2k 1 B ( k 1) C Ak 2 Bk C k 2 k 1
By comparing coefficients
A A A 1
3A 1
1
A
3
4 A B 2 A B B 1
6A 3B 1
1
6 3B 1
3
1
B
3
4 A 2 B C A B C C 1
5A 3B 3C 1
1 1
5 3 3C 1
3 3
1
C
9
30
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 1 1
Y* k2 k
3 3 9
Thus Yk Y Y *
1 1 1
Yk c1 cos k c2 sin k k 2 k is the required general solution.
3 3 9
E 2 yk 4 y k 9 k 2
( E 2 4) yk 9k 2 _____(1)
( E 2 4) yk 0
m2 4 0
m2 4
m 2
Y c1 (2) k c2 (2) k
( E 2 4) Ak 2 Bk C 9k 2
E 2 Ak 2 Bk C 4 Ak 2 Bk C 9k 2
2
A k 2 B(k 2) C 4Ak 2 4 Bk 4C 9k 2
31
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
A k 2 4k 4 B (k 2) 4A k 2 4 Bk 3C 9 k 2
By comparing coefficients
A 4 A 9
3A 9
A 3
4 A B 4 B 0
4 A 3B 0
4 3 3B 0
B 4
4 A 2B 3C 0
4 3 2 4 3C
3
C
20
20
Y * 3k 2 4k
3
Thus Yk Y Y *
20
Yk c1 (2) k c2 (2) k 3k 2 4k is the required general solution.
3
Solution: As we know E 1
2
E 1 yk 2 E 1 yk yk 3k 2
E 2
2 E 1 yk 2 E 1 yk yk 3k 2
32
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
E 2 yk 2 Eyk yk 2 Eyk 2 yk yk 3k 2
E 2 yk 3k 2 _____(1)
E 2 yk 0
m2 0
m 0,0
k
Y c1 c2 k 0 0
E 2 Ak B 3k 2
A(k 2) B 3k 2
Ak 2 A B 3k 2
By comparing coefficients
A3
2 A B 2
2(3) B 2
B 4
Y * 3k 4
Thus Yk Y Y *
33
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 2 3 yk 1 2 yk k 2
E 2 yk 3Eyk 2 yk k 2
( E 2 3E 2) yk k 2 _____(1)
( E 2 3E 2) yk 0
m 2 3m 2 0
3 9 8 3 1 3 1 3 1
m ,
2 2 2 2
m 1,2
k
Y c1 1 c2 (2) k
Y c1 c2 (2) k
( E 2 3E 2) Ak 3 Bk 2 Ck k 2
E 2 Ak 3 Bk 2 Ck 3E Ak 3 Bk 2 Ck 2 Ak 3 Bk 2 Ck k 2
3 3
A k 2 B(k 2)2 C k 2 3A k 1 3B(k 1)2 3C(k1) 2Ak3 2Bk 2 2Ck k 2
A k3 12k2 12k 8 B k2 4k 4 Ck
( 2)3A k3 3k2 3k 1 B k2 2k1 Ck
( 1)2Ak3 2Bk2 2Ck k2
By comparing coefficients
A 3A 2 A 0
12 A B 9 A 3B 2 B 1
34
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
3A 1
1
A
3
12 A 4B C 9 A 6 B 3C 2C 0
3A 2 B 0
1
3 2B
3
1
B
2
8A 4 B 2C 3A 3B 3C 0
5A B C 0
1 1
5 C
3 2
13
C
6
1 1 13
Y * k3 k2 k
3 2 6
Thus Yk Y Y *
1 1 13
Yk c1 c2 (2) k k 3 k 2 k is the required general solution.
3 2 6
2 E 2 yk 5Eyk 2 yk 2k k 2
(2 E 2 5E 2) yk 2k k 2 _____(1)
35
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For complementary solution
(2 E 2 5E 2) yk 0
2m 2 5m 2 0
5 25 16 5 9 5 3 5 3
m ,
4 4 4 4
1
m , 2
2
k
1
Y c1 c2 ( 2) k
2
(2 E 2 5E 2) yk 2k ______(i)
(2 E 2 5E 2) yk k 2 ______(ii)
(2 E 2 5E 2) A 2k 2k
2 E 2 A 2k 5 EA 2k 2 A 2k 2k
2 A 2k 2 5 A 2k 1 2 A 2k 2k
8 A 2k 10 A 2k 2 A 2k 2 k
8 A 10 A 2 A 1
20 A 1
1
A
20
36
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 k
Y1* 2
20
(2 E 2 5 E 2) Bk 2 Ck D k 2
2 E 2 Bk 2 Ck D 5 E Bk 2 Ck D 2 Bk 2 Ck D k 2
2 2
2 B k 2 C k 2 D 5 B k 1 C k 1 D 2 Bk 2 Ck D k 2
2 B k 2 4k 4 C k 2 D 5B k 2 2k 1 C k 1 D 2Bk 2 2Ck 2D k 2
By comparing coefficient
2B 5B 2B 1
1
B
9
8B 2C 10 B 5C 2C 0
18B 9C 0
1
18 9C 0
9
2
C
9
8B 4C 2 D 5B 5C 5D 2 D 0
13B 9C 9 D 0
1 2 5
9 D 13 9 D
9 9 81
1 2 2 5
Y2* k k
9 9 81
Y * Y1* Y2*
37
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 k 1 2 2 5
Y* 2 k k
20 9 9 81
Thus Yk Y Y *
k
1 1 1 2 5
Yk c1 c2 (2) k 2k k 2 k is the required general solution.
2 20 9 9 81
E 4 yk 2 E 3 yk 2 E 2 yk 2 Eyk yk k 2
E 4
2 E 3 2 E 2 2 E 1 yk k 2 _____(1)
(E 4 2 E 3 2 E 2 2 E 1) yk 0
m 4 2m 3 2m 2 2m 1 0
By synthetic division
1 2 2 2 1
1 1 1 1 1
1 1 1 1 0
1 1 0 1
1 0 1 0
m 1,1 and m 2 1 0
m2 1
38
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m i
m 0i
2 2
m 0 1 1
1
tan 1 tan 1
0
2
Y c1 c2 k c3 cos k c4 sin k
(E 4 2 E 3 2 E 2 2 E 1) Ak 4 Bk 3 Ck 2 k 2
E 4 Ak 4 Bk 3 Ck 2 2 E 3 Ak 4 Bk 3 Ck 2 2 E 2 Ak 4 Bk 3 Ck 2
2E Ak 4 Bk 3 Ck 2 Ak 4 Bk 3 Ck 2 k 2
4 3 2 4 3 2
A k 4 B k 4 C k 4 2 A k 3 B k 3 C k 3
4 3 2 4 3 2
2 A k 2 B k 2 C k 2 2 A k 1 B k 1 C k 1
Ak 4 Bk 3 Ck 2 k 2
4
a b a 4 b 4 4a 3b 4ab3 6a 2b 2
2 A k 4 1 4k 3 4k 6k 2 B k 3 3k 2 3k 1 C k 2 1 2k
39
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Ak 4 Bk 3 Ck 2 k 2
By comparing coefficients
96 A 12 B C 108 A 18B 2C 48 A 12 B 2C 12 A 6 B 2C C 1
1
A
24
256A 48B 8C 216 A 54 B 12C 64 A 24 B 8C 8 A 6 B 4C 0
96A 12 B 0
1
69 12B 0
24
1
B
3
256 A 64 B 16C 162 A 54 B 18C 32 A 16 B 8C 2 A 2 B 2C 0
124 A 24 B 4C 0
124 24
4C 0
24 3
17
C
24
1 4 1 3 17 2
Y* k k k
24 3 24
Thus Yk Y Y *
1 4 1 3 17 2
Yk c1 c2 k c3 cos k c4 sin k k k k is the required
2 2 24 3 24
general solution.
40
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 06
f (k ) a k (k )
yk a k A0 A1k A2 k 2 ...
in the given difference equation and then evaluate the values of A0 , A1 , A2 ,... .
If the trial function or any term of trial function is present in complementary
solution (Y) then the trial function will be multiplied by a suitable k n
yk 2 4 yk 1 4 yk 3k k 2 1
( E 2 4 E 4) yk 3k k 2 1 ______(i)
( E 2 4 E 4) yk 0
m 2 4m 4 0
m 2 2m 2m 4 0
m(m 2) 2(m 2) 0
( m 2)(m 2) 0
( m 2) 0 & (m 2) 0
41
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
m 2,2
( E 2 4 E 4)3k Ak 2 Bk C 3k k 2 1
9A 12A 4A k2 36A 9B 24A 12B 4B k 36A 18B 9C 12A 12B 12C C k2 1
On comparing coefficients
A=1
12A+B = 0
12(1) + B = 0
B = 12
24A+6B+C = 1
24(1) + 6(12)+C = 1
C = 49
Y * 3k k 2 12k 49
Thus Yk Y Y *
42
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 3 5 yk 2 8 yk 1 4 yk 2k. k
E 3 yk 5E 2 yk 8 Eyk 4 yk 2k. k
E 3
5 E 2 8 E 4 yk 2k .k _____(i)
( E 3 5 E 2 8E 4) yk 0
m3 5m 2 8m 4 0
By synthetic division
1 5 8 4
1 1 4 4
1 4 4 0
m 1 and m 2 4m 4 0
(m 2) 2 0
m 2, 2
Y c1 (1) k c2 c3 k 2 k
E 3
5 E 2 8 E 4 2k Ak 3 Bk 2 2k. k
E 2 Ak
3 k 3
Bk 2 5E 2 2k Ak 3 Bk 2 8E 2k Ak 3 Bk 2 4.2k Ak 3 Bk 2 2k. k
43
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
2k 3 A(k 3)3 B(k 3)2 5.2k 2 A(k 2)3 B(k 2)2 8.2k A(k 1)3 B(k 1)2
4.2k Ak 3 Bk 2 2k . k
8.2k A(k 3 9k 2 27k 27) B(k 2 6k 9) 20.2k A(k 3 6k 2 12k 8) B(k 2 4k 4)
8A 20A 16A 4A k3 72A 8B 120A 20B 48A 16B 4B k 2
216A 48B 240A 80B 48A 32B k 216A 72B 160A 80B 16A 16B k
On comparing
24Ak+(72A+8B) = k
24A = 1
1
A
24
72A+8B = 0
1
72 8B 0
24
3
B
8
1 3
Y * 2k k 3 k 2
24 8
Thus Yk Y Y *
1 3
Yk c1 (1) k c2 c3 k 2k 2k k 3 k 2 is the required general solution.
24 8
44
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the difference equation
yk 2 7 yk 1 8 yk 2 k k 2 k
E 2 yk 7 Eyk 8 yk 2k k 2 k
( E 2 7 E 8) yk 2k k 2 k _____(1)
( E 2 7 E 8) yk 0
m2 7m 8 0
7 49 32 7 81 7 9
m
2 2 2
m 1, 8
Y c1 (1) k c2 (8) k
( E 2 7 E 8) 2k Ak 2 Bk C 2k k 2 k
45
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
On comparing coefficients
18 A 1
1
A
18
1
12 A 18 B 1 18B 12 1
18
5
B
54
1 5
2 A 6 B 18C 0 18C 2 6
18 54
1
C
27
1 5 1
Y * 2k k 2 k
18 54 27
Thus Yk Y Y *
1 5 1
Yk c1 ( 1) k c2 (8) k 2k k 2 k is the required general solution.
18 54 27
46
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 07
E 2 yk 7 Eyk 12 yk sin 3k
( E 2 7 E 12) yk 0
m 2 7m 12 0
7 49 48 7 1
m
2 2
m 4,3
Y c1 (3) k c2 (4) k
47
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For particular solution
Asin 3k cos 6 cos3k sin 6 B cos3k cos 6 sin 3k sin 6 7 Asin 3k cos3 sin 3cos3k
7 B co s3k cos 3 sin 3k sin 3 12 A sin 3k 12 B cos 3k sin 3k
B cos 3k cos 6 sin 3k sin 6 7 cos 3k cos3 7 sin 3k sin 3 12 cos 3k sin 3k
AM BN = 1
AN + BM = 0
AM BN 1 = 0
AN + BM + 0 = 0
48
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
M N 1 M N 1
N M 0 N M 0
A B 1
2
0 M N 0 M N 2
M N
A , B
M 2 N2 M 2 N2
Y * A sin 3k B cos 3k
Yk Y Y *
E 2 yk 3Eyk yk sin k
( E 2 3E 1) yk sin k _____(1)
( E 2 3E 1) yk 0
m 2 3m 1 0
3 9 4 3 5
m
2 2
3 5 3 5
m ,
2 2
k k
3 5 3 5
Y c1 c2
2 2
49
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For particular solution
B cos k cos 2 sink sin 2 3cos k cos1 3sin k sin1 cos k sin k
AM BN = 1
AN + BM = 0
AM BN 1 = 0
AN + BM + 0 =
M N 1 M N 1
N M 0 N M 0
50
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
A B 1
2
0 M 0 N M N 2
M N
A , B
M N2
2
M N2
2
Y * A sin k B cos k
Yk Y Y *
k k
3 5 3 5
Yk c1 c2 A sin k B cos k is the required general
2 2
solution.
E 2 yk 7 Eyk 12 yk cos k
( E 2 7 E 12) yk 0
m 2 7m 12 0
7 49 48 7 1
m
2 2
m 4,3
Y c1 (3) k c2 (4) k
51
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
( E 2 7 E 12) A sin k B cos k cos k
B cos k cos 2 sin k sin 2 7 cos k cos1 7 sin k sin1 12 cos k cos k
AM BN = 1
AN + BM = 0
AM BN 1 = 0
AN + BM 1 = 0
A B 1
2
N 0 M 0 M N 2
N M
A , B
M N2
2
M N22
Y * A sin k B cos k
52
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Yk Y Y *
Solution: 2
yk cos k
E 1 2
E 1 yk cos k
E 2
2 E 1 E 1 yk cos k
E 2
E yk cos k _______(1)
E 2
E yk 0
m2 m 0
m m 1 0
m 0,1
k k
Y c1 0 c2 1
Y c2
E 2
E A sin k B cos k 0
Asin k cos2 cos1 cos k sin2 sin1 B cos k cos2 cos1 sin k sin2 sin1 cos k
Say M cos 2 cos1 & N sin 2 sin1
AM BN = 0
AN + BM = 1
By cross multiplication
A B 1
2
N 0 M 0 M N 2
N M
A , B
M 2 N2 M 2 N2
Y * A sin k B cos k
Yk Y Y *
E 2 yk 7 Eyk 12 yk sin 3k 2 2k
( E 2 7 E 12) yk sin 3k 2 2k
54
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For complementary solution
( E 2 7 E 12) yk 0
m 2 7m 12 0
7 49 48 7 1
m
2 2
m 4,3
Y c1 (3) k c2 (4) k
( E 2 7 E 12) yk 2 ___(ii)
( E 2 7 E 12) yk 2k ___(iii)
Asin 3k cos6 sin 6cos3k B cos3k cos 6 sin 3k sin 6 7 Asin 3k cos3 sin 3cos3k
7 B co s3k cos 3 sin 3k sin 3 12 A sin 3k 12 B cos 3k sin 3k
B cos 3k cos 6 sin 3k sin 6 7 cos 3k cos3 7 sin 3k sin 3 12 cos 3k sin 3k
55
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
B cos3k cos 6 7 cos3 12 sin 3k sin 6 7sin 3 sin 3k
AM BN = 1
AN + BM = 0
AM BN 1 = 0
AN + BM + 0 = 0
A B 1
2
0 M 0 N M N 2
M N
A , B
M N2
2
M N2
2
( E 2 7 E 12)C 2
( E 2C 7 EC 12C ) 2
C 7C 12C 2
1
6C 2 C
3
1
Y2*
3
56
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Let yk D 2k Put in (iii )
( E 2 7 E 12) D 2k 2k
( E 2 D 2k 7 E D 2k 12 D 2k ) 2k
D 2k 2 7 D 2k 1 12 D 2k 2k
4 D 14 D 12 D 1
2 D 1
1
D
2
1
Y3* 2k
2
1 1
Y * A sin 3k B cos 3k 2k
3 2
Yk Y Y *
1 1
Yk c1 (3) k c2 (4) k A sin 3k B cos 3k 2k is the required general
3 2
solution.
E 2 yk 4 Eyk yk cos 2 k
( E 2 4 E 1) yk cos 2 k _____(i)
( E 2 4 E 1) yk 0
57
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
The auxiliary equation
m 2 4m 1 0
4 16 4 4 12
m
2 2
m 2 3
m 2 3 , 2 3
Y c1 (2 3) k c2 (2 3) k
1 cos 2k 1 1
( E 2 4 E 1) y k cos 2 k cos 2 k
2 2 2
1
( E 2 4 E 1) y k ____(i)
2
1
( E 2 4 E 1) y k cos 2 k ____(ii)
2
For equation (i)
1
( E 2 4 E 1) A
2
1
( E 2 A 4 EA A)
2
1
A 4A A
2
1
2 A
2
1
A
4
58
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1
Y1*
4
For equation (ii)
1
( E 2 4 E 1) B sin 2k C cos 2k cos 2 k ____(ii)
2
1
E 2 Bsin 2k C cos 2k 4 E Bsin 2k C cos 2k Bsin 2k C cos 2k cos 2k
2
1
Bsin2(k 2) C cos2(k 2) 4 Bsin2(k 1) C cos2(k 1) Bsin2k C cos2k cos2k
2
1
Bsin(2k 4) C cos(2k 4) 4Bsin(2k 2) 4C cos(2k 2) Bsin2k C cos2k cos2k
2
B sin 2k cos 4 sin 4 cos 2k C cos 2k cos 4 sin 2k sin 4 4 B sin 2k cos sin 2 cos 2k
1
4C cos 2k cos 2 sin 2k sin 2 B sin 2k C cos 2k cos 2k
2
1
C cos 2k cos 4 sin 2k sin 4 4cos 2k cos 2 4sin 2k sin 2 cos 2k cos 2k
2
1
C cos 2k cos 4 4cos 2 1 sin 2k sin 4 4sin 2 cos 2k
2
Say M cos 4 4 cos 2 1 & N sin 4 4sin 2
1
B M sin 2k N cos 2k C M cos 2k N sin 2k cos 2k
2
1
BM CN sin 2k BN BM cos 2k cos 2k
2
By comparing coefficients of sin2k and cos2k
BM CN = 0
59
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1
BN + CM =
2
2 BN 2CM 1
BM CN = 0
2BN + 2CM 1 = 0
B C 1
N 0 M 0 2M 2 2 N 2
N M
B , C
2M N
2
2
2M 2 N 2
Y * Y1* Y2*
1
Y* B sin 2k C cos 2k
4
Yk Y Y *
1
Yk c1 (2 3) k c2 (2 3)k B sin 2k C cos 2k is the required general
4
solution.
( E 2 2 E 1) yk sin 5k cos 5k 6
( E 2 2 E 1) yk 0
60
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
The auxiliary equation
m 2 2m 1 0
2
m 1 0
m 1,1
Y c1 c2 k (1) k
Y c1 c2 k
( E 2 2 E 1) yk 6 ____(ii)
Asin5k cos10 sin10cos5k B cos5k cos10 sin5k sin10 2 Asin5k cos5 sin5cos5k
2 B co s 5k cos 5 sin 5k sin 5 A sin 5k B cos 5k sin 5k cos 5k
B cos 5k cos10 sin 5k sin10 2 cos5k cos 5 2sin 5k sin 5 cos5k sin 5k cos 5k
A sin 5k cos10 2 cos 5 1 cos 5k sin10 2sin 5
61
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
AM BN sin 5k AN BM cos 5k sin 5k cos 5k
By comparing coefficients of sin5k and cos5k
AM BN = 1
AN + BM = 1
AM BN 1 = 0
AN + BM 1 = 0
A B 1
2
N M M N M N 2
N M M N
A , B
M 2 N2 M 2 N2
( E 2 2 E 1)Ck 2 6
2 2
C k 2 2C k 1 Ck 2 6
C k 2 4k 4 2C k 2 2k 1 Ck 2 6
2C 6
C3
Y2* 3k 2
Y * Y1* Y2*
Y * A sin 5k B cos 5k 3k 2
62
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Yk Y Y *
E 2 yk 13Eyk 3 yk 3k cos 4k
( E 2 13E 3) yk 0
m 2 13m 3 0
63
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
k k
13 157 13 157
Y c1 c2
2 2
E2 .3k Asin4k B cos4k 13E.3k Asin 4k B cos4k 3.3k Asin 4k B cos4k 3k cos4k
3k2 Asin(4k 8) Bcos(4k 8) 13.3k1 Asin(4k 4) Bcos(4k 4) 3.3k Asin4k Bcos4k 3k cos4k
9 Asin(4k 8) Bcos(4k 8) 39 Asin(4k 4) Bcos(4k 4) 3 Asin4k Bcos4k cos4k
B 9cos 4k cos8 9sin 4k sin 8 39co s 4k cos 4 39sin 4k sin 4 3co s 4 cos 4k
A sin 4k 9cos8 39cos 4 3 cos 4 k 9sin 8 39sin 4
AM BN = 0
AN + BM = 1
AM BN = 0
64
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
AN + BM 1 = 0
M N M N
N M 1 N M 1
A B 1
2
N 0 M 0 M N 2
N M
A , B
M N2
2
M N2
2
Y * 3k A sin 4k B cos 4k
Yk Y Y *
k k
13 157 13 157 k
Yk c1 c2 3 A sin 4k B cos 4k is the
2 2
required general solution.
( E 2 E 1) yk 2k sink cos3k
( E 2 E 1) yk 0
m2 m 1 0
1 1 4 1 3i
m
2 2
65
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 3i
m
2 2
2 2
1 3 1 3
m 1
2 2 4 4
3
tan 2 tan 1 3
1
1 2
k
Y 1 c1 cos k c2 sin k
Y c1 cos k c2 sin k
2k
( E 2 E 1) yk 2sink cos3k
2
2k
( E E 1) yk sin 1 3 k sin 1 3 k
2
2k
( E 2 E 1) yk sin 4k sin 2k
2
1 1
( E 2 E 1) yk 2k sin 4k 2k sin 2k
2 2
1
( E 2 E 1) yk 2k sin 4k ____(i)
2
1
( E 2 E 1) yk 2k sin 2k ____(ii )
2
For equation (i)
1
( E 2 E 1)2k A sin 4k B cos 4k 2k sin 4k
2
66
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1
E2 .2k Asin4k B cos4k E.2k Asin4k B cos4k 2k Asin4k B cos4k 2k sin4k
2
1
2k2 Asin 4k 8 Bcos 4k 8 2k1 Asin 4k 4 Bcos 4k 4 2k Asin4k Bcos4k 2k sin4k
2
4 Asin 4k cos8 sin8cos4k 4B cos4k cos8 sin 4ksin8 2 Asin 4k cos4 sin 4cos4k
1
2B cos4k cos4 sin 4ksin 4 Asin4k B cos4k sin 4k
2
1
B 4cos 4k cos8 4sin 4k sin 8 2cos 4k cos 4 2sin 4k sin 4 cos 4k sin 4k
2
A sin 4k 4cos8 2cos 4 1 cos 4k 4sin 8 2sin 4
1
B cos 4k 4cos8 2cos 4 1 sin 4k 4sin8 2sin 4 sin 4k
2
Say M 4cos8 2cos 4 1 & N 4sin8 2sin 4
1
A M sin 4k N cos 4k B M cos 4k N sin 4k sin 4k
2
1
AM BN sin 4k AN BM cos 4k sin 4k
2
By comparing coefficients of sin4k and cos4k
1
AM BN =
2
2AM BN = 1
AN + BM = 0
By cross multiplication
2AM BN 1 = 0
AN + BM + 0 = 0
67
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
A B 1
0 M 0 N 2M 2 N 2
2
M N
A , B
2M N 2
2
2M 2 N 2
1
( E 2 E 1)2k Csin 2k D cos 2k 2k sin 2k
2
1 k
E2.2k Csin2k Dcos2k E.2k Csin2k Dcos2k 2k Dsin2k C cos2k 2 sin2k
2
1
2k2 Csin 2k 4 Dcos 2k 4 2k1 Csin 2k 2 Dcos 2k 2 2k Csin2k Dcos2k 2k sin2k
2
4C sin 2k cos4 sin 4cos4k 4D cos2k cos4 sin 2ksin 4 2C sin 2k cos2 sin 2cos2k
1
2D cos2k cos2 sin2ksin2 C sin 2k D cos2k sin 2k
2
1
D 4cos 2k cos 4 4sin 2k sin 4 2cos 2k cos 2 2sin 2k sin 2 cos 2k sin 2k
2
C sin 2k 4cos 4 2cos 2 1 cos 2k 4sin 4 2sin 2
1
D cos 2k 4cos 4 2cos 2 1 sin 2k 4sin 2 2sin 2 sin 2k
2
Say M 4cos 4 2cos 2 1 & N 4sin 4 2sin 2
1
C M sin 2k N cos 2k D M cos 2k N sin 2k sin 2k
2
1
CM DN sin 2k CN DM cos 2k sin 2k
2
By comparing coefficients of sin2k and cos2k
68
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1
CM DN = 2CM2DN = 1
2
CN + DM = 0
CN + DM 0 = 0
C D 1
0 M 0 N 2M 2 N 2
2
M N
C , D
2M 2 N 2 2M 2 N 2
Y * Y1* Y2*
69
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 08
Type VII
Simultaneous Difference Equation:
Question: Solve 2x + 4y = 7 , x 8y = 9
Solution: 2x + 4y = 7 _____(i)
x 8y = 9 _____(ii)
4x + 8y = 14
x 8y = 9
5x = 23
23
x
5
23
Put in (ii) 8y 9
5
23 23 45
8y 9
5 5
22
8y
5
22 11
y
5 8 20
23 11
S.S ,
5 20
70
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Solve the following system of D.E
un 1 un 3vn 7
3vn 1 vn 2un 6
Solution:
Eun un 3vn 7
3Evn vn 2un 6
E 1 un 3vn 7 ____(i)
3E 1 vn 2un 6 ____(ii )
7 1
vn E 1 un ______(iii )
3 3
7 1
Put in (ii) 3E 1 E 1 un
2un 6
3 3
7 1
3E 1 E 1 3E 1 un 2un 6
3 3
7 7 1
3E 3E 2 2 E 1 un 2un 6
3 3 3
7 7 1
3 3E 2 2 E 1 un 2un 6
3 3 3
Multiplying by 3 21 7 3E 2 2 E 1 un 6un 18
28 3E 2 2 E 1 6 un 18
3E 2
2 E 7 un 10 ____(iv)
71
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For complementary solution we have
3E 2
2 E 7 un 0
3m 2 2m 7 0
2 4 84 2 88
m
6 6
2 2 22 1 22
m
6 3
1 22
m
3 3
n n
1 22 1 22
u c1 c2
3 3 3 3
3E 2
2 E 7 A 10
3E 2 A 2 EA 7 A 10
3 A 2 A 7 A 10
5
A
3
5
u*
3
Thus, un u u *
n n
1 22 1 22 5
un c1 c2 ____(v)
3 3 3 3 3
72
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
n n
7 1 1 22 1 22 5
Put in (iii) vn E 1 c1 c2
3 3 3 3 3 3 3
n n n n
7 1 1 22 1 22 5 1 22 1 22 5
vn c1E c2 E E c1 c2
3 3 3 3 3 3 3 3 3 3 3 3
n1 n1 n n
7 1 1 22 1 22 1 22 1 22
vn c1 c2 c1 c2 _(iv)
3 3 3 3 3 3 3 3 3 3
3vn 1 vn 4un n 2
Solution:
E 1 un 3vn 2n ____(i)
3E 1 vn 4un n 2 ____(ii )
1 1
vn E 1 un 2n ______(iii )
3 3
1 1 n
Put in (ii) 3E 1 E 1 un 2 4un n 2
3 3
1 1
3E 1 E 1 un 3E 1 2n 4un n 2
3 3
73
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1 1
3
3E 2 2 E 1 un 3.E 2n 2n 4un n 2
3
3E 2
2 E 1 un 3.2n 1 2n 12un 3n 2
3E 2
2 E 1 12 un 3n 2 3.2n 1 2n
3E 2
2 E 11 un 3n 2 6.2n 2 n
3E 2
2 E 11 un 3n 2 5.2 n ___(iv)
3E 2
2 E 11 un 0
3m 2 2m 11 0
2 4 132 2 128
m
6 6
2 4 8i
m
6
1 2 8
m i
3 3
2
1 2 8 1 32
m
3 3 9 9
1 32 33 11
m
9 9 3
2 8
tan 1 3
tan 1 2 8
1
3
74
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
n
11
Thus u c1 cos n c2 sin n
3
3E 2
2 E 11 un 3n 2 ____(v)
3E 2
2 E 11 un 5.2 n ____(vi)
3E 2
2 E 11 An 2 Bn C 3n 2
3E 2 An 2 Bn C 2 E An 2 Bn C 11 An 2 Bn C 3n 2
2 2
3 A n 2 B n 2 C 2 A n 1 B n 1 C 11 An 2 Bn C 3n2
3
A
16
12 A 3B 4 A 2 B 11B 0
16 A 16 B 0
3
16 B 16 A 16 B 16
16
3
B
16
12 A 6 B 3C 4 A 2 B 2C 11C 0
16 A 8B 16C 0
16C 16 A 8 B
75
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
3 3
16C 16 8
16 16
3 6 3
16C 3 16C
2 2
3
C
32
3 2 3 3
u1* n n
16 16 32
3E 2
2 E 11 D 2n 5.2n
3E 2 D 2n 2 ED 2n 11D 2n 5.2n
3D 2n 2 2 D 2n 1 11D 2n 5.2n
12 D 4 D 11D 5
27 D 5
5
D
27
5 n
u 2* 2
27
3 2 3 3 5 n
u* u1* u2* u* n n 2
16 16 32 27
Thus, un u u *
n
11 3 2 3 3 5 n
un c1 cos n c2 sin n n n 2 ____(vii)
3 16 16 32 27
Put in (iii)
1 11 n 3 2 3 3 5 n 1 n
vn E 1 1 c cos n c2 sin n n n 2 2
3 3 16 16 32 27 3
76
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
n 1
1 11 3 2 3 3 5 n1
vn
3 3
c1 cos n 1 c2 sin n 1 16 n 1 16 n 1 32 27 2
n
1 11 3 2 3 3 5 n 1 n
c1 cos n c2 sin n n n 2 2 _____(viii)
3 3 16 16 32 27 3
3vn 1 2vn un 7
Solution:
E 1 un vn 2n ____(i)
3E 2 vn un 7 ____(ii )
Put in (ii) 3E 2 2n E 1 un un 7
3E 2 2n 3E 2 E 1 un un 7
3.2n 1 2.2n 3E 2 E 2 un un 7
6 2 2 n 3E 2 E 3 un 7
3E 2
E 3 un 8.2n 7 _____(iv)
3E 2
E 3 un 0
77
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
The auxiliary equation
3m 2 m 3 0
1 1 36 1 37
m
6 6
1 37
m
6 6
n n
1 37 1 37
u c1 c2
6 6 6 6
3E 2
E 3 un 8.2n ____(v)
3E 2
E 3 un 7 ____(vi)
3E 2
E 3 A2 n 8.2n
12 A 2 A 3 A 8
7A 8
8
A
7
8 n
u1* 2
7
3E 2
E 3 B 7
3B B 3B 7
78
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
B 7
B7
u 2* 7
8 n
u * u1* u2* u * 2 7
7
Thus, un u u *
n n
1 37 1 37 8 n
un c1 c2 2 7 ____(vii)
6 6 6 6 7
Put in (iii)
n n
1 37 1 37 8 n
n
vn 2 E 1 c1
c2 2 7
6 6 6 6 7
1 37 n1 1 37 n1 8 1 37
n
1 37
n
8 n
vn 2n c1 c2 2n1
7 c1
2 c 2 7
6 6 6 6 7 6 6 6 6 7
n1 n1 n n
1 37 1 37 16 8 1 37 1 37
vn 2n c1 c2 2n
c1
2 c
6 6 6 6 7 7 6 6 6 6
1 37 n1 1 37 n1 8 1 37
n n
1 37
n n
vn 2 c1 c2 2 c1 c2 _(viii)
6 6 6 6 7 6 6 6 6
1
yk 1 c1 2k 1 c2 3k 1
2
1
yk 1 2c1 2k 3c2 3k _____(ii)
2
1
yk 2 4c1 2k 9c2 3k _____(iii)
2
From eq (ii) and (iii) we have
4c1 2k 6c2 3k 1 2 yk 1 0
8c1 2k 18c2 3k 1 2 yk 2 0
By cross multiplication
c1 2k c2 3k 1
6 1 2 yk 2 18 1 2 yk 1 4 1 2 yk 2 8 1 2 yk 1 72 48
1
c1 2k 6 1 2 yk 2 18 1 2 yk 1
24
1
c2 3k 8 1 2 yk 2 4 1 2 yk 1
24
Putting these values in eq (i) we have
1 1 1
yk 6 1 2 yk 2 18 1 2 yk 1 8 1 2 yk 2 4 1 2 yk 1
24 24 2
24 yk 6 4 1 2 yk 2 18 8 1 2 yk 1 12
24 yk 2 1 2 yk 2 10 1 2 yk 1 12
24 yk 2 1 2 yk 2 5 10 yk 1 6
12 yk 2 yk 2 10 yk 1 2
80
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
6 yk yk 2 5 yk 1 1
E 2
4 E 4 yk sin k 2 k
E 2
4 E 4 yk 0
m 2 4m 4 0
2
m 2 0
m 2,2
Y c1 c2 k 2k
E 2
4 E 4 yk sin k ____(i)
E 2
4 E 4 yk 2 k ____(ii)
81
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
A sin k cos 2 sin 2cos k B cos k cos 2 sin k sin 2
B cos k cos 2 sin k sin 2 4co s k cos1 4sin k sin1 4co sk sin k
A sin k cos 2 4 cos1 4 cos k sin 2 4sin1
AM BN = 1
AN + BM = 0
AM BN = 0
AN + BM 0 = 0
A B 1
2
0 M 0 N M N2
M N
A , B
M 2 N2 M 2 N2
82
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
( E 2 4 E 4)C 2k k 2 2k
E 2C 2k k 2 4 EC 2k k 2 4C 2k k 2 2k
2 2
C 2k 2 k 2 4C 2k 1 k 1 4C 2k k 2 2 k
4C k 2 4k 4 8C k 2 2k 1 4Ck 2 1
8C 1
1
C
8
1
Y2* k 2 2 k
8
1
Y * Y1* Y2* Y * A sin k B cos k k 2 2k
8
1
Yk Y Y * Yk c1 c2 k 2k A sin k B cos k k 2 2k
8
Y0 c1 B
c1 B 0 Y0 0
N
c1 B c1
M N2
2
1 2
Yk' c1 c2 k 2k c2 2k A cos k B sin k k 2 2k k 2k
8 8
Y0' c1 c2 A
0 c1 c2 A Y0' 0
c2 c1 A
N M M N M N
c2 2 2
2 2
2 2
2 2
M N M N M N M N
83
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
By putting values
N M N k M N 1
Yk 2 2
2 k 2 2
2 2
sin k 2 2
cos k k 2 2k
M N M N M N M N 8
Solution:
2
yk 3 c1 k 3 c2 k 3 c3 _____(iv)
2
yk 2 yk 1 c1 k 2 k 1
2
c k 2 k 1
2
yk 2 yk 1 c1 k 2 4k 4 k 2 2k 1 c2 k 2 k 1
yk 2 yk 1 c1 k 2 4k 4 k 2 2k 1 c2 1
yk 2 yk 1 c1 2k 3 c2 ___(v)
2
yk 3 yk 2 c1 k 3 k 2
2
c k 3 k 2
2
yk 3 yk 2 c1 k 2 6k 9 k 2 4k 4 c2 k 3 k 2
yk 3 yk 2 c1 k 2 6k 9 k 2 4k 4 c2 1
yk 3 yk 2 c1 2k 5 c2 ___(vi)
yk 3 2 yk 2 yk 1 2c1
1
c1 yk 3 2 yk 2 yk 1
2
Put the value of c1 in (vi)
1
yk 3 yk 2 yk 3 2 yk 2 yk 1 2k 5 c2
2
2 yk 3 2 yk 2 yk 3 2 yk 2 yk 1 2k 5 2c2
2c2 2 yk 3 2 yk 2 2k 5 yk 3 2 2k 5 yk 2 2k 5 yk 1
2c2 2 2k 5 yk 3 2 4k 10 yk 2 2k 5 yk 1
2c2 2k 3 yk 3 4k 8 yk 2 2k 5 yk 1
1
c2 2k 3 yk 3 4k 8 yk 2 2k 5 yk 1
2
Put the value of c1 and c2 in (ii)
1 2 1
yk 1 yk 3 2yk 2 yk 1 k 1 2k 3 yk 3 4k 8 yk 2 2k 5 yk 1 k 1 c3
2 2
2 2 2
2yk1 k 1 yk3 2 k 1 yk2 k 1 yk1 k 1 2k 3 yk3 k 1 4k 8 yk2 k 1 2k 5 yk1 2c3
2 c3 k 2 2 k 1 y k 3 2 k 2 5 k 3 y k 3 2 k 2 2 k 1 y k 2
4k 2 12k 8 yk 2 k 2 2k 1 yk 1 2k 2 7 k 5 yk 1 2 yk 1
k 2 2k 1 2k 2 7k 5 2 yk 1
85
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
2c3 k 2 3k 2 yk 3 2k 2 8k 6 yk 2 k 2 5k 6 yk 1
1
c3 k 2 3k 2 yk 3 2k 2 8k 6 yk 2 k 2 5k 6 yk 1
2
Put the value of c1 , c2 and c3 in (i)
1 1
yk k 2 . yk 3 2 yk 2 yk 1 k. 2k 3 yk 3 4k 8 yk 2 2k 5 yk 1
2 2
1
k 2 3k 2 yk 3 2k 2 8k 6 yk 2 k 2 5k 6 yk 1
2
2 yk k 2 yk 3 2 yk 2 yk 1 k 2k 3 yk 3 4k 8 yk 2 2k 5 yk 1
k 2 3k 2 yk 3 2k 2 8k 6 yk 2 k 2 5k 6 yk 1
2 yk k 2 2k 2 3k k 2 3k 2 yk 3 2k 2 4k 2 8k 2k 2 8k 6 yk 2
k 2 2k 2 5k k 2 5k 6 yk 1
2 yk 1 2 yk 3 6 yk 2 6 yk 1
yk yk 3 3 yk 2 3 yk 1
Solution:
yk 1 c1 c2 k 1 3k 1
yk 1 3 c1 c2 k 1 3k ______(ii)
yk 2 9 c1 c2 k 2 3k ______(iii)
9c1 3k 9c2 k 2 3k yk 2 0
By cross multiplication
c1 3k c2 3k 1
3 k 1 yk 2 9 k 2 yk 1 3 yk 2 9 yk 1 27 k 2 27 k 1
3 k 1 yk 2 9 k 2 yk 1
c1 3k
27
1
c1 k 1 yk 2 3 k 2 yk 1
9.3k
3 yk 2 9 yk 1
c2 3k
27
1
c2 yk 2 3 yk 1
9.3k
1 1
yk k k 1 yk 2 3 k 2 yk 1 k yk 2 3 yk 1 k 3k
9.3 9.3
3k
yk k 1 yk 2 3 k 2 yk 1 kyk 2 3kyk 1
9.3k
1
yk k 1 k yk 2 3k 6 3k yk 1
9
1
yk yk 2 6 yk 1
9
9 yk yk 2 6 yk 1
By cross multiplication
c1 c2 1
k 1 9 yk2 k 2 9 yk1 k 1 9 yk2 k 2 9 yk1 k 1 k 2 k 22 k 1
2 2 2
k 1 9 yk 2 k 2 9 yk 1
c1 2 2
k 1 k 2 k 2 k 1
9k 9 k 1 yk 2 9k 18 k 2 yk 1
c1
k 2 k 1k 1 k 2
k 1 yk 2 k 2 yk 1 9
c1
k 2 k 1
k 1 yk 2 k 2 yk 1 9
c1
k 2 k 1
k 12 9 yk 2 k 2 2 9 yk 1
c2
k 1 k 2 k 1 k 2
9 k 2 2k 1 k 12 yk 2 9 k 2 4k 4 k 2 2 yk 1
c2
k 1 k 2
88
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
2 2
9k 2 18k 9 k 1 yk 2 9k 2 36k 36 k 2 yk 1
c2
k 1 k 2
2 2
k 1 yk 2 k 2 yk 1 18k 27
c2
k 1 k 2
Put the value of c1 and c2 in (i)
2 2
k 1 yk 2 k 2 yk 1 9 2 k 1 yk 2 k 2 yk 1 18k 27
yk k k 9
k 2 k 1 k 1 k 2
k2 k 1 yk2 k2 k 2 yk1 9k2 k k2 2k 1 yk2 k k2 4k 4 yk1 18k2 27k 9 k2 3k 2
yk
k2 3k 2
k3 k2 k3 2k2 k yk2 k3 2k2 k3 4k2 4k yk1 9k2 18k2 27k 9k2 27k 18
yk
k2 3k 2
k 2 k yk 2 2k 2 4k yk 1 18
yk
k 2 3k 2
k 2
3k 2 yk k 2 k yk 2 2k 2 4k yk 1 18
k 2
3k 2 yk k 2 k yk 2 2k 2 4k yk 1 18
k 2
k yk 2 2k 2 4k yk 1 k 2 3k 2 yk 18 is the required difference
equation.
89
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 09
Numerical Integration:
b
f x dx Area
a
1 f(a) f(b)
Area of Trapezium Dis tan ce between / / side Sumof / / side
2
1
Area of Trapezium b a f a f b a b
2
b
Consider a definite integral I f x dx _____(i)
a
Let us divide the interval [a,b] into n equal parts such that
x0 0
x1 x0 h
x2 x1 h x0 2h
x3 x2 h x0 3h
. .
. .
. .
xn x0 nh
P P 1 P P 1 P 2
P x y0 Py0 2 y0 3 y0 .... f x ____(iii)
2! 3!
90
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x x0
Where P x x0 Ph dx hdP
h
when x x0 P 0
xn x0
when x xn P n xn x0 nh
h
n P P 1 2 P P 1 P 2 3
I y0 Py0 y0 y0 ....h dP
0
2! 3!
n 1 1
I h y0 Py0 P 2 P 2 y0 P 3 3P 2 2 P 3 y0 .... dP
0
2 6
n
P2 1 P3 P2 2 1 P4
I h Py0 y0 y0 P 3 P 2 3 y0 ....
2 2 3 2 6 4 0
n2 1 n3 n2 1 n4 1 n5 3n4 11n3
I h ny0 y0 2 y0 n3 n2 3 y0 3n2 4 y0
2 2 3 2 6 4 24 5 2 3
91
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 10
______(A)
1-Trapezoidal Rule:
Put n = 1 in equation (A) and by neglecting 2nd order and higher order
differences we have
xn 1
f x dx h y0 y0
x0
2
xn h
f x dx 2 y0 y0
x0 2
xn h
f x dx 2 y0 y1 y0 y0 y1 y0
x0 2
xn h
f x dx y0 y1
x0 2
Similarly,
x2 1
f x dx h y1 y2
x1
2
h
2 y1 y2
2
h
2 y1 y2 y1 y2 y2 y1
2
x2 h
f x dx y1 y2
x1 2
92
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x3 h
Also f x dx y2 y3
x2 2
. .
. .
. .
xn h
f x dx yn 1 yn
xn 1 2
By adding above integrals, we have
xn h
f x dx y0 yn 2 y1 y2 y3 .... yn 1
x0 2
This is called Trapezoidal rule for evaluating definite integrals. This formula is
suitable if n is multiple of 1.
x2 4 18 4
f x dx h 2 y0 y0 2 y0
x0
2 23 2
1
h 2 y0 2y0 2 y0
3
1
h 2 y0 2 y1 y0 y2 2 y1 y0
3
h
6 y0 6 y1 6 y0 y2 2 y1 y0
3
h
y0 4 y1 y2
3
x4 1
Similarly, f x dx h 2 y2 2y2 2 y2
x2
3
93
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1
h 2 y2 2 y3 y2 y4 2 y3 y2
3
h
6 y2 6 y3 6 y2 y4 2 y3 y2
3
h
y2 4 y3 y4
3
x6
h
Also f x dx y4 4 y5 y6
x4 3
. .
. .
. .
xn
h
f x dx 3 y
xn 2
n2 4 yn 1 yn
x3 9 1 27 9 2 1 81
f x dx h 3 y0 y0 y0 27 9 3 y0
x0
2 2 3 2 6 4
9 9 3
h 3 y0 y0 2 y0 3 y0
2 4 8
94
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x3 9 9 3
f x dx h 3 y0 y1 y0 y2 2 y1 y0 y3 3 y2 3 y1 y0
x0
2 4 8
3h
8 y0 12 y1 12 y0 6 y2 12 y1 6 y0 y3 3 y2 3 y1 y0
8
3h
y0 3 y1 3 y2 y3
8
x6 9 9 3
Similarly, f x dx h 3 y3 y3 2 y3 3 y3
x3
2 4 8
x3 9 9 3
f x dx h 3 y3 y4 y3 y5 2 y4 y3 y6 3 y5 3 y4 y3
x0
2 4 8
3h
8 y3 12 y4 12 y3 6 y5 12 y4 6 y3 y6 3 y5 3 y4 y3
8
3h
y3 3 y4 3 y5 y6
8
x9
3h
Also f x dx 8 y
x6
6 3 y7 3 y8 y9
. .
. .
. .
xn
3h
f x dx 8 y
xn 3
n 3 3 yn 2 3 yn 1 yn
This is called Simpson’s 3/8 rule for evaluating definite integral. This formula is
suitable if n is multiple of 3.
95
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
4-Bool’s Rule: Put n = 4 in equation (A) and by neglecting fifth order and
higher order differences, we get
x4 16 1 64 16 1 256
f x dx h 4 y0 y0 2 y0 64 16 3 y0
x0
2 2 3 2 6 4
20 8 28
h 4 y0 8y0 2 y0 3 y0 4 y0
3 3 90
20 8 14
h4y0 8 y1 y0 y2 2y1 y0 y3 3y2 3y1 y0 y4 4y3 6y2 4y1 y0
3 3 45
2h
90y0 180 y1 y0 150 y2 2y1 y0 60 y3 3y2 3y1 y0 7 y4 4y3 6y2 4y1 y0
45
2h
90 y0 180 y1 180 y0 150 y2 300 y1 150 y0 60 y3 180 y2 180 y1 60 y0
45
7 y4 28 y3 42 y2 28 y1 7 y0
x4 2h
f x dx 7 y0 32 y1 12 y2 32 y3 7 y4
x0 45
x8 20 8 28
Similarly, f x dx h 4 y4 8y4 2 y4 3 y4 4 y4
x4
3 3 90
x8 2h
f x dx 7 y4 32 y5 12 y6 32 y7 7 y8
x4 45
Also
x12 2h
f x dx 7 y8 32 y9 12 y10 32 y11 7 y12
x8 45
. .
. .
. .
xn 2h
f x dx 7 yn 4 32 yn 3 12 yn 2 32 yn 1 7 yn
xn 4 45
96
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
By adding above integrals, we have
xn 2h
x0 f x dx 7 y0 yn 12 y2 y6 y10 .... yn2 14 y4 y8 y12 y16 .... yn4 32 y1 y3 ... yn1
45
This is called Bool’s rule for evaluating definite integral. This formula is
suitable if n is multiple of 4.
y0 E 1 y0 y1 y0
2
2 y0 E 1 y0 E 2 2 E 1 y0 y2 2 y1 y0
3
3 y0 E 1 y0 E 3 3E 2 3E 1 y0 y3 3 y2 3 y1 y0
4
4 y0 E 1 y0 E 4 4 E 3 6 E 2 4 E 1 y0 y4 4 y3 6 y2 4 y1 y0
97
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 11
______(A)
Weddle’s Rule:
Put n = 6 in equation (A) and by neglecting 7th order and higher order
differences we have
x6 123 4 33 41 6
f x dx h 6 y0 18y0 27 2 y0 243 y0 y0 5 y0 y0
x0
10 10 140
x6 3h 41 6
f x dx 10 20 y 0 60y0 902 y0 803 y0 414 y0 115 y0 y0
x0 42
x6 3h
f x dx 20 y0 60y0 902 y0 803 y0 414 y0 115 y0 6 y0
x0 10
41
1 (Main Step)
42
x6 3h
f x dx 10 20 y 0 60 y1 y0 90 y2 2 y1 y0 80 y3 3 y2 3 y1 y0
x0
41 y4 4 y3 6 y2 4 y1 y0 11 y5 5 y4 10 y3 10 y2 5 y1 y0
y6 6 y5 15 y4 20 y3 15 y2 6 y1 y0
98
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x6 3h
f x dx 10 y
x0
0 5 y1 y2 6 y3 y4 5 y5 y6
x12 3h
Similarly, f x dx y6 5 y7 y8 6 y9 y10 5 y11 y12
x6 10
x18 3h
f x dx y12 5 y13 y14 6 y15 y16 5 y17 y18
x12 10
. .
. .
. .
xn 3h
f x dx yn6 5 yn5 yn4 6 yn3 yn2 5 yn1 yn
xn6 10
This is called Weddle’s Rule for evaluating definite integrals. This formula is
suitable if n is multiple of 6.
Question: Using Trapezoidal, Simpson’s 1/3, Simpsons 3/8 and Weddle’s rule
7
to evaluate the definite integral f x dx by using the following data
1
x 1 2 3 4 5 6 7
f(x) 2.105 2.808 3.614 4.604 5.857 7.451 9.467
h
I y0 y6 2 y1 y2 y3 y4 y5
2
1
I 2.105 9.467 2 2.808 3.614 4.604 5.857 7.451 30.1165
2
99
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Using Simpson’s 1/3 rule for n = 6 we have
h
I y0 y6 2 y2 y4 4 y1 y3 y5
3
1
I 2.105 9.467 2 3.614 5.857 4 2.808 4.604 7.451 29.9886
3
3h
I y0 y6 2 y3 3 y1 y2 y4 y5
8
3
I 2.105 9.467 2 4.604 3 2.808 3.614 5.857 7.451 29.9887
8
3h
I y0 y2 y4 2 y6 6 y3 5 y1 y5
10
3
I 2.105 3.614 5.857 2 9.467 6 4.604 5 2.808 7.451 29.751
10
200 dx
Question: Evaluate the integral . Taking n = 4 using Trapezoidal rule,
100 ln x
Simpson’s 1/3 rule and Bool’s rule.
h
I y0 y4 2 y1 y2 y3
2
100
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
25
I 0.2171 0.1887 2 0.2071 0.1996 0.1936 20.08
2
Using Simpson’s 1/3 rule for n = 4 we have
h
I y0 y4 2 y2 4 y1 y3
3
25
I 0.2171 0.1887 2 0.1996 4 0.2071 0.1936 20.065
3
2h
I 7 y0 y4 12 y2 32 y1 y3
45
2 25
I 7 0.2171 0.1887 12 0.1996 32 0.2071 0.1936 20.06
45
8
esinx dx .
0
Solution: Given that a = 0 , b = and n = 3.
8
0
ba 8
Thus h
n 3 24
x 0
24 12 8
sinx
f x e 1 1.00228 1.00458 1.00688
3h
I y0 y3 3 y1 y2
8
101
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
3.
I 24 1 1.00688 3 1.00228 1.00458 8.02746 0.39405
8 64
Question: Using the combination of Simpson’s 1/3 and Simpson’ 3/8 rule.
8
Evaluate the integral f x dx By the given table
1
x 1 2
3 4 5 6 7 8
f(x) 1 4
9 16 25 36 49 64
b a 8 1 7
Solution: Here n = 7 , h 1
n 7 7
We arrange the table for both Simpson’s 1/3 and Simpson’s 3/8 rule
x0 x1 x2 x3
n
x0 x1 x2 x3 x4
x 1 2 3 4 5 6 7 8
f(x) 1 4 9 16 25 36 49 64
I I3 I1
8 3
3h h
I y0 y3 3 y1 y2 y0 y4 2 y2 4 y1 y3
8 3
3 1
I 1 16 3 4 9 16 64 2 36 4 25 49 21 149.33 170.33
8 3
Question: Using the combination of Simpson’s 1/3 and Simpson’ 3/8 rule.
Evaluate the integral 8
esin x dx
0
Solution: Here n = 5
[Least value of Simpson’s 1/3 is 2 and Simpson’s 3/8 is 3 i.e 2+3 = 5]
0
ba 8
h
n 5 40
We arrange the table for both Simpson’s 1/3 and Simpson’s 3/8 rule
102
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
For Simpson’s 3/8 For Simpson’s 1/3
x0 x1 x2x3
n
x0 x1 x2
x 0 3
40 20 40 10 8
f(x) 1 1.0014 1.0027 1.0041 1.0055 1.0069
I I3 I1
8 3
3h h
I y0 y3 3 y1 y2 y0 y2 4 y1
8 3
3.
I 40 1 1.0041 3 1.0014 1.0027 40 1.0041 1.0069 4 1.0055
8 3
I 0.2361 0.1579
I 0.39404
103
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 12
dy
F x, y ; y0 y x0 ____ i
dx
dy F x, y dx
x x
dy F x, y dx
x0 x0
x x
y x 0
F x, y dx
x0
x
y x y x0 F x, y dx
x0
x
y y0 F x, yn dx y x y , y x0 y0
x0
104
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x
yn 1 y0 F x, yn dx
x0
x
yn 1 y0 1 xyn dx
x0
x
yn 1 1 1 xyn dx y0 1 , x0 0 ; n 0,1,2,...
0
1st Approximation: (n = 0)
x
y1 1 1 xy0 dx
0
x
y1 1 1 x dx y0 1
0
x
x2
y1 1 x
2 0
x2
y1 1 x
2
2nd Approximation: (n = 1)
x
y2 1 1 xy1 dx
0
x
2 x3
y2 1 1 x x dx
0
2
x
x 2 x3 x 4
y2 1 x
2 3 8 0
x 2 x3 x 4
y2 1 x
2 3 8
3rd Approximation: (n = 2)
x
y3 1 1 xy2 dx
0
105
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x x3 x 4 x5
y3 1 1 x x 2 dx
0
2 3 8
x
x 2 x3 x 4 x5 x 6
y3 1 x
2 3 8 15 48 0
x 2 x3 x 4 x5 x 6
y3 1 x
2 3 8 15 48
4th Approximation: (n = 3)
x
y4 1 1 xy3 dx
0
x x3 x4 x5 x6 x7
y4 1 1 x x 2 dx
0
2 3 8 15 48
x
x 2 x3 x 4 x5 x 6 x 7 x8
y4 1 x
2 3 8 15 48 105 384 0
x 2 x3 x 4 x5 x 6 x 7 x8
y4 1 x
2 3 8 15 48 105 384
Comparison Table:
x 0.1 0.2 0.3 0.4 0.5
y1 1.105 1.220 1.345 1.480 1.625
y2 1.105 1.223 1.355 1.505 1.674
y3 1.105 1.223 1.355 1.505 1.677
y4 1.105 1.223 1.355 1.505 1.677
'
Question: Using Picard’s method find y(0.2). Given that y x y ; y 0 1
x
yn1 y0
x0
x yn dx
106
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x
yn1 1 x yn dx x0 0 , y0 1 ; n 0,1,2,3,4
x0
1st Approximation: (n = 0)
x
y1 1 x y0 dx
0
x
y1 1 x 1 dx
0
x
x2
y1 1 x
2 0
x2
y1 1 x
2
2nd Approximation: (n = 1)
x
y2 1 x y1 dx
0
x
y2 1 x 0.82 dx
0
x
x2
y2 1 0.82 x
2 0
x2
y2 1 0.82 x
2
3rd Approximation: (n = 2)
x
y3 1 x y2 dx
0
x
y3 1 x 0.856 dx
0
107
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
x
x2
y3 1 0.856 x
2 0
x2
y3 1 0.856 x
2
4th Approximation: (n = 3)
x
y4 1 x y3 dx
0
x
y4 1 x 0.848 dx
0
x
x2
y4 1 0.848 x
2 0
x2
y4 1 0.848 x
2
5th Approximation: (n = 4)
x
y5 1 x y4 dx
0
x
y5 1 x 0.850 dx
0
x
x2
y5 1 0.850 x
2 0
x2
y5 1 0.850 x
2
108
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: Using Picard’s method, obtained a solution up to 5th Approximation
to the equation y ' y x such that y(0) = 1. Check your answer by finding the
exact solution. Also find y(0.01) and y(0.2).
x
yn1 y0
x0
yn x dx
x
yn1 1 yn x dx x0 0 , y0 1 ; n 0,1,2,3, 4
x0
1st Approximation: (n = 0)
x
y1 1 y0 x dx
0
x
y1 1 1 x dx y0 1
0
x
x2 x2
y1 1 x 1 x
2 0 2
At x 0.1 y1 1.105
At x 0.2 y1 1.22
2nd Approximation: (n = 1)
x
y2 1 y1 x dx
0
x x
y2 1 1.105 x dx , y2 1 1.22 x dx
0 0
x x
x2 x2 x2 x2
y2 1 1.105 x 1 1.105 x , y2 1 1.22 x 1 1.22 x
2 0 2 2 0 2
x x
y3 1 1.1155 x dx , y3 1 1.264 x dx
0 0
x x
x2 x2 x2 x2
y3 1 1.1155x 1 1.1155x , y3 1 1.264x 1 1.264x
2 0 2 2 0 2
4th Approximation: (n = 3)
x
y4 1 y3 x dx
0
x x
y4 1 1.1166 x dx , y4 1 1.269 x dx
0 0
x x
x2 x2 x2 x2
y4 1 1.1166x 1 1.1166x , y4 1 1.269x 1 1.269x
2 0 2 2 0 2
5th Approximation: (n = 4)
x
y5 1 y4 x dx
0
x x
y5 1 1.1167 x dx , y5 1 1.274 x dx
0 0
x x
x2 x2 x2 x2
y5 1 1.1167x 1 1.1167 x , y5 1 1.274x 1 1.274x
2 0 2 2 0 2
y(0.1) = 1.1167
y(0.2) = 1.274
110
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Exact Values:
dy
y' yx
dx
dy
yx ____ i
dx
I .F e e x
1dx
dy
e x e x y e x x
dx
d ye x xe x
On integration
d ye xe
x x
x e x e x
ye x dx
1 1
ye x xe x e x dx
e x
ye x xe x c
1
ye x xe x e x c
Multiplying by e x
y x 1 ce x
1 = 01+c e0
1+1 = c c=2
111
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
y x 1 2e x
For check x = 0
y 0 1 2e0 1 2 1
y(0) = 1
Euler’s Method:
Consider an initial value problem
dy
F x, y ; y0 y x0 ____ i
dx
dy y x h y x
Lim
dx h0 h
dy y x h y x
____ ii
dx h
y x h y x
F x, y
h
y x h y x hF x, y
y x h y x hF x, y
112
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Question: With h = 0.1 Find the numerical solution on 0 < x < 1 by using
Euler’s method for y ' y 2 2 x x 4 ; y 0 0 Also compare your results with
the exact solution y x 2
ba b a 1 0
h n 10
n h 0.1
yn1 yn hF xn , yn
1st Approximation: (n = 0)
y1 y0 0.1 y02 2 x0 x04
y1 0 0.1 0 0 0 0
2nd Approximation: (n = 1)
4
y2 0 0.1 0 2 0.1 0.1 0.0019
3rd Approximation: (n = 2)
2 4
y3 0.0019 0.1 0.0019 2 0.2 0.2 0.042
113
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
4th Approximation: (n = 3)
2 4
y4 0.042 0.1 0.042 2 0.3 0.3 0.101
5th Approximation: (n = 4)
2 4
y5 0.101 0.1 0.101 2 0.4 0.4 0.179
6th Approximation: (n = 5)
2 4
y6 0.179 0.1 0.179 2 0.5 0.5 0.276
7th Approximation: (n = 6)
2 4
y7 0.276 0.1 0.276 2 0.6 0.6 0.391
8th Approximation: (n = 7)
2 4
y8 0.391 0.1 0.391 2 0.7 0.7 0.522
9th Approximation: (n = 8)
2 4
y9 0.522 0.1 0.522 2 0.8 0.8 0.645
114
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
10th Approximation: (n = 9)
2
y10 0.645 0.1 0.645 2 0.9 0.9 0.801
4
11th Approximation: (n = 10)
2
y11 0.801 0.1 0.801 2 1 1 0.965
4
Comparison with exact solution:
x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
' 2 4
y y 2x x 0 0.0019 0.042 0.101 0.179 0.276 0.391 0.522 0.645 0.801 0.965
Question: : With h = 0.1 Find the numerical solution on 0 < x < 2 by using
Euler’s method for y ' y3 8 x3 2 ; y 0 0 Also compare your results with
the exact solution y 2 x
yn1 yn hF xn , yn
115
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
1st Approximation: (n = 0)
y1 0 0.1 0 0 2 0.2
2nd Approximation: (n = 1)
3 3
y2 0.2 0.1 0.2 8 0.1 2 0.4
3rd Approximation: (n = 2)
3 3
y3 0.4 0.1 0.4 8 0.2 2 0.6
4th Approximation: (n = 3)
3 3
y4 0.6 0.1 0.6 8 0.3 2 0.8
5th Approximation: (n = 4)
3 3
y5 0.8 0.1 0.8 8 0.4 2 1
6th Approximation: (n = 5)
3 3
y6 1 0.1 1 8 0.5 2 1.2
116
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
7th Approximation: (n = 6)
3 3
y7 1.2 0.1 1.2 8 0.6 2 1.4
8th Approximation: (n = 7)
3 3
y8 1.4 0.1 1.4 8 0.7 2 1.6
9th Approximation: (n = 8)
3 3
y9 1.6 0.1 1.6 8 0.8 2 1.8
10th Approximation: (n = 9)
3
y10 1.8 0.1 1.8 8 0.9 2 2
3
11th Approximation: (n = 10)
3
y11 2 0.1 2 8 1 2 2.2
3
12th Approximation: (n = 11)
3
y12 2.2 0.1 2.2 8 1.1 2 2.4
3
117
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
13th Approximation: (n = 12)
3 3
y13 2.4 0.1 2.4 8 1.2 2 2.6
3 3
y14 2.6 0.1 2.6 8 1.3 2 2.8
15th Approximation: (n = 14)
3 3
y15 2.8 0.1 2.8 8 1.4 2 3
16th Approximation: (n = 15)
3 3
y16 3 0.1 3 8 1.5 2 3.2
17th Approximation: (n = 16)
3 3
y17 3.2 0.1 3.2 8 1.6 2 3.4
3 3
y18 3.4 0.1 3.4 8 1.7 2 3.6
118
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
19th Approximation: (n = 18)
3 3
y19 3.6 0.1 3.6 8 1.8 2 3.8
20th Approximation: (n = 19)
3 3
y20 3.8 0.1 3.8 8 1.9 2 4
21st Approximation: (n = 20)
3 3
y24 4 0.1 4 8 2 2 4.2
Comparison with exact solution:
x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
' 2 3
y y 8x 2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
y 2x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
y ' y 2 8 x3 2 2.6 2.8 3 3.2 3.4 3.6 3.8 4
y 2x 2.6 2.8 3 3.2 3.4 3.6 3.8 4
119
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Lecture # 13
dy
F x, y ; y0 y x0 ____ i
dx
dy y x h y x
Lim
dx h0 h
dy y x h y x
____ ii
dx h
y x h y x
F x, y
h
y x h y x hF x, y
y x h y x hF x, y
Algorithm II:
yn1 yn hF xn , yn1 ____ iii ; n 0,1, 2,....
This is called semi-implicit Euler’s method for solving the problem (i)
120
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
To implement implicit scheme, we introduce two steps (predictor corrector
technique) for solving initial value problems. Thus, from the scheme (iii) we
shall introduce the following two step scheme.
I: un yn hF ( xn , yn )
Example: With h = 0.1 find the numerical solution on 0 < x < 1 by using
semi-implicit Euler’s method for y ' y 2 2 x x 4 , y (0) 0 . Also compare your
results with the exact solution y x 2
ba b a 1 0
h n 10
n h 0.1
I: un yn hF ( xn , yn )
1st Approximation: (n = 0, x0 = 0, y0 = 0)
I: u0 y0 0.1( y02 2 x0 x04 ) u0 0 0.1 02 2 0 04 0
u1 0 0.1 02 2 0.1 0.1 0.01999
4
II: y2 y1 0.1(u12 2 x1 x14 )
2
y2 0 0.1 0.01999 2 0.1 0.1 0.0200
4
3rd Approximation: (n = 2, x2 = 0.2, y2 = 0.0200)
I: u2 y2 0.1( y22 2 x2 x24 )
2
u2 0.02 0.1 0.02 2 0.2 0.2 0.05988
4
II: y3 y2 0.1(u 22 2 x2 x24 )
2
y3 0.02 0.1 0.05988 2 0.2 0.2 0.06019
4
4th Approximation: (n = 3, x3 = 0.3, y3 = 0.06019)
I: u3 y3 0.1( y32 2 x3 x34 )
2
u3 0.06019 0.1 0.06019 2 0.3 0.3 0.1197
4
II: y4 y3 0.1(u 32 2 x3 x34 )
2
y4 0.06019 0.1 0.1197 2 0.3 0.3 0.1208
4
5th Approximation: (n = 4, x4 = 0.4, y4 = 0.1208)
I: u4 y4 0.1( y42 2 x4 x44 )
2
u4 0.1208 0.1 0.1208 2 0.4 0.4 0.1997
4
II: y5 y4 0.1(u 42 2 x4 x44 )
122
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
2 4
y5 0.1208 0.1 0.1997 2 0.4 0.4 0.2022
6th Approximation: (n = 5, x5 = 0.5, y5 = 0.2022)
I: u5 y5 0.1( y52 2 x5 x54 )
2 4
u5 0.2022 0.1 0.2022 2 0.5 0.5 0.300
II: y6 y5 0.1(u 52 2 x5 x54 )
2 4
y6 0.2022 0.1 0.3 2 0.5 0.5 0.3049
2 4
u6 0.3049 0.1 0.3049 2 0.6 0.6 0.4212
2 4
y7 0.3049 0.1 0.4212 2 0.6 0.6 0.4296
8th Approximation: (n = 7, x7 = 0.7, y7 = 0.4296)
I: u7 y7 0.1( y72 2 x7 x74 )
2 4
u7 0.4296 0.1 0.4296 2 0.7 0.7 0.5640
2 4
y8 0.4296 0.1 0.5640 2 0.7 0.7 0.5774
9th Approximation: (n = 8, x8 = 0.8, y8 = 0.5774)
I: u8 y8 0.1( y82 2 x8 x84 )
2 4
u8 0.5774 0.1 0.5774 2 0.8 0.8 0.7298
123
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
II: y9 y8 0.1(u 82 2 x8 x84 )
2
y9 0.5774 0.1 0.7298 2 0.8 0.8 0.7497
4
10th Approximation: (n = 9, x9 = 0.9, y9 = 0.7497)
I: u9 y9 0.1( y92 2 x9 x94 )
2
u9 0.7497 0.1 0.7497 2 0.9 0.9 0.9203
4
II: y10 y9 0.1(u 92 2 x9 x94 )
2
y10 0.7497 0.1 0.9202 2 0.9 0.9 0.9488
4
11th Approximation: (n = 10, x10 = 1 , y10 = 0.9488)
I: u10 y10 0.1( y102 2 x10 x104 )
2
u10 0.9488 0.1 0.9488 2 1 1 1.1388
4
2
II: y11 y1 0.1(u10 2 x10 x104 )
2
y11 0.9488 0.1 1.1388 2 1 1 1.1784
4
Comparison with exact solution:
x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
' 2 4
y y 2x x 0 0.02 0.0602 0.1208 0.2022 0.3049 0.4296 0.5774 0.7497 0.9488 1.1784
dy
F x, y ; y0 y x0 ____ i
dx
124
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
dy y x h y x
Lim
dx h0 h
dy y x h y x
____ ii
dx h
y x h y x
F x, y
h
y x h y x hF x, y
y x h y x hF x, y
Algorithm IV:
For given y0 y x0 , Find yn 1
To implement Algorithm IV, we shall propose the following two step scheme.
I: un yn hF ( xn , yn )
125
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
Modified Euler’s method (Trapezoid method)
Consider an initial value problem
dy
F x, y ; y0 y x0 ____ i
dx
xa '
f x f a f a f ' x
2
xa '
f x f a f a f ' x
2
Algorithm VI:
xn 1 xn '
f xn 1 f xn f xn f ' xn 1
2
h '
f xn 1 f xn f xn f ' xn1
2
h '
Or yn1 yn yn yn' 1
2
h
Or yn1 yn F xn , yn F xn1 , yn1 ; n 0,1, 2,....
2
I: un yn hF ( xn , yn )
127
Collected by: Muhammad Saleem Composed by: Muzammil Tanveer
NOTES FOR
NUMERICAL
METHODS
MUHAMMAD USMAN HAMID
PREFACE
In the beginning of university life I used only those books which were
recommended by my teachers, soon I realized, that books were not
enough to fulfill my requirements then I used every possible way to
get any information about my topics. For this purpose one of my best
helper was “GOOGLE” for this I’m very thankful to it. I also say thanks
to the writers of the books which I used.
UNIVERSITY OF SARGODHA
PUNJAB, PAKISTAN
(0323-6032785)
INTRODUCTION
NUMERICAL ANALYSIS
Numerical Analysis is the branch of mathematics that provides tools and methods for solving
mathematical problems in numerical form.
NUMERICAL ALGORITHM
A complete set of procedures which gives an approximate solution to a mathematical
problem.
STABLE ALGORITHM
Algorithm for which the cumulative effect of errors is limited, so that a useful result is
generated is called stable algorithm. Otherwise Unstable.
NUMERICAL STABILITY
Numerical stability is about how a numerical scheme propogate error.
ROUNDING
For ; f(x) is an element of “F” nearest to “x” and the transformation x f(x) is called
Rounding (to nearest).
LOCAL CONVERGENCE
An iterative method is called locally convergent to a root, if the method converges to root for
initial guesses sufficiently close to root.
REMARK
Rate of convergence for fixed point iteration method is linear.
Rate of convergence for Newton Raphson method is quadratic.
Rate of convergence for Secant method is Super linear.
ORDER OF CONVERGENCE OF THE SEQUENCE
Let (x0, x1,x2,.......)be a sequence that converges to a number “a” and set Ɛn=a - xn
If there exist a number “k” and a positive constant “c” such that
Then “k” is called order of convergence of the sequence and “c” the asymptotic error
constant.
CONSISTENT METHOD
PRECISION
Precision mean how close are the measurements obtained from successive iterations.
ACCURACY
Accuracy means how close are our approximations from exact value.
ERROR
Error is a term used to denote the amount by which an approximation fails to equal the exact
solution.
SOURCE OF ERRORS
Numerically computed solutions are subject to certain errors. Mainly there are three types of
errors
TRUNCATION ERRORS
Errors arise when approximations are used to estimate some quantity.
These errors corresponding to the facts that a finite (infinite) sequence of computational
steps necessary to produce an exact result is “truncated” prematurely after a certain number
of steps.
Error can be reduced by applying the same approximation to a larger number of smaller
intervals or by switching to a better approximation.
These are also called i.e. discarding all decimals from some decimals on.
RELATIVE ERRORS
If “ā” is an approximate value of a quantity whose exact value is “a” then relative error ( ) of
“ā” is defined by | |=
EXAMPLE
Hence =
REMARK
ABSOLUTE ERROR
If “ā” is an approximate value of a quantity whose exact value is “a” then the difference
“ =ā-a” is called absolute error of “a”.
ā =a +
EXAMPLE
ERROR BOUND
It is a number “β” for “ā” such that |ā-a|≤β i.e. | |≤β
PROBABLE ERROR
This is an error estimate such that the actual error will exceed the estimate with probability
one – half.
In other words, the actual error is as likely to be greater than the estimate as less. Since this
depends upon the error distribution, it is not an easy target and a rough substitute is often
used √ with “ ” the maximum possible error.
INPUT ERROR
Error arises when the given values (y0 =f(x0), y1, y2,..........yn) are inexact as experimental or
computed values usually are.
LOCAL ERROR
This is the error after first step.
i+1 = x(t0+h)-x1
The Local Error is the error introduced during one operation of the iterative process.
GLOBAL ERROR
This is the error at n-step.
n= x(tn) - xn
Note that the Global Error is not simply the sum of the Local Errors due to the non-linear
nature of many problems although often it is assumed to be so, because of the difficulties in
measuring the global error.
LTE =
ZERO OF MULTIPLICITY
A solution “p” of f(x) = 0 is a zero of multiplicity “m” of “f” if for “x ≠ p” we can write
f(x) = (x-p)m q(x) where “ ( ) ”
ALGEBRAIC EQUATION
The equation f(X) = 0 is called an algebraic equation if it is purely a polynomial in “x”.
e.g. x3+5x2-6x+3 = 0
TRANSCENDENTAL EQUATION
The equation f(x) = 0 is called transcendental equation if it contains Trigonometric, Inverse
trigonometric, Exponential, Hyperbolic or Logarithmic functions.e.g.
2. Complex roots occur in pair. i.e. (a+bі) and (a-bі) are roots of f(x)=0
3. If x = a is a root f(x)=0, a polynomial of degree “n” then (x-a) is factor of f(x)=0 on
dividing f(x) by (x-a) we obtain polynomial of degree (n-1).
DISCARTS RULES OF SIGNS
The number of positive roots of an algebraic equation f(x)=0 with the real coefficient cannot
exceed the number of changes in sign of the coefficient in f(x)=0.
Similarly, the number of negative roots of f(x)=0 cannot exceed the number of changes
in sign of the coefficient of f(-x) =0
e.g. -x3-3x2-4x-5=0 does not changes its sign, so it has no negative roots.
REMARK
There are two types of methods to find the roots of Algebraic and Transcendental equations.
(i) DIRECT METHODS (ii) INDIRECT (ITERATIVE) METHODS
DIRECT METHODS
1. Direct methods give the exact value of the roots in a finite number of steps.
2. These methods determine all the roots at the same time assuming no round off errors.
3. In the category of direct methods; Elimination Methods are advantageous because
they can be applied when the system is large.
OPEN METHODS
These methods require the initial estimation of the solution. e.g. Newton Raphson method.
The main disadvantage is, if it is not possible to bracket the root, the method cannot
applicable.
Intermediate value property suggests that the graph of “y=f(x)” crosses the x-axis between
these two points, therefore a root (say) “x=xr” lies between these two points.
REMARK
Always set your calculator at radian mod while solving Transcendental or Trigonometric
equations.
We can find the approximate value of the root of f(x)=0 by “Graphical method” or by
“Analytical method”.
Bisection method is one of the bracketing methods. It is based on the “Intermediate value
theorem”
The idea behind the method is that if f(x) C [a, b] and f(a).f(b)<0 then there exist a root
“c (a,b)” such that “f(c)=0”
This method also known as BOLZANO METHOD (or) BINARY SECTON METHOD.
ALGORITHM
For a given continuous function f(x)
1. Find a ,b such that f(a).f(b)<0 (this means there is a root “r (a,b)” such that f(r)=0
2. Let c = (mid-point)
3. If f(c)=0; done (lucky!)
4. Else; check if ( ) ( ) or ( ) ( )
5. Pick that interval [a, c] or [c, b] and repeat the procedure until stop criteria satisfied.
STOP CRITERIA
1. Interval small enough.
2. |f(cn)| almost zero
3. Maximum number of iteration reached
4. Any combination of previous ones
CONVERGENCE CRITERIA
No. of iterations needed in the bisection method to achieve certain accuracy
Consider the interval [a0 ,b0] ,, c0 = and let r (a0,b0) be a root then the error is
0 = |r-c0|≤
Denote the further intervals as [an,bn] for iteration number “n” then
n=|r-cn|≤ ≤ =
( )– ( ) ( )–
≤n ≤ n (which is required)
SOLUTION
X 2 4
f(x) -9 29
Use bisection method to find out the roots of the function describing to drag coefficient of
parachutist given by
SOLUTION
X 12 13 14 15
f(x) 6.670 3.7286 1.5687 -0.4261
Again f (14.5). f (15) <0 therefore root lie between 14.5 and 15
EXAMPLE
Explain why the equation e−x = x has a solution on the interval [0,1]. Use bisection to find the
root to 4 decimal places. Can you prove that there are no other roots?
SOLUTION
If f(x) = e−x − x, then f(0) = 1, f(1) = 1/e − 1 < 0, and hence a root is guaranteed by the
Intermediate Value Theorem. Using Bisection, the value of the root is x? = .5671.
Since f0(x) = −e−x − 1 < 0 for all x, the function is strictly decreasing, and so its graph can only
This method also known as REGULA FALSI METHOD,, CHORD METHOD ,, LINEAR
INTERPOLATION and method is one of the bracketing methods and based on intermediate
value theorem.
Like the bisection method we are not taking the mid-point of the given interval to determine
the next interval and converge faster than bisection method.
ALGORITHM
Given a function f(x) continuous on an interval [a0,b0] and satisfying f(a0).f(b0)<0 for all
n = 0,1,2,3………….. then Use following formula to next root
= ( )
f(xf) We can also use xr = xn+1 ,,, xf = xn ,,, xi = xn-1
( )
STOPING CRITERIA
1. Interval small enough.
2. |f(cn)| almost zero
3. Maximum number of iteration reached
4. Same answer.
5. Any combination of previous ones
EXAMPLE
Using Regula Falsi method Solve x3-9x+1 for roots between x=2 and x=4
SOLUTION
X 2 4
f(x) -9 29
Using formula
= xf - ( )
f(xf)
( )
Interval xr F(xr)
[2.4737,4] 2.7399 -3.0905
[2.7399,4] 2.8613 -1.326
[2.8613,4] 2.9111 -0.5298
[2.9111,4] 2.9306 -0.2062
[2.9306,4] 2.9382 -0.0783
[2.9382,4] 2.9412 -0.0275
[2.9412,4] 2.9422 -0.0105
[2.9422,4] 2.9426 -0.0037
[2.9426,4] 2.9439 0.0183
[2.9426,2.9439] 2.9428 -0.0003
[2.9426,2.9439] 2.9428 -0.0003
EXAMPLE
Using Regula Falsi method to find root of equation “ ” upto four decimal
places, after 3 successive approximations.
SOLUTION
X 0 1 2
F(X) - -0.5403 1.1093
Using formula
Xr= xf - ( )
f(xf)
( )
Interval xr F(xr)
[1,1.3275] 1.3037 0.0013
[1,1.3037] 1.3030 0.0001
KEEP IN MIND
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
We observe that f(xn-1), f(xn+1) are of opposite sign so, we can apply the above procedure to
successive approximations.
SECANT METHOD
The secant method is a simple variant of the method of false position which it is no longer
required that the function “f” has opposite signs at the end points of each interval generated,
not even the initial interval.
In other words, one starts with two arbitrary initial approximations and continues
with
( ) ( )
; n=1,2,3,4………….
( ) ( )
ADVANTAGES
1. No computations of derivatives
2. One f(x) computation each step
3. Also rapid convergence than Falsi method
Example 1 Use Secant method to find the root of the function f(x) = cosx + 2sinx + x2
to 5 decimal places. Don’t forget to adjust your calculator for “radians”.
Solution: A closed form solution for x does not exist so we must use a numerical technique. The
Secant method is given using the iterative equation:
, (1)
We will use x0 = 0 and x1 = −0.1 as our initial approximations and substituting in (1), we have
−0.51369. The continued iterations can be computed as shown in Table 1 which shows a stop at
iteration no. 5 since the error is x5−x4 < 10−5 resulting in a root of x∗ = −0.65926
Solution Since the Secant method is given using the iterative equation in (1). Starting with
an initial value x0 = 1 and x1 = 1.5, using (1) we can compute
Example-3: Use Secant method to find the root of the function f(x) = 3x + Sinx − ex
to 5 decimal places. Use x0 = 0 and x1 = 1.
Solution
Solution
Let f(x) = exp(−x) − 3log(x), to solve the given, it is now equivalent to find the
root of f(x). Using (1) we can compute
FIXED POINT
The real number “x” is a fixed point of the function “f” if f(x) =x
REMARK
Fixed point are roughly divided into three classes
ASYMPTOTICALLY STABLE: with the property that all nearby solutions converge to it.
UNSTABLE: Almost all of whose nearby solutions diverge away from the fixed point
FIXED POINT ITERATION METHOD
ALGORITHM
1. Consider f(x) =0 and transform it to the form x= (x)
2. Choose an arbitrary x0
3. Do the iterations xk+1= ( ) ; k=0,1,2,3……….
STOPING CRITERIA
Let “ ” be the tolerance value
1. | |≤
2. | ( )| ≤
3. Maximum number of iterations reached.
4. Any combination of above.
CONVERGENCE CRITERIA
Let “x” be exact root such that r=f(x) out iteration is xn+1 = f(xn)
( ) ( ) ( ) ( )( )
( ) ( )
OBSERVATIONS
If | ( )|< 1, error decreases, the iteration converges (linear convergence)
SOLUTION
Given that ( )
X 0 1 2
F(X) -4 -1.5403 1.4161
X0 =
SOLUTION
Given that
( )
X 0 1
F(X) 1 -9.6321
Now ( )
( )
Now ( )
The Newton Raphson method is a powerful technique for solving equations numerically. It is
based on the idea of linear approximation. Usually converges much faster than the linearly
convergent methods.
ALGORITHM
The steps of Newton Raphson method to find the root of an equation “f(x) =0” are
Evaluate ( )
Use an initial guess (value on which f(x) and ( ) becomes (+ve) of the roots “xn” to
estimate the new value of the root “xn+1” as
( )
( )
STOPING CRITERIA
CONVERGENCE CRITERIA
Newton method will generate a sequence of numbers (xn) ; n 0, that converges to the zero
“x*” of “f” if
“f” is continuous.
“x*” is a simple zero of “f”.
“x0” is close enough to “x*”
When the Generalized Newton Raphson method for solving equations is helpful?
To find the root of “f(x)=0” with multiplicity “p” the Generalized Newton formula is required.
Newton Raphson method requires the evaluation of derivatives of the function and this is not
always possible, particularly in the case of functions arising in practical problems.
In such situations Secant method helps to solve the equation with an approximation to the
derivatives.
In this method we draw tangent line to the point” P0(x0,f(x0))”. The (x,0) where this tangent
line meets x-axis is 1st approximation to the root.
Similarly, we obtained other approximations by tangent line. So, method also called Tangent
method.
Secant method needs two approximations x0,x1 to start, whereas Newton Raphson method
just needs one approximation i.e. x0
Newton Raphson method is an open method because initial guess of the root that is needed
to get the iterative method started is a single point. While other open methods use two initial
guesses of the root but they do not have to bracket the root.
INFLECTION POINT
For a function “f(x)” the point where the concavity changes from up-to-down
e.g. f(x) = (x-1)3 changes concavity at x=1,, Hence (1,0) is an Inflection point.
Eventually, it may lead to division by a number close to zero and may diverge.
The requirement of finding the value of the derivatives of f(x) at each approximation
is either extremely difficult (if not possible) or time consuming.
FORMULA DARIVATION FOR NR-METHOD
Given an equation “f(x) = 0” suppose “x0” is an approximate root of “f(x) = 0”
Let ( )
Then ( ) ( )
By Taylor theorem
( ) ( ) ( ) ( )
( ) ( ) ( )
( )
( )
( )
( )
( )
( )
Similarly ( )
( )
( )
( )
( )
SOLUTION
( )
( )
( )
Using formula ( )
at
( )
( )
( )
( ) ( )
Similarly
n ( ) ( )
2 0.531 -0.041 -3.110
3 0.518 -0.001 -3.043
4 0.518 -0.001 -3.043
Hence root is “0.518”
REMARK
1. If two are more roots are nearly equal, then method is not fastly convergent.
2. If root is very near to maximum or minimum value of the function at the point, NR-
method fails.
EXAMPLE
Apply Newton’s Raphson method for correct to two decimal places.
SOLUTION
( )
( )
( )
( )
( )
For interval
X 0 1 2 3 4 5 6 7
f(x) -4.77 -4.77 -4.17 -3.34 -2.36 -1.28 -0.10 1.15
Thus
( )
( )
( ) ( )
Similarly
n ( ) ( )
2 6.08 0.00 0.00
Hence root is “6.08”
GEOMETRICAL INTERPRETATION (GRAPHICS) OF NEWTON RAPHSON FORMULA
Suppose the graph of function “y=f(x)” crosses x-axis at then is the root of
equation ( ) .
CONDITION
Choose “x0” such that ( ) and ( ) have same sign. If ( ( )) is a point then slope
of tangent at ( ( )) ( ( )) ( )
( )
( ) ( )( ) ……………………………………………. (i)
(i) ( ) ( )( )
( )
( )
( )
( )
Which is first approximation to the root . If “P1” is a point on the curve corresponding
to “x1” then tangent at “P1” cuts x-axis at P1(x2, 0) which is still closer to “ ” than “x1”.
Therefore “x2” is a 2nd approximation to the root.
( )
( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
So
( ) ( ) ( ) ( )
( ) , -
( ( ))
( ( )) ( ) ( )
( )
( ( )) ( ( ))
( ) ( )
( ) Using in (3) we get
( ( ))
( ) ( )
| | ( ) ( ) ( ( ))
( ( ))
Which is required condition for convergence of Newton Raphson method, provided that
initial approximation “x0” is choose sufficiently close to the root and ( ) ( ) ( ) are
continuous and bounded in any small interval containing the root.
NEWTON RAPHSON METHOD IS QUADRATICALLY CONVERGENT
(OR)
( * ( )
If we can prove that where “k” is constant then “p” is called order of
convergence of iterative method then we are done.
( )
( )
( )
( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
, ( ) ( ) ( )- ( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( )
( ) ( )
( )
( )
( ), -
( )
( ) ( )
, -
( ) ( )
( ) ( )
, ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
Converges quadratically.
NEWTON RAPHSON EXTENDED FORMULA
Consider f(x) =0. Expand f(x) by Taylor series in the neighborhood of “x0”. We obtain after
retaining the first term only.
( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( )
( )
( )
( )
Again expanding f(x) by Taylor Series and retaining the second order term only
( )
( ) ( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( ) ( )
( )
( ) ( ) ( ) , - ( )
( )
( )
( ) ( ) ( ) 6 7 ( )
( )
( )
( ) ( ) ( ) , - ( )
( )
( ) , ( )-
( )
( )
, ( )-
This is Newton Raphson Extended formula. Also known as “Chebysheves formula of third
order”
NEWTON SCHEME OF ITERATION FOR FINDING THE SQUARE ROOT OF POSITION NUMBER
The square root of “N” can be carried out as a root of the equation
Here ( ) ( )
( ) ( )
( )
Using Newton Raphson formula ( )
( )
QUESTION
SOLUTION
Let √
Here ( ) ( ) ( )
X 0 1 2 3 4
F(x) -12 -11 -8 -3 4
Root lies between 3 and 4 and x0 =4
For n=2 0 1 0 1
Similarly
Hence √
NEWTON SCHEME OF ITERATION FOR FINDING THE “pth” ROOT OF POSITION NUMBER “N”
Consider
Here ( ) ( )
( ) ( )
( ) ( )
[ ]
( ) . /
( )
[( ) ] , - Required formula for pth root.
QUESTION
Obtain the cube root of 12 using Newton Raphson iteration.
SOLUTION
Consider
Here ( ) and ( ) ( )
For interval
X 0 1 2 3
F(x) -12 -11 -4 15
Root lies between 2 and 3 and x0=3
( ) ( )
, - 0 1 , -
( )
Put n=0 [ ] 0 1
( )
Similarly
Hence √
DARIVATION OF NEWTON RAPHSON METHOD FROM TAYLOR SERIES
Newton Raphson method can also be derived from Taylor series.
( )
( ) ( ) ( ) ( )
( ) ( ) ( )
( ) ( )( )
This gives
( )
( )
………………………………………………………………………………….
………………………………………………………………………………….
The system is said to be homogeneous if all the “ ” are zero. Otherwise it is said to be
non-homogeneous.
PARTIAL PIVOTING
In partial pivoting we interchange rows where pivotal element is zero.
(j>i) contains this element, then we interchange the “ith” equation with the “jth” equation and
proceed for elimination. This process is continued whenever pivotal coefficients become zero
during elimination.
TOTAL PIVOTING
In Full (complete, total) pivoting we interchange rows as well as column.
Because Pivoting made the difference between non-sense and a perfect result.
PIVOTAL COEFFICIENT
For elimination methods (Guass’s Elimination, Guass’s Jordan) the coefficient of the first
unknown in the first equation is called Pivotal Coefficient.
BACK SUBSTITUTION
The analogous algorithm for upper triangular system “Ax=b” of the form
∑
The solution “xi” is computed by
FORWARD SUBSTITUTION
The analogous algorithm for lower triangular system “Lx=b” of the form
∑
The solution “xi” is computed by
THINGS TO REMEMBER
Let the system is given
RANK OF A MATRIX
The rank of a matrix ‘A’ is equal to the number of non – zero rows in its echelon form or the
order of in the conical form of A.
KEEP IN MIND
TYPE I: when number of equations is equal to the number of variables and the system
is non – homogeneous then unique solution of the system exists if matrix ‘A’
is non- singular after applying row operation.
TYPE II: when number of equations is not equal (may be equal) to the number of
variables and the system is non – homogeneous then system has a solution if
TYPE III: a system of ‘m’ homogeneous linear equations in ‘n’ unknown has a
non- trivial solution if where ‘n’ is number of columns of A.
TYPE IV: if then infinite solution exists
TYPE V: if then no solution exists
GUASS ELIMINATION METHOD
ALGORITHM
In the first stage, the given system of equations is reduced to an equivalent upper
triangular form using elementary transformation.
In the second stage, the upper triangular system is solved using back substitution
procedure by which we obtain the solution in the order
REMARK
Guass’s Elimination method fails if any one of the Pivotal coefficient become zero. In such a
situation, we rewrite the equation in a different order to avoid zero Pivotal coefficients.
()
( )
( )
Using “z” in (iv) we get and Using “y”, “z” in (i) we get
Hence solution is
QUESTION
Solve the following system of equations by Guass’s Elimination method with partial pivoting.
SOLUTION
[ ]6 7 [ ]
[ ]6 7 [ ] * +6 7 [ ]
[ ]6 7 [ ] 6 7 [ ]
[ ]
2nd row cannot be used as pivot row as a22 =0, So interchanging the 2nd and 3rd row we get
6 7 [ ]
[ ]
SOLUTION
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ][ ] [ ]
[ ] [ ] and
[ ]
[ ][ ] [ ]
[ ] [ ]
[ ]
[ ] [ ] [ ]
,
GUASS JORDAN ELIMINATION METHOD
The method is based on the idea of reducing the given system of equations to a
diagonal system of equations where is the identity matrix, using row operation.
It is the verification of Gauss’s Elimination Method.
ALGORITHM
1) Make the elements below the first pivot in the augmented matrix as zeros, using the
elementary row transformation.
2) Secondly make the elements below and above the pivot as zeros using elementary
row transformation.
3) Lastly divide each row by its pivot so that the final matrix is of the form
[ ]
Partial Pivoting can also be used in the solution. We may also make the pivot as “1” before
performing the elimination.
ADVANTAGE/DISADVANTAGE
The Guass’s Jordan method looks very elegant as the solution is obtained directly. However,
it is computationally more expensive than Guass’s Elimination. Hence we do not normally use
this method for the solution of the system of equations.
The most important application of this method is to find inverse of a non-singular matrix.
ANSWER
[ ]
[ ]
[ ] ( ) ( )
[ ]
[ ] ( )
[ ]
[ ]
NOTE: In order to increase the accuracy of the result, it is essential to employ Partial
Pivoting. In the first column use absolutely largest coefficient as the pivotal coefficient (for
this we have to interchange rows if necessary). Similarly, for the second column and vice
versa.
ANSWER
[ ] [ ] * +
[ ]
[ ]
[ ] [ ]
[ ] [ ]
[ ]
[ ]
Hence
[ ]
QUESTION
ANSWER
[ ]
[ ]
[ ]
[ ]
* +
[ ]
[ ]
Hence
[ ]
QUESTION: Find if [ ]
a11= ( ) ( )= 3
a12= ( ) ( )= 1
a13= ( ) ( ) -2
a21= ( ) ( )= -2
a22=( ) ( )= -1
a23= ( ) ( )
a31= ( ) ( )
a32= ( ) ( )
a33= ( ) ( )
Thus [ ] [ ] [ ]
[ ] [ ]
If the upper triangle has the zeroes, the matrix is the Lower Heisenberg and vice versa.
SPARSE: A coefficient matrix is said to be sparse if many of the matrix entries are
known to be zero.
PERMUTATION MATRIX
For example [ ]
CONVERGENT MATRIX
( )
Consider * + * +
( )
(OR)
i.e. [ ]
UPPER TRIANGULATION MATRIX
A matrix having only zeros below the diagonal is called Upper Triangular matrix.
(OR)
i.e. [ ]
In linear Algebra this method factorizes a matrix as the product of a Lower Triangular matrix
and an Upper Triangular matrix.
ALGORITHM
For a given system of equations ∑
ADVANTAGE/LIMITATION (FAILURE)
1. Cholesky’s method widely used in Numerical Solution of Partial Differential Equation.
2. Popular for Computer Programming.
3. This method fails if in that case the system is Singular.
QUESTION
Solve the following system of equations using Crout’s Reduction Method
ANSWER
One of the
Let [ ]
diagonals of L or U
must be 1
Step I….
, - , -, -
[ ] [ ][ ]
[ ] [ ]
( )
( )
( * ( *
. / . /. /
[ ][ ] [ ]
[ ][ ] [ ]
. /
( * ( )
[ ][ ] [ ]
[ ][ ] [ ]
( *
. / . /. / ( )
,
DIAGONALLY DOMINANT SYSTEM
Consider a square matrix * + then system is said to be Diagonally Dominant if
∑ | |
If we remove equality sign, then “A” is called strictly diagonally dominant and ‘A’ has the
following properties
‘A’ is regular, invertible, its inverse exist and Ax = b has a unique solution.
Ax = b can be solved by Gaussian Elimination without Pivoting.
For example [ ] [ ]
‖ ‖ Iff x =0 then ‖ ‖
‖ ‖ ‖ ‖ Where ‘a’ is constant.
‖ ‖ ‖ ‖ ‖ ‖ i.e. Triangular inequality
INFINITY NORM ‖ ‖
The infinity (maximum) norm of a matrix ‘X’ is
‖ ‖
Consider [ ]
‖ ‖ [ ]
EUCLIDEAN NORM ‖ ‖
The Euclidean norm for the matrix ‘X’ is
‖ ‖ [∑ ]
We name it Euclidean norm because it represents the usual notation of distance from the
origin in case x is in
Take square of each
Consider
element, add &then
square root
[ ]
‖ ‖ ( )
USEFUL DEFINATIONS
Let “ ” be an approximate solution of the linear system “Ax =b” then
‖ ‖
The relative forward error is ‖ ‖
CONDITION NUMBER
For a square matrix ‘A’ condition number is the maximum possible error magnification factor
for solving Ax=b
( ) ‖ ‖‖ ‖
In practical application small change in the coefficient of the system of equations sometime
gives the large change in the solutions of system. This type of system is called ill-condition
linear system otherwise it is well-condition.
EXAMPLE: Consider 0 1 ‖ ‖
0 1 0 1
‖ ‖ (( ) ( ) ( ) ( ) )
EXAMPLE
If the system really is ill conditioned, there is no simple fix. Consider using Singular Value
Decomposition (SVD Ill-Conditioned Matrices
Consider systems x+y=2 THEN x + 1.001y = 2 x + 1.001y = 2.001
The system on the left has solution x = 2, y = 0 while the one on the right has solution
x = 1, y = 1. The coefficient matrix is called ill-conditioned because a small change in
the constant coefficients results in a large change in the solution. A condition number,
defined in more advanced courses, is used to measure the degree of ill-conditioning of a
matrix (≈ 4004 for the above).
.001x + y = 1 .001x + y = 1
−999y = −998 y = 1.00
The solution for the last system is x = 0,y = 1 which is wildly inaccurate (and the condition
number is ≈ 2002).
This problem can be avoided using partial pivoting. Instead of pivoting on the first
non-zero element, pivot on the largest pivot (in absolute value) among those available in the
column.
In the example above, pivot on the x, which will require a permute first:
ALGORITHM
We want to solve Ax=b writes it out
( )
( )
{ ( ( ) )
Or in compact form
( ∑ )
STOP CRITERIA
‖ ‖ ∑ | |
KEEP IN MIND
Jacobi method is valid only when all “ai’s” are non-zeroes. (OR) the elements can
rearrange for measuring the system according to condition. It is only possible if [A] is
invertible i.e. inverse of ‘A’ exist.
For fast convergence system should be diagonally dominant.
Must make two vectors for the computation “ ” and “ ”
System (method) is important for parallel computing.
QUESTION: Find the solution of the system of equation using Jacobi iterative method for
the first five iterations.
()
( )
( )
ANSWER
()
( )
( )
Taking initial guess as (0, 0, 0) and using formula
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( ) ( ) ( )
( ) ( )
Guass’s Seidel method is an improvement of Jacobi’s method. This is also known as method
of successive displacement.
ALGORITHM
In this method we can get the value of “ ”from first equation and we get the value of “ ”
by using “ ” in second equation and we get “ ” by using “ ” and “ ” in third equation
and so on.
Need only one vector for both and save memory space.
Not good for parallel computing.
Converge a bit faster than Jacobi’s.
How Jacobi method is accelerated to get Guass Seidel method for solving system of Linear
Equations.
QUESTION: Find the solutions of the following system of equations using Guass Seidel
method and perform the first five iterations.
ANSWER
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
EIGENVALUE , EIGNVECTOR
Suppose ‘A’ is a square matrix. The number ‘ is called an Eignvalue of ‘A’ if there exist a
non-zero vector ‘x’ such that
( ) ( )
CHARACTERISTIC POLYNOMIAL
The polynomial defined by ( ) ( ) is called characteristics polynomial.
SPECTRUM OF MATRIX
Write characteristic equation of
Set of all eignvalues of ‘A’ is called spectrum of ‘A’.
𝟒 𝟏 𝟏
SPECTRAL RADIUS [𝟐 𝟑 𝟏]
𝟐 𝟏 𝟓
The Spectral radius P(A) of a matrix ‘A’ is defined by
SPECTRAL NORM
∗
Let be the largest Eigenvalue of or ∗ where ∗
is the conjugate transpose of “ ”
then the spectral norm of the matrix “ ” is defined as
( ) √
DETERMINANT OF A MATRIX
The determinant of “ ” matrix is the product of its Eigenvalues.
TRACE OF A MATRIX
The sum of diagonal elements of “ ” matrix is called the Trace of matrix “A”
The power method is an iterative technique used to determine the dominant eigenvalue of a
matrix. i.e the eigenvalue with the largest magnitude.
ALGORITHIM
I. Choose initial vector such that largest element is unity.
II. This normalized vector V(0) ia premultiplied by ‘nxn’ matrix , -
III. The resultant vector is again normalized.
IV. Continues this process untill required accuracy is obtained.
( )
At this point result looks like , - ( ) ( )
Here ‘ ’ is the desired largest Eigen value and ‘ ( ) ’ is the corresponding EigenVector.
CONVERGENCE
Power method Converges linearly , meaning that during convergence, the error decreases by
a constant factor on each iteration step.
Question
How to find smallest Eigen value using power method?
Answer
Consider
, -
, -, - , -
, -
[ ]
Example
Find the Eigen value of largest modulus and the associated eigenvector of the matrix by
power method
, - [ ]
Solution:
( )
Let initial vector as ( )
You can take any other instead of ( ) which consist “0” and “1” like ( ) and
( )
( ) , -,
(1). Using Formula - for K=1
( ) ( ) ( )
, -, - [ ][ ] [ ] [ ] [ ]
( ) , -,
(2). Using Formula - for K=2
( ) , - ( ) ( )
[ ][ ] [ ] [ ]
( ) , -,
(3). Using Formula - for K=3
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) , -,
(4). Using Formula - for K=4
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) , -,
(5). Using Formula - for K=5
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) , -,
(6). Using Formula - for K=6
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) , -,
(7). Using Formula - for K=7
( ) ( ) ( )
=, - [ ][ ]=[ ]= 11.834 [ ]
QUESTION: Find the smallest Eigen value of the matrix by power method.
A=[ ]
SOLUTION
Put = ( )
a21= ( ) ( )= 21 a33= ( ) ( )
a22=( ) ( )= -7
[ ]
⌈ ⌉ ( ) ( ) ( )
⁄ ⁄ ⁄
( ) = ⁄ ⁄ ⁄
⁄ ⁄ ⁄
( )
Now Taking Initial vector as ( )
( ) ( ) ( )
=, - [ ] [ ] [ ]
[ ]
( ) ( )
=, - [ ][ ] [ ] [ ]
( ) ( )
=, - [ ][ ] [ ] [ ]
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
( ) ( ) ( )
=, - [ ][ ] [ ] [ ]
DIFFERENCE EQUATION
Equation involving differences is called Difference Equation.
Solution of differential equation will be sequence of values for which the equation is true
for some set of consecutive integer ‘k’.
Order of differential equation is the difference between the largest and smallest argument ‘k’
appearing in it.
DIFFERENCE OF A POLYNOMIAL
The “nth” difference of a polynomial of degree ‘n’ is constant, when the values of the
independent variable are given at equal intervals.
FINITE DIFFERENCES.
Let we have a following linear D. Equation
( ) ( ) ( ) ( )
Then the finite difference method consists of replacing every derivative in above Equation by
finite difference approximations such as the central divided difference approximations
( ) , ( ) ( )-
( ) , ( ) ( ) ( )-
( )
DIFFERENCE FORMULAS
Difference formulas for elementary functions somewhat parallel those of calculus. Example
include the following
The differences of a constant function are zero. In symbol where ‘c’ denotes a
constant.
( )
( )
PROVE THAT ( )
( ) ( )
REMEMBER
The fundamental idea behind finite difference methods is the replace derivatives in the
differential equation by discrete approximations, and evaluate on a grid to develop a system
of equations.
COLLOCATION
Like the finite difference methods, the idea behind the collocation is to reduce the boundary
value problem to a set of solvable algebraic equations.
However, instead of discretizing the differential equation by replacing derivative with finite
differences, the solution is given a functional from whose parameters are fit by the method.
CRITERION OF APPROXIMATION
Some methods are as follows
( ) ( ) ( )
In General: ( )
Remark ( )
CONSTRUCTION OF FORWARD DIFFERENCE TABLE (Also called Diagonal difference table)
X Y
QUESTION: Construct forward difference Table for the following value of ‘X’ and ‘Y’
X 0.1 0.3 0.5 0.7 0.9 1.1 1.3
Y 0.003 0.067 0.148 0.248 0.370 0.518 0.697
SOLUTION
X y
0.1 0.003
0.064
0.3 0.067 0.017
0.081 0.002
0.5 0.148 0.019 0.001
0.100 0.003 0
0.7 0.248 0.022 0.001 0
0.122 0.004 0
0.9 0.370 0.026 0.001
0.148 0.005
1.1 0.518 0.031
0.179
1.3 0.697
QUESTION
SOLUTION
( ) = - =( - )-( - )= -2 +
( ) = -
= - -( - )
= - -( - ) -( - )+( - )
= -4 + -4 +
QUESTION
Compute the missing values of and in the following table.
=6
=5
=1 =4 =13 =18 =24
SOLUTION
=1 ( )
=4 ( )
=13 ( )
=18 ( )
=24 ( )
( ) =4 and =5 5 =4
(1) =1 =0
(4)
(5)
Now since we know that
( ) ( )
( ) ( )
( ) ( )
( ) 5=6
( )
( )
( )
( )
( )
QUESTION
Show that the value of ‘yn’ can be expressed in terms of the leading value’ ‘and the
Binomial leading differences .....
SOLUTION
( ) {
Similarly
( )
( ) , ( )
Similarly
( ) ,
Also from (2) and (3) we can write as
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( ) In general ( )
Hence
= (OR) ( ) ( ) ( )
(OR)
SOLUTION
Since And (1)
Also (2)
(1)
= ( )
( ) ( )
In General ( )
i.e. ( )
OR ( ) ( ) OR
(OR) ( ) . / . / (OR)
TABLE
X Y
AVERAGE OPERATOR “
For y=f(x) Differential Operator defined as
[ ]
(OR) ( ) , . / . /- (OR) , -
( )
( )
= ( )
The definition of ‘ and ‘E’ Yields
[ ] , - ( )
Since ( )
( ) ( ) ( )
( ) ( ) ( )
, - ( )
( )
⁄ ⁄ ⁄ ⁄ ⁄
( )
( )
⁄ ⁄
. /
⁄ ⁄ ⁄ ⁄
4 5 4 5 . /
( )
⁄ ⁄
, - , - ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) , ( ) ( )- ( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( )
( )
⁄ ⁄ ⁄ ⁄
. /. / ( )
( )
( ) ( )
( )
⁄ ⁄ ⁄ ⁄
. /. / ( )
( )
( )
( )
( )
. / ()
( )
( )
( )
( ) ( )
() ( )
( ) ( ) , . /
√
( )
( ) ( ) ()
( ) ( )
√ √. /
√ √. / √ . /
4 5 4 54 5
√ ( )
() ( )
( ) ( ) ( )
√
( * ( *
6 7 * +
√
[ ]
[( ) ]
( )( ) ( )
, - ( ) . /
. /. / ( )
( )
( )
( * ( *
INTERPOLATION
ERROR OF APPROXIMATION
The deviation of g(x) from f(x) i.e. |f(x) – g (x)| is called Error of Approximation.
EXTRAPOLATION
The method of computing the values of ‘y’ for a given value of ‘x’ lying outside the table of
values of ‘x’ is called Extrapolation.
REMARK
A function is said to interpolate a set of data points if it passes through those points.
INVERSE INTERPOLATION
Suppose , - ( ) on [a, b] and has non- zero ‘p’ in *a, b+
Let be ‘n+1’ distinct numbers in [a, b] with ( ) for each
.
To approximate ‘p’ construct the interpolating polynomial of degree ‘n’ on the nodes
“y0, y1...........yn” for
Since “yk=f (xk)” and f (p) =0, it follows that (yk) = Xk and p = (0).
Where
Where
ERRORS IN POLYNOMIAL INTERPOLATION
Given a function f(x) and a set of distinct points and xi ϵ [a, b]
Let ( ) be a polynomial of degree ≤ n that interpolates f(x) at
i.e. ( ) ( )
Then Error define as ( ) ( )– ( )
REMARK
Sometime when a function is given as a data of some experiments in the form of tabular
values corresponding to the values of independent variable ‘X’ then
1. Either we interpolate the data and obtain the function “f(x)” as a polynomial in ‘x’ and
then differentiate according to the usual calculus formulas.
2. Or we use Numerical Differentiation which is easier to perform in case of Tabular form
of the data.
Given ( ) with Xi’s distinct there exists one and only one Polynomial ( ) of degree
such that ( )
PROOF
Existence Ok from construction.
For Uniqueness:
Assume we have two polynomials P(x), q(x) of degree n both interpolate the data i.e.
( ) ( )
Now let ( ) ( ) ( ) which will be a polynomial of degree n
Furthermore, we have ( ) ( ) ( )
So g(x) has ‘n+1’ Zeros. We must have g(x) 0. Therefor p(x) g(x).
REMEMBER: Using Newton’s Forward difference interpolation formula we find the n-degree
polynomial which approximate the function ( ) in such a way that and agrees
at ‘n+1’ equally Spaced ‘X’ Values. So that
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
Where
DERIVATION:
Let ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( )
, - ( )
( ) )
( ) ( ) ( ) ( )
X : 10 20 30 40 50
f(x) : 46 66 81 93 101
SOLUTION
Here ‘15’ nearest to starting point we use Newtown’s Forward Difference Interpolation.
X Y Y 2Y 3Y 4Y
10 46
20
20 66 -5
15 2
30 81 -3 -3
12 -1
40 93 -4
8
50 101
( ) ( )( ) ( )( )( )
( )
( )
( )( ) ( )( )( )
( ) ( )( ) ( ) ( )
( )( )( )( )
( )
( )
( ) ( )
( ) ( )( ) ( )
( ) ( ) ( ) ( )
DERIVATION: Let ( ) ( ) Then
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )( )
( ) 0 1 ( )
( )
( ) ( ) ( ) ( )
X 1 2 3 4 5 6 7 8
f(x) 1 8 27 64 125 216 343 512
SOLUTION
Since ‘7.5’ is nearest to End of table, So We use Newton’s Backward Interpolation.
X Y Y 2Y 3Y 4Y
1 1
7
2 8 12
19 6
3 27 18 0
37 6
4 64 24 0
61 6
5 125 30 0
91 6
6 216 36 0
127 6
7 243 42
169
8 512
Since
( ) ( )( )
Now
( )( ) ( )( )( )
( )( ) ( ) ( )
( )
LAGRANGE’S INTERPOLATION FORMULA
(polynomial of n-degree)
( ) 2
DERIVATION OF FORMULA
Let y=f (x) be a function which takes the values so we will obtain an
n-degree polynomial ( )= 0 + +…………..+ n
( ) ( )( ) ( )
( )( ) ( )
() ( )( )( ) ( )
Now
{ ( )( ) ( )
Put x= in (i)
( ) ( )( ) ( )
( )( ) ( )
() ( )( )( ) ( )
{ ( )( ) ( )
( )( ) ( )
,( )( ) ( )-
Now Put x=
( ) ( )( ) ( )
,( )( ) ( )-
Similarly
,( )( ) ( )-
( ) ∑
( )( ) ( )( ) ( )
Where ( ) ( )( ) ( )( ) ( )
ALTERNATIVELY DEFINE
( ) ( )( ) ( )
Then ( ) ( ),( )( ) ( )-
( ),( )( )( ) ( )-
( ),( )( )( ) ( )-
( ) ( )( ) ( )( ) ( )
( ) ( )( ) ( )( ) ( )
( ) ( ) ( )( ) ( )( ) ( )
( )
Then ( ) ( ) ( )
CONVERGENCE CRITERIA
( )
Assume a triangular array of interpolation nodes exactly ‘ ’ distinct nodes for
“
( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
( )
Further assume that all nodes are contained in finite interval , - then for each ‘n’ we
define
( ) ( ) ( )
( ) . / , -
(OR)
Lagrange’s interpolation converges uniformly on [a, b] for on arbitrary triangular ret if nodes
of ‘f’ is analytic in the circular disk ‘ ’ centered at and having radius ‘r’ sufficiently
large. So that ( ) holds.
𝑎 𝑏
2
PROVE THAT ∫ ( ) , ( ) ( )-
( ) ( ) ( ) ( ) ( )
∫ ( ) ∫ ( ) ( ) ∫ ( ) ( )
∫ ( ) ( )∫ ( ) ( )∫ ( )
Now ( ) ( )
∫ ( ) ( )∫ ( )∫
Let
∫ ( ) ∫ ( ) ( )∫
∫ ( ) ∫ ( ) ( )∫
( ) ( )∫ ( )∫
( ) ( )∫ ( )∫ ( ) ∫( ) ( ) ∫
( ) ( ) 6| | 7 ( )| |
( ) ( )( * ( )( * ( ) ( ) ( )
( ) ( ) ( ) , ( ) ( )- , ( ) ( )-
Since
Elegant formula ( )
Slow to compute, each ( ) is different ( )
Not flexible; if one change a point xj , or add an additional point xn+1 one must
re-compute all ( )
( ) ( ) ( ) Hence find ( )
X: =1 =3 =4 =6
Y: -3 0 30 132
ANSWER
Since ( ) + + +
( )( )( ) ( )( )( ) ( )( )( )
( ) ( )( )( )
+( )( )( )
+( )( )( )
+
( )( )( )
( )( )( )
( )
( )( )( ) ( )( )( ) ( )( )( ) ( )( )( )
( ) ( ) ( ) ( )
( )( )( ) ( )( )( ) ( )( )( ) ( )( )( )
( ) , -
Put to get ( )
( ) , ( ) ( ) - Y (5) =75
DIVIDED DIFFRENCE
, - ( )
, - , -
, - [ ]
The 2nd Order Difference is [ ]
[ ] [ ]
Similarly [ ]
DIVIDED DIFFERENCE IS SYMMETRIC
( )
[ ] [ ]
( )
( ) ( ) ( ) [ ] ( )( ) [ ]
( )( ) ( ) [ ]
DERIVATION OF FORMULA
Let ( ) ( ) ( )( )
…………….. ( )( )( ) ( ) ()
( ) ( ) , -
Put ( ) ( )
, - , -
, -
Put ( ) ( ) ( )( )
( ) ( )( )
( ) , - ( ) ( ) , -
( )( ) ( )( )
( ) ( ) ( ) , - ( ) , -( ) ( ) , -
( )( ) ( )( )
( ) , -* + ( ) , -( )
( )( ) ( )( )
[ ]( ) [ ]
, - ( )
( ) , - , -
, -
( ) ( ) ( )
Similarly , - , -
() , - ( ) , - ( )( ) ( ) , -
TABLE
st
X Y Order 2nd Order 3nd Order
, -
, -
, - , -
, -
, -
EXAMPLE:
X Y , - , - , -
10
Then ( ) ( ) ( )
,( ) - ,( ) - , -
( )
( )
[ ]
Therefore
Thus the first difference of a polynomial of degree ‘n’ is another polynomial of degree( )
Similarly ( )
,( ) - ,( ) - . ( )
( )
Similarly, we can find the higher order differences and every time we observe that the degree
of polynomial is reduced by one.
( )( ) ( )( ) ( )
Hence The ( ) and higher order differences of a polynomial of degree ‘n’ are zero.
NEWTION’S DIVIDED DIFERENCE FORMULA WITH ERROR TERM
( ) ( ) , - ()
, - , - ( ) , - ( )
, - , - ( ) , - ( )
, - , - ( ) , - ( )
, - , - ( ) , - ( )
( ) ( ) , - ( )( ) , -
( )( ) ( ) , -
( ) ( ) , - ( )( ) ( ) , -
( ) ( ) ( ) ()
( ) ( )( ) ( ) , -
Let ( ) ( ) , - ( ) ( )
And ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) , -
( )
( )
( ) ( ) ( )
( )
NEWTON’S DIVIDED DIFFERENCE AND LAGRANGE’S INTERPOLATION FORMULA
ARE IDENTICAL, PROVE!
Consider y = f(x) is given at the sample points
( ) , - ( )( ) , -
, - , -
( ). / ( )( )
( )( )
( ). / . /. /
( )( )
( ). / . /. 2( 3 /
)( )
( )( ) ( ) ( )
( ). / . /. 2 3 /
( )( )
( )( )
( ). / . /. 2( 3 /
)( )
( )( ) ( )( )( ) ( )( )
( ). / .( /
)( ) ( )( )( ) ( )
( )( ) ( )( ) ( )( )
( ). / .( /
)( ) ( )( ) ( )
( )( ) ( )( ) ( )( )
0 . / ( )(
1
)
0. / ( )( )
1 0( )( )
1
( )( ) ( ) ( )( ) ( )( ) ( )( ) ( )( )
0 ( )( )
1 0 ( )( )
1 0( )(
1
)
( )( ) ( )( ) ( )( )
0( )(
1
)
0( )( )
1 0( )(
1
)
( )
( )
( )
( )
NATURAL SPLINE
A cubic spline satisfying these two additional conditions
( ) ( )
HERMIT INTERPOLATION
In Hermit interpolation we use the expansion involving not only the function values but also
its first derivative.
( ) ∑ , ( )( )- , ( )- ( ), ( )-
EXAMPLE
Estimate the value of ( ) using hermit interpolation formula from the following data
X Y
1.00 1.00000 0.5000
1.10 1.04881 0.47673
Solution:
At first we compute ( )
( )
And ( )
( )
( ) ∑ , ( )( )- , ( )- ( ), ( )-
We find
( )
0 . /( )1 . / ( ) ( ). / ( )
0 . /( )1 . / ( ) ( ). / ( )
( )
NUMARICAL DIFFERENTIATION
0 1 ()
Therefore
( ) 0 1 ( ) ( )
( ) ( ) 0 ( ) ( ) ( ) ( ) 1
0 1
() 0 1
0 1 After solving
0 1
USING BACKWARD DIFFERENCE OPERATOR “ ”
Since ( ) ( )
Since ( ) therefore
0 1 ()
Now ( ) 0 1 ( ) ( )
( ) ( ) 0 ( ) ( ) ( ) ( ) 1
0 1
() 0 1
0 1
Since
( )
( ) ( )( ) ( )
( ) ( ) ( ) ( ) ()
( )
( )
() ( ) ( ) ( ) ( ) )
( )
0 ( ) ( ) 1. /
( )
6 ( ) ( ) 4 5 ( )
4 5 ( ) 7
( )
0 ( ) ( ) ( ) . / ( ) 1
( )
Equation ( )& ( ) are Newton’s backward interpolation formulae which can be used to
compute 1st and 2nd derivatives of a tabular function near the end of table similarly
Expression of Newton’s forward interpolation formulae can be derived to compute the 1st, 2nd
and higher order derivatives near the beginning of table of values.
Since
Since therefore
Also as therefore . /
. / . / . /
( ) . / ………..
. / . / . /
[ ( + ]
0 1 ()
Similarly, for second derivatives squaring (i) and simplifying
0 1
6 7 ( )
For calculating first and second derivative at an inter tabular form (point) we use (i) and (ii)
while 1st derivative can be computed by another convergent form for which can derived as
follows
Since 0 1
. /
We get
0 10 1
6 7
Therefore 0 1 ( )
Equation (ii) and (iii) are called STERLING FORMULAE for computing the derivative of a
tabular function. Equation (iii) can also be written as
0 1
STERLING FORMULA
Sterling’s formula is
( ) ( ) ( )
. / ( ) 0 1 ( )
Where
TWO AND THREE POINT FORMULAE
( ) ( )
Since ()
( ) ( )
Similarly ( )
Subtracting (i) and (iii) we get two point formulae for the first derivative
, ( ) ( ) ( )- ( )
And
, ( ) ( ) ( )- ( )
Similarly
( ) ( ) ( )
( )
By subtracting (iv) and (vi) we get three point formulae for computing the 2 nd derivative.
NUMERICAL INTEGRATION
The process of producing a numerical value for the defining integral ∫ ( ) is called
Numerical Integration. Integration is the process of measuring the Area under a function
plotted on a graph. Numerical Integration is the study of how the numerical value of an
integral can be found.
Suppose f(x) is given for equidistant value of ‘x’ say a=x0, x0+h,x0+2h …. x0+nh = b
Let the range of integration (a,b) is divided into ‘n’ equal parts each of width ‘h’ so that
“b-a=nh”.
By using fundamental theorem of numerical analysis It has been proved the general
quadrature formula which is as follows
( ) ( ) ( )
0 ( ) ( ) . / . / . /
( ) 1
Bu putting n into different values various formulae is used to solve numerical integration.
That are Trapezoidal Rule, Simpson’s 1/3, Simpson’s 3/8, Boole’s, Weddle’s etc.
f(x2)
F(x0) F(x1)
f(x0)
h h
O a=x0 B=x1 X
O a= x0 x1 b= x2 X
∫ ( )
( ) ( )
∫ ( ) , ( ) ( )-
∫ ( ) , ( ) ( )- , ( ) ( )- , ( ) ( ) ( )-
For n = 3 ∫ ( ) , ( ) ( )- , ( ) ( )- , ( ) ( )-
∫ ( ) , ( ) , ( ) ( )- ( )-
In general for n – trapezium the points will be and function will be
∫ ( ) , ( ) , ( ) ( ) ( )- ( )-
∫ ( ) , ( ) -
The accuracy will be increase if number of trapezium will be increased OR step size will be
decreased mean number of step size will be increased.
∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )
∫ ( ) [ ( )] [ ( )] [ ( )]
, ( )-
Therefore ∫ ( ) , ( ) - Where
SOLUTION
∫ ( ) , ( ) ( ) -
REMARK
In Simpson Rule number of trapezium must of Even and number of points must of Odd.
Consider a curve bounded by x = a and x = b and let ‘c’ is the mid-point between and such
that we have to find ∫ ( ) i.e. Area under the curve.
f(c )
f(a) f(b)
A B C
0 a c b X
Consider ()
Now
()
Now ∫ ( ) ∫ ( ) where y is small change
∫ ( ) ∫ 0 ( ) ( ) ( ) 1
∫ ( ) ∫ 0 ( ) ( ) ( )1
∫ ( ) | ( ) ( ) ( )| 0 ( ) ( )1 ()
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
∫ ( ) , ( ) * ( ) ( ) ( )+-
∫ ( ) , ( ) ( ) ( ) ( )-
∫ ( ) , ( ) ( ) ( )- , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) ( )- , -
For n = 4
∫ ( ) ∫ ( ) ∫ ( ) , - , -
∫ ( ) , ( ) -
In General
∫ ( ) , ( ) ( ) -
DERIVATION OF SIMPSON’S ( ) RULE (2nd method)
∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )
∫ ( ) , - , - , -
∫ ( ) , ( ) ( ) -
EXAMPLE
SOLUTION
√ ∫ , ( ) ( )-
∫ ( ) , - ( )
∫ ( ) , ( ) ( ) -
DERIVATION
∫ ( ) ∫ ( ) ∫ ( ) ∫ ( )
∫ ( ) , - , -
, -
∫ ( ) , ( ) ( ) -
REMARK: Global error in Simpson’s (1/3) and (3/8) rule are of the same order but if we
consider the magnitude of error then Simpson (1/3) rule is superior to Simpson’s (3/8) rule.
TRAPEZOIDAL AND SIMPSON’S RULE ARE CONVERGENT
If we assume Truncation error, then in the case of Trapezoidal Rule
( )
( ) Where is the exact integral and the approximation. If
then assuming “ ” bounded
( )
( )
ERROR TERMS
Rectangular Rule
( )
Trapezoidal Rule
( )
Simpson’s (1/3) Rule
( )
Simpson’s (3/8) Rule
( )
WEDDLE’S
In this method “n” should be the multiple of 6. Rather function will not applicable. This
method also called sixth order closed Newton’s cotes (or) the first step of Romberg
integration.
First and last terms have no coefficients and other move with 5, then 1, then 6.
( ) ( ) ( ) ( )
∫ ( ) [ ]
( ) ( ) ( ) ( )
EXAMPLE: for ∫ at n = 6
BOOLE’S RULE
The method approximate ∫ ( ) for ‘5’ equally spaced values. Rule is given by George
Bool. Rule is given by following formula
∫ ( ) , -
SOLUTION
Rule is also known as Mid-Point Rule. And is defined as follows for ‘n + 1’ points.
∫ ( ) , ( ) ( ) ( )-
In general ∫ ( ) ∑ ( )
REMEMBER
As we increased ‘n’ or decreased ‘h’ the accuracy improved and the approximate
solution becomes closer and closer to the exact value.
If ‘n’ is given, then use it. If ‘h’ is given, then we can easily get ‘n’.
If ‘n’ is not given and only ‘points’ are discussed, then ‘1’ less that points will be ‘n’.
For example, if ‘3’ points are given then ‘n’ will be ‘2’.
If only table is given, then by counting the points we can tell about ‘n’.one point will
be greater than ‘n’ in table.
EXAMPLE
SOLUTION
Here a = 1, b = 3 then
X 1 3/2 2 5/2 3
F(x) 1 4/9 1/4 4/25 1/5
∫ , ( ) ( ) ( )-
DOUBLE INTEGRATION
SOLUTION:
And
STEP – I: ( )
STEP –I I:
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
STEP –III:
∫ ∫ , ( )-
⁄ ⁄
QUESTION: Evaluate ∫ ∫ √ ( )
And
STEP – I: ( ) √ ( )
Y/X 0
STEP –I I:
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( * , ( * ( * [ ( * ( * ( *]
∫ ( * , ( * ( * [ ( * ( * ( *]
∫ 4 5 , 4 5 4 5 6 4 5 4 5 4 57
∫ . / , . / . / 0 . / . / . /1
⁄ ⁄
STEP –III: ∫ ∫ √ ( ) , ( )-
QUESTION: Evaluate ∬ where D is the square with comes at (1,1) , (2,1) ,(2,2) , (1,2)
Also
STEP – I: ( )
STEP –I I:
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
∫ ( ) , ( ) ( ) , ( ) ( ) ( )-
STEP –III:
∫ ∫ , ( )-
QUESTION: Evaluate ∫ ∫ ( ) by using Simpson (1/3) rule
Also
STEP – I: ( )
STEP –I I:
∫ ( ) , ( ) ( ) ( ) , ( ) ( )-
∫ ( ) , ( ) ( ) ( ) , ( ) ( )-
∫ ( ) , ( ) ( ) ( ) , ( ) ( )-
∫ ( ) , ( ) ( ) ( ) , ( ) ( )-
∫ ( ) , ( ) ( ) ( ) , ( ) ( )-
STEP –III:
∫ ∫ ( ) , ( )-
GUASSIAN QUADRATURE FORMULAE
∫ ( ) |( )|
∫ ( ) 0 ( ) ( ) ( ) ( )1 ()
( )
Since in Equation (iii), the constants a0, a1, a2, and a3 are arbitrary, the coefficients of a0, a1,
a2, and a3 are equal. This gives us four equations as follows
( ) ( )
. / ( )
( )
. / ( )
{. / ( )
we can find that the above four simultaneous nonlinear equations have only one acceptable
solution
, , . /. / , . /. /
√ √
Hence
∫ ( ) ≈ c1 f (x1) + c2 f (x2) 0. /. / 1 0. /. / 1
√ √
Method 2
We can derive the same formula by assuming that the expression gives exact values for the
individual integrals of∫ ,∫ ,∫ , and ∫ The reason the formula can also
be derived using this method is that the linear combination of the above integrands is a
general third order polynomial given by ( ) .
∫ ( ) ( )
∫ . / ( )
∫ . / ( )
{∫ . / ( )
These four simultaneous nonlinear equations can be solved to give a single acceptable
solution
, , . /. / , . /. /
√ √
Since two points are chosen, it is called the two-point Gauss quadrature rule. Higher point
versions can also be developed.
Higher point Gauss quadrature formulas
For example
∫ ( ) ≈ c1 f (x1) + c2 f (x2) + c3 f (x3) is called the three-point Gauss quadrature rule. The
coefficients c1, c2 and c3, and the function arguments x1, x2 and x3 are calculated by assuming
the formula gives exact expressions for integrating a fifth order polynomial
∫ ( )
General n -point rules would approximate the integral
∫ ( ) ∫ ∏
∫ ( ) ∑ ( )∫ ∏ ∫ ( ) ∏( )
( )
REMARK: Trapezoidal and Simpson’s Rule Are Close Newton Cotes formulae while
Rectangular Rule is Open Newton Cotes formula.
FORMULA DARIVATION
We shall approximate the given tabulated function by a polynomial ( ) and then
integrate this polynomial.
( )
And ( ) ( )
( ) ( )
Where ( ) ( )( ) ( ) ( )
Integrating (i) from w. r. to ‘x’
∫ ( ) ∫ ∑ ( ) ∫ , ( ) ( ) ( ) -
∫ ( ) ∑ ∫ ( ) ∑ .∫ ( )/ ∑ ∫ ( )
( ) ( )( ) ( )
( ) , ( )-, ( )- , ( )-
( ) ( )( ) ( )
( ) ( )( ) ( ) ( )
( )( ) ( )( ) ( )
So ( ) ( )( ) ( )( ) ( )
Now and ( )
When ( )
( ) If x = b, 𝑥0 = a
𝑥 𝑥0
𝑝
ℎ
𝑥 𝑥0
𝑝
𝑏 𝑎
𝑛
n=p
( ) ( )
( ) ( ) , ( )- , ( )- ( )
( ) ( ) ( ) ( ) , ( )- , ( )- ( )
( )( ) , -, - ( )
( ) , ( )( ) -( ) , ( )-
( )( ) , -, - ( )
( ) ( ) ( )
( )( ) , -, - ( ) ( )
( ) ( ) ( ) ( )
( ) ( )( ) , -, - ( )
( ) ( ) ( )( )
( ) ( )( ) , -, - ( )
( ) ( )
( )
( )
∫ ( )( ) ( )( ) ( )
( )
( )
∫ ( )( ) ( )( ) ( )
( )
( ) ( )( ) ( ) ( )
( ) ( ) ( )
Using ( ) in ( ) we get ( ) ( )
( ) ( ) ( ) ( )
Integrating both sides ∫ ( ) ∫ ( )
( )
( ) ∫ ( )( ) ( )
( )
( )
For trapezoidal rule put ( ) ∑ ( ) ( )
( )( )
( ) ( )
( ) ( ) ( )
∫ ( ) ∫ ∫ ∫ ( )( )
( ) ( )
( ) ( ) ( )
∫ ( ) ∫ ∫
( ) ( )
( )
∫ ( ),( ) ( )-
( ) ( )
∫ ( ) ∫ ∫ ∫ , ( )-
( ) ( )
∫ ( ) | | | | | |
( )
∫ ( ) As required.
()
( )
And ( ) ∫ ( )( ) ( )
( )
( )
Putting n = 2, k = 0 in (i) we get
( )
( )
∫ ( )( ) ∫ ( )( ) ∫ ( )
| | . /
( )
∫ ( ) ∫ ( ) | |
( )
( )
∫ ( ) | | . /
( )
( ) ( )
( ) ∫ ( )( ) ∫ ( )
( )
( ) ( )
( ) | | . /
( )
Error term is zero so we find Global error term
Now for n = 3
∫ ( ) ∑ ( ) ()
( )
If ( ) then (i) becomes
( )
∫ ( ) , -
DIFFERENTIAL EQUATIONS
DIFFERENTIAL EQUATION
It is the relation which involves the dependent variable, independent variable and
Differential co-efficient i.e.
( ) ( ) ( )
If all the conditions are given at the same value of the independent variable, then they are
called Initial conditions. If the conditions are given at the end points of the independent
variable, then they are called Boundary conditions.
Such that ( ) ( ) , -
CONVEX SET
LIPSCHITZ CONDITION
There exist constants and such that for any with whenever
( ) is continuous with ⌈ ( )⌉ , - and when the initial value
problem ( ) ( ) ( ) has a unique solution ( )
that satisfies ( ) ( ) , -
To solve then
then zero on the right hand side signifies that is a homogeneous differential equation.
Guess then
This is the auxiliary equation associated with the difference equation. Being a quadratic, the
auxiliary equation signifies that the difference equation is of second order.
√ √
The two roots are readily determined
for any substituting for in yield zero
for any substituting for in yield zero
√ √
This suggest a general solution . / . /
√ √
That is
√ √
√ √ √ √
Then general solution becomes . / . /
√ √
√ √
thus 6. / . / 7 as the final solution.
√
To solve
then
Guess then
The two roots are readily determined
. /
thus as the final solution.
. /
SECOND ORDER INHOMOGENEOUS LINEAR DIFFERENCE EQUATION
To solve
then
Now equation is solved in two steps. First, deem the right hand side to be zero and
solve as for the homogeneous case, ( ) . /
then augmented this solution by some f(n) which has to be given further thought:
( ) . / ( ) this augmented has to be such that when
substituted into the result is -1
Now using ( ) and applying initial conditions we get the general solution
. /
EXAMPLE: Solve by direct computation the second order initial value problem
SINGLE STEP METHODS: A series for ‘y’ in terms of power of ‘x’ form which the value of
‘y’ at a particular value of ‘x’ can be obtained by direct substitution
e.g. Taylor’s, Picard’s, Euler’s, Modified Euler’s Method.
MULTI - STEP METHODS: In multi-step methods, the solution at any point ‘x’ is obtained
using the solution at a number of previous points.
(Predictor- corrector method, Adam’s Moulton Method, Adam’s Bash forth Method)
REMARK
There are some ODE that cannot be solved using the standard methods. In such situations we
apply numerical methods. These methods yield the solutions in one of two forms.
(i) A series for ‘y’ in terms of powers of ‘x’ from which the value of ‘y’ can be obtained
by direct substitution. e.g. Taylor’s and Picard’s method
(ii) A set of tabulated values of ‘x’ and ‘y’. e.g. and Euler’s, Runge Kutta
Using these methods one step method clears after the first few steps.
IMPLICIT METHODS
Method that does not directly give a formula to the new approximation. A need to get it,
need an implicit formula for new approximation in term of known data. These methods also
known as close methods. It is possible to get stable 3 rd order implicit method.
EXPLICIT METHODS
Methods that not directly give a formula to new approximation and need an explicit formula
for new approximation in terms of known data. These are also called open methods.
Most Authorities proclaim that it is not necessary to go to a higher order method. Explain.
If more accuracy is required, then either a smaller step size. OR an adaptive method should
be used.
CONSISTENT METHOD: A multi-step method is consistent if it has order at least one “1”
( )
( ) ( ) ( ) ( ) ( )
( )
( ) ∑ This is called Taylor’s series of ‘f’ at ‘c’
If ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ∑ ( )
DISADVANTAGE
Need to explicit form of the derivatives of function. That is why not practical.
ERROR IN TAYLOR’S SERIES
( )
( ) ∑ ( ) Then first ( ) term is Taylor series
( ) ( )
( ) ( )∑ ( ) ( )
( )
CONVERGENCE
A Taylor’s series converges rapidly if ‘x’ is nears ‘c’ and slowly (or not at all) if ‘x’ is for away
form ‘c’.
EXAMPLE
Obtain numerically the solution of ( ) using Taylor Series method to
find ‘y’ at 1.3
SOLUTION
()
( ) [ ] ( )
where
therefore ( ) ,( ) ,( ) ,( ) ,...........................
( ) ( ) as required.
QUESTION: Explain Taylor Series method for solving an initial value problem described by
( ) () ( )
SOLUTION
Here we assume that f(x,y) is sufficiently differentiable with respect to ‘x’ and ‘y’ If y(x) is
exact solution of (i) we can expand by Taylor Series about the point and obtain
( )
( ) ( ) ( ) ( ) ( )
Since the solution is not known, the derivatives in the above expansion are known explicitly.
However ‘f’ is assume to be sufficiently differentiable and therefore the derivatives can be
obtained directly from the given differentiable equation itself. Noting that ‘f’ is an implicit
function of ‘y’ . we have ( )
( ) ( )
( ) ( ) ( ) ( )
Now ( ) ( )
( ) ( )
[ ]
Continuing in this manner we can express any derivative of ‘y’ in term of ( ) and its
partial derivatives.
EULER’S METHOD
To find the solution of the given Differential Equation in the form of a recurrence relation
( ) Is called Euler Method
FORMULA DERIVATION
Consider the differential Equation of the first order
( ) ( )
( ) () ( )
Given That ( ) ( ) ( ) ( )
() ( )( ) ( ) ( )
Similarly
( ) ( )
( ) ( )
( ) ( )
( )
SOLUTION: ( ) where
Then ( )
( ) ( ) as required.
MODIFIED EULER METHOD
( )
0 ( ) . /1
Method also known as Improved Euler method sometime known as Runge Kutta method of
order 2
( )
Let ‘M’ be an upper bound for ( ) on , - then , - ( )
( )
( )
, ( ) . /-
( )
0 ( ) . /1
( )
0 ( ) . /1
EXAMPLE: Obtain numerically the solution of ( ) ( ) using modified
Euler method to find ‘y’ at 0.2
( )
0 ( ) . /1
( )
Again using Euler’s method ( )
( )
0 ( ) . /1 ( )
Basic idea of Runge Kutta Methods can be explained by using Modified Euler’s Method by
Equation ( )
Here we find the slope not only at ‘ ’ but also at several other interior points and take the
weighted average of these slopes and add to ‘ ‘ to get ‘ ’.
ALSO RK-Approach is to aim for the desirable features for the Taylor Series method but with
the replacement of the requirement for the evaluation of the higher order derivatives with
the requirement to evaluate ( ) at some points with in the steps to ‘ ’
IMPORTANCE: Quite Accurate, Stable and easy to program but requires four slopes
evaluation at four different points of (x,y): these slope evaluations are not possible for
discretely sampled data points, because we have is what is given to us and we do not get to
choose at will where to evaluate slopes. These methods do not demand prior computation of
higher derivatives of ( ) as in Taylor Series Method. Easy for automatic Error control. Global
and local errors have same order in it.
Taylor Series needs to explicit form of derivative of ( ) but in RK-method this is not in
demand. RK-method very extensively used.
SECOND ORDER RUNGE KUTTA METHOD
i.e.
Also denote ( ) ( ) ( )
,, ( ) ,, ( )
IN ANOTHER WAY: If ( ) ( )
( ) Where ( ) . /
Where ( ) ( )
( ) ………………….….. ( ∑ )
SOLUTION: ( ) ()
If ‘h’ is not given then use by own choice for 4 – step take h=0.1 and for 1 – step take h=0.4
( ) Where ( ) . /
( ) . /
𝑥 𝑥0
𝑛
For n = 0; ( ) . / ℎ
n = 2 steps
() ( ) ( )
For n = 1; ( ) . /
() ( ) ( )
i.e.
Also denote ( ) ( ) ( )
,, ( ) . /
. / ( )
Then ( )
Is the formula for Runge Kutta method of order four and its error is ( )
ADVANTAGE OF METHOD
EXAMPLE: use 4th order RK method to solve ( ) from t =0 to 0.4 taking h = 0.4
SOLUTION: ()
Where ( ) , . / , . / ( )
( ) , . /
. / ( )
( ) ( ) ( )
( ) , . /
. / ( )
( ) ( ) ( )
( ) , . /
. / ( )
( ) ( ) ( )
THIS IS REQUIRED ANSWER
PREDICTOR - CORRECTOR METHODS
A predictor corrector method refers to the use of the predictor equation with one subsequent
application of the corrector equation and the values so obtained are the final solution at the
grid point.
PREDICTOR FORMULA
The explicit (open) formula used to predict approximation is called a predictor formula.
CORRECTOR FORMULA
The implicit (closed) formula used to determine is called Corrector Formula. This used
to improve
IN GENERAL
Explicit and Implicit formula are used as pair of formulas. The explicit formula is called
‘predictor’ and implicit formula is called ‘corrector’
Implicit methods are often used as ‘corrector’ and Explicit methods are used as ‘predictor’ in
predictor-corrector method. why?
Because the corresponding Local Truncation Error formula is smaller for implicit method on
the other hand the implicit methods has the inherent difficulty that extra processing is
necessary to evaluate implicit part.
REMARK
( )
Truncation Error of predictor is
( )
Local Truncation Error of Adam’s Predictor is
Truncation Error of Corrector is
Why Should one bother using the predictor corrector method When the Single step method
are of the comparable accuracy to the predictor corrector methods are of the same order?
A practical answer to that relies in the actual number of functional evaluations. For example,
RK - Method of order four, each step requires four evaluations where the Adams Moulton
method of the same order requires only as few as two evaluations. For this reason, predictor
corrector formulas are in General considerably more accurate and faster than single step
methods.
REMEMBER
In predictor corrector method if values of against the values of
are given the we use symbol predictor corrector method and in this
method we use given values of
MILNE’S METHOD
It’s a multi-step method. In General, Milne’s Predictor – Corrector pair can be written as
P: ( )
C: ( )
ALGORITHM
First predict the value of by above predictor formula.
Where derivatives are computed using the given differential equation itself.
Using the predicted value we calculate the derivative from the given
differential Equation.
Then use the corrector formula given above for corrected value of . Repeat this
process.
EXAMPLE: use Milne’s method to solve ( ) and compute y(0.8)
SOLUTION:
Now by using Euler’s method ( )
( ) ( )
( ) ( )
( ) ( )
Now
For n=1
For n=2
For n=3
P: ( )
( )
Now using corrector formula
C: ( )
( ) ( )
ADAM’S MOULTON METHOD
The predictor – corrector formulas for Adam’s Moulton method are given as follows
, -
, -
REMARK
( ) For m=0 ( )
Also in easy way we can find by using Euler’s method with some error as follows
Now by using Euler’s method ( )
( )
( )
( )
now as
Now using Adam’s Predictor formula
, -
( )
, - ( )
( )