SlideShare a Scribd company logo
1 of 40
Download to read offline
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Roots of Nonlinear Equations
Open Methods
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• 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
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Fixed Point Iterations
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
 kk xgx 1
Fixed Point Iterations
• Solve   0xf
    0 xgxxf
• Rearrange terms:
• OR
 xgx 
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
In some cases you do not get a
solution!
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
First trial!
• No matter how close
your initial guess is,
the solution diverges!
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Second trial
• The solution converges
in this case!!
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Condition of Convergence
• For the fixed point iteration to ensure
convergence of solution from point xk we should
ensure that
  1' kxg
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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< es; end
6. Let xk=xk+1; goto step 4
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Newton-Raphson Method
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Newton’s Method: Line Equation
 1
21
21
' xf
xx
yy
m 



The slope of the
line is given by:
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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 
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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< es; end
5. Let xk=xk+1; goto step 4
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Secant Method
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Secant Method
21
21
2
2
xx
yy
xx
yy





The line equation
is given by:
  
2
21
221 0
xx
yy
yxx



Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Secant Method
  
2
21
221 0
xx
yy
yxx



 
21
212
2
yy
xxy
xx



  
   kk
kkk
kk
xfxf
xxxf
xx






1
1
1
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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< es; end
5. Let xk=xk+1; goto step 3
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Why Secant Method?
• The most important advantage over
Newton-Raphson method is that you do
not need to evaluate the derivative!
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Comparing with False-Position
• Actually, false
position ensures
convergence, while
secant method does
not!!!
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
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
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Roots of Nonlinear System
of Equations
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• Be able to use the fixed point method to
find a root of a set of equations
• Be able to use the Newton Raphson
method to find a root of a set equations
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Fixed Point Iterations
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
 kk xgx 1
Fixed Point Iterations
• Solve   0xf
    0 xgxxf
• Rearrange terms:
• OR
 xgx 
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
 
 kkk
kkk
yxgy
yxgx
,
,
21
11




Fixed Point Iterations (cont’d)
• Solve  
  0,
0,
2
1


yxf
yxf
   
    0,,
0,,
22
11


yxgyyxf
yxgxyxf• Rearrange terms:
• OR
 
 yxgy
yxgx
,
,
2
1


Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
 
  0573
010
2
2
2
1


xyyxf
xyxxf
Which has a solution x=2 & y=3
To get a fixed-point form, we may use:
With initial values: x=1.5 and y=3.5
kkk
k
k
k
yxy
y
x
x
2
1
2
1
357
10





38.245.3*5.1*357
214.2
5.3
5.110
2
1
2
1




y
x
7.42938.24*214.2*357
209.0
38.24
214.210
2
2
2
2





y
x
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Diverging !
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Another trial
k
k
k
kkk
x
y
y
yxx
3
57
10
1
1





861.2
5.1*3
5.357
179.25.3*5.110
1
1




y
x
05.3
179.2*3
861.257
941.1861.2*179.210
2
2




y
x
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Condition of Convergence
• For the fixed point iteration to ensure
convergence of solution from point xk and yk we
should ensure that
1
1
21
21












y
g
y
g
and
x
g
x
g
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Newton-Raphson Method
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Newton’s Method: Taylor’s Series
   1
21
1
' xf
xx
xf


 
 1
1
12
' xf
xf
xx 
 
 k
k
kk
xf
xf
xx
'
1 
Newton-Raphson
Iterative method
     112 ' xxfxfxf 
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Taylor’s series in multiple variables
   
   
y
f
y
x
f
xyxfyxf
y
f
y
x
f
xyxfyxf












22
112222
11
111221
,,
,,
 
 112
22
111
11
,
,
yxf
y
f
y
x
f
x
yxf
y
f
y
x
f
x














Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Manipulating the equations
 
 




































112
111
22
11
,
,
yxf
yxf
y
x
y
f
x
f
y
f
x
f
Solve for x and y then evaluate:






















y
x
y
x
y
x
1
1
2
2
Repeat until convergence
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
 
  0573
010
2
2
2
1


xyyxf
xyxxf
Which has a solution x=2 & y=3
With initial values: x=1.5 and y=3.5
Get the derivatives
xy
y
f
y
x
f
x
y
f
yx
x
f
613
2
222
11












Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
Using initial values: x=1.5 and y=3.5
Get the derivatives
5.3275.36
5.15.6
22
11












y
f
x
f
y
f
x
f






















625.1
5.2
5.3275.36
5.15.6
y
x
















656.0
536.0
y
x













844.2
036.2
2
2
y
x
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Conclusion
• The fixed point iteration and Newton-
Raphson methods were used to find a
solution for a system of nonlinear
equations in a manner similar to that used
in single-variable problems
Roots of Non-Linear Equations
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Homework #2
• Chapter 6, p 171, numbers:
6.1,6.2,6.3,6.16,6.17
• Homework due next week

More Related Content

What's hot

Lesson 14 a - parametric equations
Lesson 14 a - parametric equationsLesson 14 a - parametric equations
Lesson 14 a - parametric equations
Jean Leano
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equations
Ahmed Haider
 
Lesson 14 b - parametric-1
Lesson 14 b - parametric-1Lesson 14 b - parametric-1
Lesson 14 b - parametric-1
Jean Leano
 
First order linear differential equation
First order linear differential equationFirst order linear differential equation
First order linear differential equation
Nofal Umair
 
2. polynomial interpolation
2. polynomial interpolation2. polynomial interpolation
2. polynomial interpolation
EasyStudy3
 

What's hot (20)

03 open methods
03 open methods03 open methods
03 open methods
 
Lesson 14 a - parametric equations
Lesson 14 a - parametric equationsLesson 14 a - parametric equations
Lesson 14 a - parametric equations
 
Complex numbers 1
Complex numbers 1Complex numbers 1
Complex numbers 1
 
Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1
 
Initial Value Problems
Initial Value ProblemsInitial Value Problems
Initial Value Problems
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equations
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Interpolation of Cubic Splines
Interpolation of Cubic SplinesInterpolation of Cubic Splines
Interpolation of Cubic Splines
 
MILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHODMILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHOD
 
Numerical method for solving non linear equations
Numerical method for solving non linear equationsNumerical method for solving non linear equations
Numerical method for solving non linear equations
 
Lesson 6: Polar, Cylindrical, and Spherical coordinates
Lesson 6: Polar, Cylindrical, and Spherical coordinatesLesson 6: Polar, Cylindrical, and Spherical coordinates
Lesson 6: Polar, Cylindrical, and Spherical coordinates
 
Lesson 14 b - parametric-1
Lesson 14 b - parametric-1Lesson 14 b - parametric-1
Lesson 14 b - parametric-1
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
 
First order linear differential equation
First order linear differential equationFirst order linear differential equation
First order linear differential equation
 
Integration by parts
Integration by partsIntegration by parts
Integration by parts
 
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAPPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
 
Different types of functions
Different types of functionsDifferent types of functions
Different types of functions
 
Lesson 3: The Limit of a Function
Lesson 3: The Limit of a FunctionLesson 3: The Limit of a Function
Lesson 3: The Limit of a Function
 
Es272 ch3b
Es272 ch3bEs272 ch3b
Es272 ch3b
 
2. polynomial interpolation
2. polynomial interpolation2. polynomial interpolation
2. polynomial interpolation
 

Viewers also liked

Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
ZunAib Ali
 

Viewers also liked (20)

Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
Interpolation Methods
Interpolation MethodsInterpolation Methods
Interpolation Methods
 
Interpolation Generalized
Interpolation GeneralizedInterpolation Generalized
Interpolation Generalized
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
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
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)
 
Boundary Value Problems - Finite Difference
Boundary Value Problems - Finite DifferenceBoundary Value Problems - Finite Difference
Boundary Value Problems - Finite Difference
 
Numerical method
Numerical methodNumerical method
Numerical method
 
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZEAPPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
 
System of Initial Value Problems
System of Initial Value ProblemsSystem of Initial Value Problems
System of Initial Value Problems
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Newmark Time Integration
Newmark Time IntegrationNewmark Time Integration
Newmark Time Integration
 
bisection method
bisection methodbisection method
bisection method
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
What is Optimization
What is OptimizationWhat is Optimization
What is Optimization
 
Numerical Integration
Numerical IntegrationNumerical Integration
Numerical Integration
 
Application of Numerical method in Real Life
Application of Numerical method in Real LifeApplication of Numerical method in Real Life
Application of Numerical method in Real Life
 
Newton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systemsNewton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systems
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
 
FEM: 2-D Problems
FEM: 2-D ProblemsFEM: 2-D Problems
FEM: 2-D Problems
 

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
 
Future of Drones ITW'16
Future of Drones ITW'16Future of Drones ITW'16
Future of Drones ITW'16
 
Vibration Absorber
Vibration AbsorberVibration Absorber
Vibration Absorber
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Roots of Nonlinear Equations - Open Methods

  • 1. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Roots of Nonlinear Equations Open Methods
  • 2. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Objectives • 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. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Fixed Point Iterations
  • 4. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com  kk xgx 1 Fixed Point Iterations • Solve   0xf     0 xgxxf • Rearrange terms: • OR  xgx 
  • 5. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com In some cases you do not get a solution!
  • 6. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example
  • 7. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com First trial! • No matter how close your initial guess is, the solution diverges!
  • 9. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Second trial • The solution converges in this case!!
  • 10. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Condition of Convergence • For the fixed point iteration to ensure convergence of solution from point xk we should ensure that   1' kxg
  • 11. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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< es; end 6. Let xk=xk+1; goto step 4
  • 12. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Newton-Raphson Method
  • 13. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Newton’s Method: Line Equation  1 21 21 ' xf xx yy m     The slope of the line is given by:
  • 14. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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< es; end 5. Let xk=xk+1; goto step 4
  • 17. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Secant Method
  • 18. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Secant Method 21 21 2 2 xx yy xx yy      The line equation is given by:    2 21 221 0 xx yy yxx   
  • 19. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Secant Method    2 21 221 0 xx yy yxx      21 212 2 yy xxy xx          kk kkk kk xfxf xxxf xx       1 1 1
  • 20. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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< es; end 5. Let xk=xk+1; goto step 3
  • 21. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Why Secant Method? • The most important advantage over Newton-Raphson method is that you do not need to evaluate the derivative!
  • 22. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Comparing with False-Position • Actually, false position ensures convergence, while secant method does not!!!
  • 23. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 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
  • 24. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Roots of Nonlinear System of Equations
  • 25. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Objectives • Be able to use the fixed point method to find a root of a set of equations • Be able to use the Newton Raphson method to find a root of a set equations
  • 26. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Fixed Point Iterations
  • 27. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com  kk xgx 1 Fixed Point Iterations • Solve   0xf     0 xgxxf • Rearrange terms: • OR  xgx 
  • 28. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com    kkk kkk yxgy yxgx , , 21 11     Fixed Point Iterations (cont’d) • Solve     0, 0, 2 1   yxf yxf         0,, 0,, 22 11   yxgyyxf yxgxyxf• Rearrange terms: • OR    yxgy yxgx , , 2 1  
  • 29. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example     0573 010 2 2 2 1   xyyxf xyxxf Which has a solution x=2 & y=3 To get a fixed-point form, we may use: With initial values: x=1.5 and y=3.5 kkk k k k yxy y x x 2 1 2 1 357 10      38.245.3*5.1*357 214.2 5.3 5.110 2 1 2 1     y x 7.42938.24*214.2*357 209.0 38.24 214.210 2 2 2 2      y x
  • 30. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Diverging !
  • 31. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Another trial k k k kkk x y y yxx 3 57 10 1 1      861.2 5.1*3 5.357 179.25.3*5.110 1 1     y x 05.3 179.2*3 861.257 941.1861.2*179.210 2 2     y x
  • 32. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Condition of Convergence • For the fixed point iteration to ensure convergence of solution from point xk and yk we should ensure that 1 1 21 21             y g y g and x g x g
  • 33. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Newton-Raphson Method
  • 34. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Newton’s Method: Taylor’s Series    1 21 1 ' xf xx xf      1 1 12 ' xf xf xx     k k kk xf xf xx ' 1  Newton-Raphson Iterative method      112 ' xxfxfxf 
  • 35. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Taylor’s series in multiple variables         y f y x f xyxfyxf y f y x f xyxfyxf             22 112222 11 111221 ,, ,,    112 22 111 11 , , yxf y f y x f x yxf y f y x f x              
  • 36. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Manipulating the equations                                         112 111 22 11 , , yxf yxf y x y f x f y f x f Solve for x and y then evaluate:                       y x y x y x 1 1 2 2 Repeat until convergence
  • 37. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example     0573 010 2 2 2 1   xyyxf xyxxf Which has a solution x=2 & y=3 With initial values: x=1.5 and y=3.5 Get the derivatives xy y f y x f x y f yx x f 613 2 222 11            
  • 38. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example Using initial values: x=1.5 and y=3.5 Get the derivatives 5.3275.36 5.15.6 22 11             y f x f y f x f                       625.1 5.2 5.3275.36 5.15.6 y x                 656.0 536.0 y x              844.2 036.2 2 2 y x
  • 39. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Conclusion • The fixed point iteration and Newton- Raphson methods were used to find a solution for a system of nonlinear equations in a manner similar to that used in single-variable problems
  • 40. Roots of Non-Linear Equations Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Homework #2 • Chapter 6, p 171, numbers: 6.1,6.2,6.3,6.16,6.17 • Homework due next week