0% found this document useful (0 votes)
53 views28 pages

Nonlinear Equations in One Variable

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views28 pages

Nonlinear Equations in One Variable

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Numerical Solution of

Nonlinear Equations
in One Variable
Introduction
Iterative Methods
• Fixed-point iteration
• Newton’s method
• Secant method
• Inclusion methods
– Bisection method
– Regula falsi
– Pegasus method
Iterative Methods
• No numerical procedure works for all equations
• The root depends on the guess
• Measurement of accuracy of estimate depends
on:
Ø Absolute Error: en = xn+1 − xn ≤ ε
xn+1 − xn
Ø Relative Error: dn = ≤ε
xn+1
Ø Error Ratio:
xn+1
rn ≅ →1.0
xn
• Mitigation of non-convergence
Fixed-Point Iteration
(Method of Successive Substitution)
Fixed-Point Iteration
(Graphical interpretation)

y
y = f (x)

x
The x-coordinate of the
intersection of y = x and
y=x
y y = f(x) is the value of
y = g (x) the root

x
Fixed-Point Iteration
(Example)

• Solve
f ( x ) = x 2 − 3x +1
• Solution:
Analytical: x = 2.618034 and 0.381966
4"

Fixed-point method: 3.5"

3"
g1 ( x ) = ( x 2 +1) 3 2.5"

2"

g2 ( x ) = 3−1 x 1.5"

1"

g3 ( x ) = 3x −1 0.5"

0"
0" 0.5" 1" 1.5" 2" 2.5" 3" 3.5" 4"
Fixed-Point Iteration
(Solution to Example)

g1 ( x ) = ( x 2 +1) 3 g2 ( x ) = 3−1 x g3 ( x ) = 3x −1
Fixed-Point Iteration
(Condition of Convergence)
Let r be the root of the equation
x = g (x)
By Taylor’s theorem
g(x) = g(r) + (x - r) g’(r) + …
But g(r) = r, so we have
g(x) – r ≈ (x - r) g’(r)

But we’re iterating g: that is, evaluating it repeatedly. It follows that if our
nth estimate is xn, then
xn+1 = g(xn)
So from the above, we have that
(xn+1 - r) ≈ g’(r)(xn – r)
In other words, the distance between our estimate and the root gets
multiplied by g’(r) (approximately) with each iteration. So the iteration
converges if
| g’(r) | < 1
Fixed-Point Iteration

Oscillating convergence Monotonic convergence


-1 < g’ < 0 0 < g’ < 1

Sufficient condition for convergence: |dg/dx| < 1


Fixed-Point Iteration
Fixed-Point Iteration
(General Procedure)

1. Find an interval I that you know to contain


the solution r to the equation.
2. Transform the equation to the form x =
g(x). Estimate g’(x) over the interval.
3. If |g’(x)| is less than 1 over the interval,
then use g.
4. Otherwise, choose a new transformation x
= g(x) and begin again.
Newton’s Method
Newton’s Method
Geometric Interpretation

Function
Tangent
Newton’s Method
Notes on Convergence
• Poor initial estimate
• Termination at a stationary point
• Difficulty in calculating the
derivative of a function
– Use secant method
Newton’s Method : Pseudo-code

Source: Engeln-Mullges G. and Uhlig F. Numerical Algorithms with C, Springer, © 1996


Newton’s Method
(Example)

• Solve
2
f ( x ) = x − 3x +1
• Analytical solution: x = 2.618034 and 0.381966
• Solution
Secant Method
Secant Method
Inclusion Methods
• Bisection method
• Regula falsi
• Secant method

Bolzano’s intermediate value theorem. If f is


continuous in I = [a, b] and f(a) ⋅ f(b) < 0, then f
has at least one root in s ∈ I.
Regula-Falsi for Simple Root
(False Position Method)
Regula-Falsi for Simple Root
(False Position Method)

Given a function f (x) continuous on an


interval [a,b] such that f (a) * f (b) < 0

Do
c = a*f(b) - b*f(a)
f(b) - f(a)
if f (a) * f (c) < 0 then
b=c
else a = c
while (convergence criterion is not satisfied)
Regula-Falsi Method
(Example)

Find the root of

3x + sin(x) – exp(x) = 0

Solution:
Bisection Method
Bisection Method
(Example)

• Solve
2
f ( x ) = x − 3x +1
• Analytical solution: x = 2.618034 and 0.381966
• Solution
Bisection Method : Pseudo-code

Source: Engeln-Mullges G. and Uhlig F. Numerical Algorithms with C, Springer, © 1996


Exercises
References
• Engeln-Mullges G. and Uhlig F. Numerical Algorithms with C,
Springer, © 1996
• Carnahan B., et.al., Applied Numerical Methods, John Wiley & Sons,
Inc., © 1969.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy