How to find the roots of Nonlinear Equations?
Newton-Raphson method is not the only way!
How about a system of nonlinear equations?
#WikiCourses
https://wikicourses.wikispaces.com/Topic+Roots+of+Nonlinear+Equations
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
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 0xf
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 0xf
0 xgxxf
• Rearrange terms:
• OR
xgx
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