Short Notes: Numerical-Methods | Short Notes for Electrical Engineering - Electrical Engineering (EE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


 
 
 
 
 
NUMERICAL – METHODS 
 
Numerical solution of algebraic equations  
? Descartes Rule of sign: 
An equation f(x) = 0 cannot have more positive roots then the number of sign 
changes in f(x) & cannot have more negative roots then the number of sign 
changes in f(-x).  
 
? Bisection Method  
If a function f(x) is continuous between a & b and f(a) & f(b) are of opposite sign, 
then there  exists at least one roots of f(x) between a & b.  
 
   Since root lies between a & b, we assume root 
? ?
0
ab
x
2
?
?   
   If 
? ?
0
f x 0 ?  ; 
0
x is the root  
   Else, if 
? ?
0
fx has same sign as ? ? fa , then roots lies between 
0
x & b and  
   we assume  
   
0
1
xb
x
2
?
? , and follow same procedure otherwise if 
? ?
0
fx has same sign  
   as ? ? fb , then  
   root lies between a & 
0
x & we assume 
0
1
ax
x
2
?
?  & follow same procedure.  
   We keep on doing it, till ? ?
n
f x ?? , i.e.,  ? ?
n
fx is close to zero.  
   No. of step required to achieve an accuracy ?  
      
e
e
ba
log
n
log 2
? ??
??
?
??
?    
 
? Regula-Falsi Method  
   This method is similar to bisection method, as we assume two value 
1 0
x & x  
   such that  
    
? ? ? ?
1 0
f x f x 0 ? .    
      
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
     
                        If f(x 2)=0 then x 2 is the root , stop the process. 
Page 2


 
 
 
 
 
NUMERICAL – METHODS 
 
Numerical solution of algebraic equations  
? Descartes Rule of sign: 
An equation f(x) = 0 cannot have more positive roots then the number of sign 
changes in f(x) & cannot have more negative roots then the number of sign 
changes in f(-x).  
 
? Bisection Method  
If a function f(x) is continuous between a & b and f(a) & f(b) are of opposite sign, 
then there  exists at least one roots of f(x) between a & b.  
 
   Since root lies between a & b, we assume root 
? ?
0
ab
x
2
?
?   
   If 
? ?
0
f x 0 ?  ; 
0
x is the root  
   Else, if 
? ?
0
fx has same sign as ? ? fa , then roots lies between 
0
x & b and  
   we assume  
   
0
1
xb
x
2
?
? , and follow same procedure otherwise if 
? ?
0
fx has same sign  
   as ? ? fb , then  
   root lies between a & 
0
x & we assume 
0
1
ax
x
2
?
?  & follow same procedure.  
   We keep on doing it, till ? ?
n
f x ?? , i.e.,  ? ?
n
fx is close to zero.  
   No. of step required to achieve an accuracy ?  
      
e
e
ba
log
n
log 2
? ??
??
?
??
?    
 
? Regula-Falsi Method  
   This method is similar to bisection method, as we assume two value 
1 0
x & x  
   such that  
    
? ? ? ?
1 0
f x f x 0 ? .    
      
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
     
                        If f(x 2)=0 then x 2 is the root , stop the process. 
 
 
 
 
 
                        If f(x 2)>0 then  
                                          
? ? ? ?
? ? ? ?
?
?
?
2 0
0
02
3
2
f x .x f x .x
x
f x f x
 
                             If f(x 2)<0 then 
                                            
                                                   
? ? ? ?
? ? ? ?
?
?
?
1 2
2
21
3
1
f x .x f x .x
x
f x f x
 
                             Continue above process till required root not found 
 
? Secant Method  
           In secant method, we remove the condition that 
? ? ? ?
1 0
f x f x 0 ?  and it doesn’t   
           provide the guarantee for existence of the root in the given interval , So it is called  
           un reliable method . 
                           
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
 
                           and to compute x 3 replace every variable by its variable in x 2 
                
? ? ? ?
? ? ? ?
?
?
?
2 1
1
12
3
2
f x .x f x .x
x
f x f x
 
   Continue above process till required root not found 
 
 
? Newton-Raphson Method  
   
? ?
? ?
n
n
n1
n
fx
xx
f ' x
?
??   
Note : Since N.R. iteration method is quadratic convergence so to apply this formula   
            must exist. 
 
Order of convergence  
? Bisection               = Linear  
? Regula false          = Linear  
? Secant                   = superlinear  
? Newton Raphson  = quadratic 
 
 
? ?
f " x
Page 3


 
 
 
 
 
NUMERICAL – METHODS 
 
Numerical solution of algebraic equations  
? Descartes Rule of sign: 
An equation f(x) = 0 cannot have more positive roots then the number of sign 
changes in f(x) & cannot have more negative roots then the number of sign 
changes in f(-x).  
 
? Bisection Method  
If a function f(x) is continuous between a & b and f(a) & f(b) are of opposite sign, 
then there  exists at least one roots of f(x) between a & b.  
 
   Since root lies between a & b, we assume root 
? ?
0
ab
x
2
?
?   
   If 
? ?
0
f x 0 ?  ; 
0
x is the root  
   Else, if 
? ?
0
fx has same sign as ? ? fa , then roots lies between 
0
x & b and  
   we assume  
   
0
1
xb
x
2
?
? , and follow same procedure otherwise if 
? ?
0
fx has same sign  
   as ? ? fb , then  
   root lies between a & 
0
x & we assume 
0
1
ax
x
2
?
?  & follow same procedure.  
   We keep on doing it, till ? ?
n
f x ?? , i.e.,  ? ?
n
fx is close to zero.  
   No. of step required to achieve an accuracy ?  
      
e
e
ba
log
n
log 2
? ??
??
?
??
?    
 
? Regula-Falsi Method  
   This method is similar to bisection method, as we assume two value 
1 0
x & x  
   such that  
    
? ? ? ?
1 0
f x f x 0 ? .    
      
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
     
                        If f(x 2)=0 then x 2 is the root , stop the process. 
 
 
 
 
 
                        If f(x 2)>0 then  
                                          
? ? ? ?
? ? ? ?
?
?
?
2 0
0
02
3
2
f x .x f x .x
x
f x f x
 
                             If f(x 2)<0 then 
                                            
                                                   
? ? ? ?
? ? ? ?
?
?
?
1 2
2
21
3
1
f x .x f x .x
x
f x f x
 
                             Continue above process till required root not found 
 
? Secant Method  
           In secant method, we remove the condition that 
? ? ? ?
1 0
f x f x 0 ?  and it doesn’t   
           provide the guarantee for existence of the root in the given interval , So it is called  
           un reliable method . 
                           
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
 
                           and to compute x 3 replace every variable by its variable in x 2 
                
? ? ? ?
? ? ? ?
?
?
?
2 1
1
12
3
2
f x .x f x .x
x
f x f x
 
   Continue above process till required root not found 
 
 
? Newton-Raphson Method  
   
? ?
? ?
n
n
n1
n
fx
xx
f ' x
?
??   
Note : Since N.R. iteration method is quadratic convergence so to apply this formula   
            must exist. 
 
Order of convergence  
? Bisection               = Linear  
? Regula false          = Linear  
? Secant                   = superlinear  
? Newton Raphson  = quadratic 
 
 
? ?
f " x
 
 
 
 
 
 
? Numerical Integration  
 
    Trapezoidal Rule  
 
   ? ?
b
a
f x dx
?
 , can be calculated as  
    Divide interval (a, b) into n sub-intervals such that width of each interval  
      
? ? ba
h
n
?
?    
     we have (n + 1) points at edges of each intervals  
      
? ?
12 n
0
x ,x ,x ,..........,x    
 
    
? ? ? ? ? ?
nn
0 0 1 1
y f x ; y f x ,...................,y f x ? ? ?   
 
    ? ? ? ?
12
b
n
0 n 1
a
h
f x dx y 2 y y .......... y y
2
?
??
? ? ? ? ? ?
??
?
      
    
  
    Simpson’s  
1
3
 rd Rule  
    Here the number of intervals should be even 
     
ba
h
n
?
??
?
??
??
   
             ? ? ? ? ? ?
54 1 3 2
b
n
0 n 1 n 2
a
h
f x dx y 4 y y y .......... y 2 y y ................ y y
3
??
??
? ? ? ? ? ? ? ? ? ? ?
??
?
   
 
 
Simpson’s 
3
8
 th Rule  
   Here the number of intervals should be even  
   
? ?
??
?? ? ? ? ? ? ? ? ? ?
?? ?
b
n 4 5........ 0 1 2 n 1 3 6 9 n 3
a
3h
f x dx y 3(y y y y y ) 2(y y y ..............y ) y
8
    
  
   
 
 
Page 4


 
 
 
 
 
NUMERICAL – METHODS 
 
Numerical solution of algebraic equations  
? Descartes Rule of sign: 
An equation f(x) = 0 cannot have more positive roots then the number of sign 
changes in f(x) & cannot have more negative roots then the number of sign 
changes in f(-x).  
 
? Bisection Method  
If a function f(x) is continuous between a & b and f(a) & f(b) are of opposite sign, 
then there  exists at least one roots of f(x) between a & b.  
 
   Since root lies between a & b, we assume root 
? ?
0
ab
x
2
?
?   
   If 
? ?
0
f x 0 ?  ; 
0
x is the root  
   Else, if 
? ?
0
fx has same sign as ? ? fa , then roots lies between 
0
x & b and  
   we assume  
   
0
1
xb
x
2
?
? , and follow same procedure otherwise if 
? ?
0
fx has same sign  
   as ? ? fb , then  
   root lies between a & 
0
x & we assume 
0
1
ax
x
2
?
?  & follow same procedure.  
   We keep on doing it, till ? ?
n
f x ?? , i.e.,  ? ?
n
fx is close to zero.  
   No. of step required to achieve an accuracy ?  
      
e
e
ba
log
n
log 2
? ??
??
?
??
?    
 
? Regula-Falsi Method  
   This method is similar to bisection method, as we assume two value 
1 0
x & x  
   such that  
    
? ? ? ?
1 0
f x f x 0 ? .    
      
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
     
                        If f(x 2)=0 then x 2 is the root , stop the process. 
 
 
 
 
 
                        If f(x 2)>0 then  
                                          
? ? ? ?
? ? ? ?
?
?
?
2 0
0
02
3
2
f x .x f x .x
x
f x f x
 
                             If f(x 2)<0 then 
                                            
                                                   
? ? ? ?
? ? ? ?
?
?
?
1 2
2
21
3
1
f x .x f x .x
x
f x f x
 
                             Continue above process till required root not found 
 
? Secant Method  
           In secant method, we remove the condition that 
? ? ? ?
1 0
f x f x 0 ?  and it doesn’t   
           provide the guarantee for existence of the root in the given interval , So it is called  
           un reliable method . 
                           
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
 
                           and to compute x 3 replace every variable by its variable in x 2 
                
? ? ? ?
? ? ? ?
?
?
?
2 1
1
12
3
2
f x .x f x .x
x
f x f x
 
   Continue above process till required root not found 
 
 
? Newton-Raphson Method  
   
? ?
? ?
n
n
n1
n
fx
xx
f ' x
?
??   
Note : Since N.R. iteration method is quadratic convergence so to apply this formula   
            must exist. 
 
Order of convergence  
? Bisection               = Linear  
? Regula false          = Linear  
? Secant                   = superlinear  
? Newton Raphson  = quadratic 
 
 
? ?
f " x
 
 
 
 
 
 
? Numerical Integration  
 
    Trapezoidal Rule  
 
   ? ?
b
a
f x dx
?
 , can be calculated as  
    Divide interval (a, b) into n sub-intervals such that width of each interval  
      
? ? ba
h
n
?
?    
     we have (n + 1) points at edges of each intervals  
      
? ?
12 n
0
x ,x ,x ,..........,x    
 
    
? ? ? ? ? ?
nn
0 0 1 1
y f x ; y f x ,...................,y f x ? ? ?   
 
    ? ? ? ?
12
b
n
0 n 1
a
h
f x dx y 2 y y .......... y y
2
?
??
? ? ? ? ? ?
??
?
      
    
  
    Simpson’s  
1
3
 rd Rule  
    Here the number of intervals should be even 
     
ba
h
n
?
??
?
??
??
   
             ? ? ? ? ? ?
54 1 3 2
b
n
0 n 1 n 2
a
h
f x dx y 4 y y y .......... y 2 y y ................ y y
3
??
??
? ? ? ? ? ? ? ? ? ? ?
??
?
   
 
 
Simpson’s 
3
8
 th Rule  
   Here the number of intervals should be even  
   
? ?
??
?? ? ? ? ? ? ? ? ? ?
?? ?
b
n 4 5........ 0 1 2 n 1 3 6 9 n 3
a
3h
f x dx y 3(y y y y y ) 2(y y y ..............y ) y
8
    
  
   
 
 
 
 
 
 
 
 
 
 Truncation error 
  Trapezoidal Rule: 
? ?
?
?
??
2
bound
(b a)
T h max f"
12
    and order of error =2 
  Simpson’s 
1
3
 Rule: 
? ?
? ?
?
?
??
4
iv
bound
(b a)
T h max f
180
  and order of error =4 
            Simpson’s 
3
8
 th Rule: 
? ?
? ?
?
?
??
4
iv
bound
3(b a)
T h max f
n80
 and order of error =5 
            where ? ? ?
n 0
xx 
  Note : If truncation error occurs at n
th
 order derivative then it gives exact result while            
                        integrating the polynomial up to degree (n-1). 
 
Numerical solution of Differential equation  
  
  Euler’s Method  
   ? ?
dy
f x, y
dx
?     
   To solve differential equation by numerical method, we define a step size h  
   We can calculate value of y at  
? ?
0 0 0
x h, x 2h,..........,x nh ? ? ?    & not any  
   intermediate points.  
                       
? ?
i 1 i i i
y y hf x , y
?
??     
   
? ?
?
i i
y y x  ;   
? ?
i  1 i  1
y y x
? ?
?    ; 
?
??
i
i  1
X X h 
     
Modified Euler’s Method (Heun’s method) 
   
? ? ? ?
??
? ? ? ? ?
??
0 1 0 0 0 0
h
y y f x ,y f x h, y h
2
      
   
Runge – Kutta Method  
                             
10
y y k ??   
                               
? ?
4 1 2 3
1
k k 2k 2k k
6
? ? ? ? 
   ? ?
00 1
k hf x ,y ?   
   
1
00 2
k h
k hf x ,y
22
??
? ? ?
??
??
    
Page 5


 
 
 
 
 
NUMERICAL – METHODS 
 
Numerical solution of algebraic equations  
? Descartes Rule of sign: 
An equation f(x) = 0 cannot have more positive roots then the number of sign 
changes in f(x) & cannot have more negative roots then the number of sign 
changes in f(-x).  
 
? Bisection Method  
If a function f(x) is continuous between a & b and f(a) & f(b) are of opposite sign, 
then there  exists at least one roots of f(x) between a & b.  
 
   Since root lies between a & b, we assume root 
? ?
0
ab
x
2
?
?   
   If 
? ?
0
f x 0 ?  ; 
0
x is the root  
   Else, if 
? ?
0
fx has same sign as ? ? fa , then roots lies between 
0
x & b and  
   we assume  
   
0
1
xb
x
2
?
? , and follow same procedure otherwise if 
? ?
0
fx has same sign  
   as ? ? fb , then  
   root lies between a & 
0
x & we assume 
0
1
ax
x
2
?
?  & follow same procedure.  
   We keep on doing it, till ? ?
n
f x ?? , i.e.,  ? ?
n
fx is close to zero.  
   No. of step required to achieve an accuracy ?  
      
e
e
ba
log
n
log 2
? ??
??
?
??
?    
 
? Regula-Falsi Method  
   This method is similar to bisection method, as we assume two value 
1 0
x & x  
   such that  
    
? ? ? ?
1 0
f x f x 0 ? .    
      
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
     
                        If f(x 2)=0 then x 2 is the root , stop the process. 
 
 
 
 
 
                        If f(x 2)>0 then  
                                          
? ? ? ?
? ? ? ?
?
?
?
2 0
0
02
3
2
f x .x f x .x
x
f x f x
 
                             If f(x 2)<0 then 
                                            
                                                   
? ? ? ?
? ? ? ?
?
?
?
1 2
2
21
3
1
f x .x f x .x
x
f x f x
 
                             Continue above process till required root not found 
 
? Secant Method  
           In secant method, we remove the condition that 
? ? ? ?
1 0
f x f x 0 ?  and it doesn’t   
           provide the guarantee for existence of the root in the given interval , So it is called  
           un reliable method . 
                           
? ? ? ?
? ? ? ?
?
?
?
1 0
0
01
2
1
f x .x f x .x
x
f x f x
 
                           and to compute x 3 replace every variable by its variable in x 2 
                
? ? ? ?
? ? ? ?
?
?
?
2 1
1
12
3
2
f x .x f x .x
x
f x f x
 
   Continue above process till required root not found 
 
 
? Newton-Raphson Method  
   
? ?
? ?
n
n
n1
n
fx
xx
f ' x
?
??   
Note : Since N.R. iteration method is quadratic convergence so to apply this formula   
            must exist. 
 
Order of convergence  
? Bisection               = Linear  
? Regula false          = Linear  
? Secant                   = superlinear  
? Newton Raphson  = quadratic 
 
 
? ?
f " x
 
 
 
 
 
 
? Numerical Integration  
 
    Trapezoidal Rule  
 
   ? ?
b
a
f x dx
?
 , can be calculated as  
    Divide interval (a, b) into n sub-intervals such that width of each interval  
      
? ? ba
h
n
?
?    
     we have (n + 1) points at edges of each intervals  
      
? ?
12 n
0
x ,x ,x ,..........,x    
 
    
? ? ? ? ? ?
nn
0 0 1 1
y f x ; y f x ,...................,y f x ? ? ?   
 
    ? ? ? ?
12
b
n
0 n 1
a
h
f x dx y 2 y y .......... y y
2
?
??
? ? ? ? ? ?
??
?
      
    
  
    Simpson’s  
1
3
 rd Rule  
    Here the number of intervals should be even 
     
ba
h
n
?
??
?
??
??
   
             ? ? ? ? ? ?
54 1 3 2
b
n
0 n 1 n 2
a
h
f x dx y 4 y y y .......... y 2 y y ................ y y
3
??
??
? ? ? ? ? ? ? ? ? ? ?
??
?
   
 
 
Simpson’s 
3
8
 th Rule  
   Here the number of intervals should be even  
   
? ?
??
?? ? ? ? ? ? ? ? ? ?
?? ?
b
n 4 5........ 0 1 2 n 1 3 6 9 n 3
a
3h
f x dx y 3(y y y y y ) 2(y y y ..............y ) y
8
    
  
   
 
 
 
 
 
 
 
 
 
 Truncation error 
  Trapezoidal Rule: 
? ?
?
?
??
2
bound
(b a)
T h max f"
12
    and order of error =2 
  Simpson’s 
1
3
 Rule: 
? ?
? ?
?
?
??
4
iv
bound
(b a)
T h max f
180
  and order of error =4 
            Simpson’s 
3
8
 th Rule: 
? ?
? ?
?
?
??
4
iv
bound
3(b a)
T h max f
n80
 and order of error =5 
            where ? ? ?
n 0
xx 
  Note : If truncation error occurs at n
th
 order derivative then it gives exact result while            
                        integrating the polynomial up to degree (n-1). 
 
Numerical solution of Differential equation  
  
  Euler’s Method  
   ? ?
dy
f x, y
dx
?     
   To solve differential equation by numerical method, we define a step size h  
   We can calculate value of y at  
? ?
0 0 0
x h, x 2h,..........,x nh ? ? ?    & not any  
   intermediate points.  
                       
? ?
i 1 i i i
y y hf x , y
?
??     
   
? ?
?
i i
y y x  ;   
? ?
i  1 i  1
y y x
? ?
?    ; 
?
??
i
i  1
X X h 
     
Modified Euler’s Method (Heun’s method) 
   
? ? ? ?
??
? ? ? ? ?
??
0 1 0 0 0 0
h
y y f x ,y f x h, y h
2
      
   
Runge – Kutta Method  
                             
10
y y k ??   
                               
? ?
4 1 2 3
1
k k 2k 2k k
6
? ? ? ? 
   ? ?
00 1
k hf x ,y ?   
   
1
00 2
k h
k hf x ,y
22
??
? ? ?
??
??
    
 
 
 
    
 
                        
2
00 3
k h
k hf x ,y
22
??
? ? ?
??
??
   
   ? ?
0 0 3 4
k hf x h, y k ? ? ?    
     
   Similar method for other iterations         
 
                                 
Read More
69 docs

Up next

Up next

Explore Courses for Electrical Engineering (EE) exam
Related Searches

study material

,

Semester Notes

,

Previous Year Questions with Solutions

,

Short Notes: Numerical-Methods | Short Notes for Electrical Engineering - Electrical Engineering (EE)

,

Summary

,

Short Notes: Numerical-Methods | Short Notes for Electrical Engineering - Electrical Engineering (EE)

,

Extra Questions

,

ppt

,

Sample Paper

,

Free

,

pdf

,

video lectures

,

shortcuts and tricks

,

Exam

,

Short Notes: Numerical-Methods | Short Notes for Electrical Engineering - Electrical Engineering (EE)

,

Objective type Questions

,

Viva Questions

,

past year papers

,

Important questions

,

practice quizzes

,

MCQs

,

mock tests for examination

;