SlideShare a Scribd company logo
1 of 26
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Roots of Nonlinear Equations
Open Methods
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Objectives
• Be able to use the fixed point method to
find a root of an equation
• Be able to use the Newton Raphson
method to find a root of an equations
• Be able to use the Secant method to find a
root of an equations
• Write down an algorithm to outline the
method being used
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Fixed Point Iterations
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
( )kk xgx =+1
Fixed Point Iterations
• Solve ( ) 0=xf
( ) ( ) 0=−= xgxxf
• Rearrange terms:
• OR
( )xgx =
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
In some cases you do not get a
solution!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
( ) 22
−−= xxxf Which has the solutions -1 & 2
To get a fixed-point form, we may use:
( ) 22
−= xxg
( ) x
xg 21+=
( ) 2+= xxg
( )
12
22
−
+
=
x
x
xg
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
First trial!
• No matter how close
your initial guess is,
the solution diverges!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Second trial
• The solution converges
in this case!!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Condition of Convergence
• For the fixed point iteration to ensure
convergence of solution from point xk we should
ensure that
( ) 1' <kxg
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Fixed Point Algorithm
1. Rearrange f(x) to get f(x)=x-g(x)
2. Start with a reasonable initial guess x0
3. If |g’(x0)|>=1, goto step 2
4. Evaluate xk+1=g(xk)
5. If (xk+1-xk)/xk+1< εs; end
6. Let xk=xk+1; goto step 4
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Newton-Raphson Method
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Newton’s Method: Line Equation
( )1
21
21
' xf
xx
yy
m =
−
−
=
The slope of the
line is given by:
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Newton’s Method: Line equation
( ) ( )1
21
1
' xf
xx
xf
=
−
( )
( )1
1
12
' xf
xf
xx −=
( )
( )k
k
kk
xf
xf
xx
'
1 −=+
Newton-Raphson
Iterative method
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Newton’s Method: Taylor’s Series
( ) ( ) ( )1121 ' xfxxxf −=−
( )
( )1
1
12
' xf
xf
xx −=
( )
( )k
k
kk
xf
xf
xx
'
1 −=+
Newton-Raphson
Iterative method
( ) ( ) ( ) ( )11212 ' xfxxxfxf −+≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Newton-Raphson Algorithm
1. From f(x) get f’(x)
2. Start with a reasonable initial guess x0
3. Evaluate xk+1=xk-f(xk)/f’(xk)
4. If (xk+1-xk)/xk+1< εs; end
5. Let xk=xk+1; goto step 4
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Convergence condition!
• Try to derive a convergence conditions
similar to that of the fixed point iteration!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Secant Method
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Secant Method
21
21
2
2
xx
yy
xx
yy
−
−
=
−
−
The line equation is
given by:
( )( )
2
21
221 0
xx
yy
yxx
−=
−
−−
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Secant Method
( )( )
2
21
221 0
xx
yy
yxx
−=
−
−−
( )
21
212
2
yy
xxy
xx
−
−
−=
( )( )
( ) ( )kk
kkk
kk
xfxf
xxxf
xx
−
−
−=
−
−
+
1
1
1
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Secant Algorithm
1. Select x1 and x2
2. Evaluate f(x1) and f(x2)
3. Evaluate xk+1
4. If (xk+1-xk)/xk+1< εs; end
5. Let xk=xk+1; goto step 3
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Why Secant Method?
• The most important advantage over
Newton-Raphson method is that you do
not need to evaluate the derivative!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Comparing with False-Position
• Actually, false
position ensures
convergence, while
secant method does
not!!!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Conclusion
• The fixed point iteration, Newton-Raphson
method, and the secant method in general
converge faster than bisection and false position
methods
• On the other hand, these methods do not ensure
convergence!
• The secant method, in many cases, becomes
more practical than Newton-Raphson as
derivatives do not need to be evaluated
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Homework #2
• Chapter 6, p 157, numbers:
6.1,6.2,6.3
• Homework due next week

More Related Content

What's hot

the fourier series
the fourier seriesthe fourier series
the fourier series
safi al amu
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
ZunAib Ali
 
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi method
andrushow
 

What's hot (20)

Fixed point iteration
Fixed point iterationFixed point iteration
Fixed point iteration
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
 
Bender schmidt method
Bender schmidt methodBender schmidt method
Bender schmidt method
 
numerical methods
numerical methodsnumerical methods
numerical methods
 
Introduction of Partial Differential Equations
Introduction of Partial Differential EquationsIntroduction of Partial Differential Equations
Introduction of Partial Differential Equations
 
21 simpson's rule
21 simpson's rule21 simpson's rule
21 simpson's rule
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONS
 
the fourier series
the fourier seriesthe fourier series
the fourier series
 
Stat 2153 Stochastic Process and Markov chain
Stat 2153 Stochastic Process and Markov chainStat 2153 Stochastic Process and Markov chain
Stat 2153 Stochastic Process and Markov chain
 
bisection method
bisection methodbisection method
bisection method
 
introduction to differential equations
introduction to differential equationsintroduction to differential equations
introduction to differential equations
 
ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
Series solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointSeries solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular point
 
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi method
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson method
 
Ch05 4
Ch05 4Ch05 4
Ch05 4
 
Cubic Spline Interpolation
Cubic Spline InterpolationCubic Spline Interpolation
Cubic Spline Interpolation
 
Bracketing Methods
Bracketing MethodsBracketing Methods
Bracketing Methods
 

Viewers also liked

09 numerical differentiation
09 numerical differentiation09 numerical differentiation
09 numerical differentiation
Mohammad Tawfik
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
dicosmo178
 

Viewers also liked (8)

Applied numerical methods lec11
Applied numerical methods lec11Applied numerical methods lec11
Applied numerical methods lec11
 
09 numerical differentiation
09 numerical differentiation09 numerical differentiation
09 numerical differentiation
 
00 introduction
00 introduction00 introduction
00 introduction
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integration
 
Es272 ch6
Es272 ch6Es272 ch6
Es272 ch6
 
Mechanics of Aircraft Structures solution manual C.T. Sun 2nd ed
Mechanics of Aircraft Structures solution manual C.T. Sun 2nd edMechanics of Aircraft Structures solution manual C.T. Sun 2nd ed
Mechanics of Aircraft Structures solution manual C.T. Sun 2nd ed
 

Similar to 03 open methods

09 numerical integration
09 numerical integration09 numerical integration
09 numerical integration
Mohammad Tawfik
 
08 numerical integration 2
08 numerical integration 208 numerical integration 2
08 numerical integration 2
Mohammad Tawfik
 
08 numerical integration
08 numerical integration08 numerical integration
08 numerical integration
Mohammad Tawfik
 
11 initial value problems system
11 initial value problems   system11 initial value problems   system
11 initial value problems system
Mohammad Tawfik
 
08 interpolation lagrange
08 interpolation   lagrange08 interpolation   lagrange
08 interpolation lagrange
Mohammad Tawfik
 
PRESENT.pptx this paper will help the next
PRESENT.pptx this paper will help the nextPRESENT.pptx this paper will help the next
PRESENT.pptx this paper will help the next
seidnegash1
 

Similar to 03 open methods (20)

09 numerical integration
09 numerical integration09 numerical integration
09 numerical integration
 
04 gaussmethods
04 gaussmethods04 gaussmethods
04 gaussmethods
 
13 weightedresidual
13 weightedresidual13 weightedresidual
13 weightedresidual
 
08 numerical integration 2
08 numerical integration 208 numerical integration 2
08 numerical integration 2
 
08 numerical integration
08 numerical integration08 numerical integration
08 numerical integration
 
11 initial value problems system
11 initial value problems   system11 initial value problems   system
11 initial value problems system
 
07 interpolation
07 interpolation07 interpolation
07 interpolation
 
08 interpolation lagrange
08 interpolation   lagrange08 interpolation   lagrange
08 interpolation lagrange
 
07 interpolationnewton
07 interpolationnewton07 interpolationnewton
07 interpolationnewton
 
Secant Method
Secant MethodSecant Method
Secant Method
 
06 regression
06 regression06 regression
06 regression
 
Secant Iterative method
Secant Iterative methodSecant Iterative method
Secant Iterative method
 
Automated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phaseAutomated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phase
 
BKS-MidsemPPT.pptx
BKS-MidsemPPT.pptxBKS-MidsemPPT.pptx
BKS-MidsemPPT.pptx
 
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...
 
PRESENT.pptx this paper will help the next
PRESENT.pptx this paper will help the nextPRESENT.pptx this paper will help the next
PRESENT.pptx this paper will help the next
 
勾配法
勾配法勾配法
勾配法
 
Maths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayMaths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K Mukhopadhyay
 
CPP.pptx
CPP.pptxCPP.pptx
CPP.pptx
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 

More from Mohammad Tawfik

More from Mohammad Tawfik (20)

Supply Chain Management for Engineers - INDE073
Supply Chain Management for Engineers - INDE073Supply Chain Management for Engineers - INDE073
Supply Chain Management for Engineers - INDE073
 
Supply Chain Management 01 - Introduction
Supply Chain Management 01 - IntroductionSupply Chain Management 01 - Introduction
Supply Chain Management 01 - Introduction
 
Supply Chain Management 02 - Logistics
Supply Chain Management 02 - LogisticsSupply Chain Management 02 - Logistics
Supply Chain Management 02 - Logistics
 
Supply Chain Management 03 - Inventory Management
Supply Chain Management 03 - Inventory ManagementSupply Chain Management 03 - Inventory Management
Supply Chain Management 03 - Inventory Management
 
Creative problem solving and decision making
Creative problem solving and decision makingCreative problem solving and decision making
Creative problem solving and decision making
 
Digital content for teaching introduction
Digital content for teaching introductionDigital content for teaching introduction
Digital content for teaching introduction
 
Crisis Management Basics
Crisis Management BasicsCrisis Management Basics
Crisis Management Basics
 
DISC Personality Model
DISC Personality ModelDISC Personality Model
DISC Personality Model
 
Training of Trainers
Training of TrainersTraining of Trainers
Training of Trainers
 
Effective Delegation Skills
Effective Delegation SkillsEffective Delegation Skills
Effective Delegation Skills
 
Train The Trainer
Train The TrainerTrain The Trainer
Train The Trainer
 
Business Management - Marketing
Business Management - MarketingBusiness Management - Marketing
Business Management - Marketing
 
Stress Management
Stress ManagementStress Management
Stress Management
 
Project Management (CAPM) - Integration
Project Management (CAPM) - IntegrationProject Management (CAPM) - Integration
Project Management (CAPM) - Integration
 
Project Management (CAPM) - The Framework
Project Management (CAPM) - The FrameworkProject Management (CAPM) - The Framework
Project Management (CAPM) - The Framework
 
Project Management (CAPM) - Introduction
Project Management (CAPM) - IntroductionProject Management (CAPM) - Introduction
Project Management (CAPM) - Introduction
 
The Creative Individual
The Creative IndividualThe Creative Individual
The Creative Individual
 
Introduction to Wind Energy
Introduction to Wind EnergyIntroduction to Wind Energy
Introduction to Wind Energy
 
Finite Element for Trusses in 2-D
Finite Element for Trusses in 2-DFinite Element for Trusses in 2-D
Finite Element for Trusses in 2-D
 
Future of Drones ITW'16
Future of Drones ITW'16Future of Drones ITW'16
Future of Drones ITW'16
 

03 open methods

  • 1. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Roots of Nonlinear Equations Open Methods
  • 2. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Objectives • Be able to use the fixed point method to find a root of an equation • Be able to use the Newton Raphson method to find a root of an equations • Be able to use the Secant method to find a root of an equations • Write down an algorithm to outline the method being used
  • 3. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Fixed Point Iterations
  • 4. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik ( )kk xgx =+1 Fixed Point Iterations • Solve ( ) 0=xf ( ) ( ) 0=−= xgxxf • Rearrange terms: • OR ( )xgx =
  • 5. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik In some cases you do not get a solution!
  • 6. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example
  • 7. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example ( ) 22 −−= xxxf Which has the solutions -1 & 2 To get a fixed-point form, we may use: ( ) 22 −= xxg ( ) x xg 21+= ( ) 2+= xxg ( ) 12 22 − + = x x xg
  • 8. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik First trial! • No matter how close your initial guess is, the solution diverges!
  • 9. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Second trial • The solution converges in this case!!
  • 10. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Condition of Convergence • For the fixed point iteration to ensure convergence of solution from point xk we should ensure that ( ) 1' <kxg
  • 11. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Fixed Point Algorithm 1. Rearrange f(x) to get f(x)=x-g(x) 2. Start with a reasonable initial guess x0 3. If |g’(x0)|>=1, goto step 2 4. Evaluate xk+1=g(xk) 5. If (xk+1-xk)/xk+1< εs; end 6. Let xk=xk+1; goto step 4
  • 12. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Newton-Raphson Method
  • 13. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Newton’s Method: Line Equation ( )1 21 21 ' xf xx yy m = − − = The slope of the line is given by:
  • 14. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Newton’s Method: Line equation ( ) ( )1 21 1 ' xf xx xf = − ( ) ( )1 1 12 ' xf xf xx −= ( ) ( )k k kk xf xf xx ' 1 −=+ Newton-Raphson Iterative method
  • 15. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Newton’s Method: Taylor’s Series ( ) ( ) ( )1121 ' xfxxxf −=− ( ) ( )1 1 12 ' xf xf xx −= ( ) ( )k k kk xf xf xx ' 1 −=+ Newton-Raphson Iterative method ( ) ( ) ( ) ( )11212 ' xfxxxfxf −+≈
  • 16. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example
  • 17. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Newton-Raphson Algorithm 1. From f(x) get f’(x) 2. Start with a reasonable initial guess x0 3. Evaluate xk+1=xk-f(xk)/f’(xk) 4. If (xk+1-xk)/xk+1< εs; end 5. Let xk=xk+1; goto step 4
  • 18. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Convergence condition! • Try to derive a convergence conditions similar to that of the fixed point iteration!
  • 19. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Secant Method
  • 20. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Secant Method 21 21 2 2 xx yy xx yy − − = − − The line equation is given by: ( )( ) 2 21 221 0 xx yy yxx −= − −−
  • 21. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Secant Method ( )( ) 2 21 221 0 xx yy yxx −= − −− ( ) 21 212 2 yy xxy xx − − −= ( )( ) ( ) ( )kk kkk kk xfxf xxxf xx − − −= − − + 1 1 1
  • 22. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Secant Algorithm 1. Select x1 and x2 2. Evaluate f(x1) and f(x2) 3. Evaluate xk+1 4. If (xk+1-xk)/xk+1< εs; end 5. Let xk=xk+1; goto step 3
  • 23. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Why Secant Method? • The most important advantage over Newton-Raphson method is that you do not need to evaluate the derivative!
  • 24. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Comparing with False-Position • Actually, false position ensures convergence, while secant method does not!!!
  • 25. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Conclusion • The fixed point iteration, Newton-Raphson method, and the secant method in general converge faster than bisection and false position methods • On the other hand, these methods do not ensure convergence! • The secant method, in many cases, becomes more practical than Newton-Raphson as derivatives do not need to be evaluated
  • 26. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Homework #2 • Chapter 6, p 157, numbers: 6.1,6.2,6.3 • Homework due next week