Академический Документы
Профессиональный Документы
Культура Документы
Part 2
Why?
ax 2 bx c 0
b b 2 4 ac
x
2a
But
ax 5 bx 4 cx 3 dx 2 ex f 0 x ?
sin x x 0 x ?
PPS-UB-PAT-TM-2010
Chapter 5
Nonlinear Equation
Solvers
Bracketing
Graphical
Bisection
False Position
(Regula-Falsi)
Open Methods
Newton Raphson
Secant
All
AllIterative
Iterative
PPS-UB-PAT-TM-2010
Chapter 5
Bracketing Methods
(Or, two point methods for finding roots)
Chapter 5
Two initial guesses for the
Chapter 5
Figure 5.2
No answer (No
root)
Oops!! (two
roots!!)
PPS-UB-PAT-TM-2010
Chapter 5
Figure 5.3
Discontinuous
function. Need
special method
PPS-UB-PAT-TM-2010
Chapter 5
Figure 5.4b
MANY-MANY roots. What do we
do?
Figure 5.4a
f(x)=sin 10x+cos 3x
Figure 5.4c
PPS-UB-PAT-TM-2010
Chapter 5
3.
PPS-UB-PAT-TM-2010
Chapter 5 Chapter 5
xl xu
2
100 %
xl xu
2
xl
or
4.
Compare es with ea
5.
PPS-UB-PAT-TM-2010
Chapter 5
xl xu
2
100 %
xl xu
2
xu
Figure 5.6
PPS-UB-PAT-TM-2010
Chapter 5
Evaluation of Method
Pros
Easy
Always find root
Number of iterations
required to attain an
absolute error can be
computed a priori.
PPS-UB-PAT-TM-2010
Chapter 5
Cons
Slow
Know a and b that bound
root
Multiple roots
No account is taken of
f(xl) and f(xu), if f(xl) is
closer to zero, it is likely
that root is closer to xl .
10
After 1 iteration
After 2 iterations
L1=Lo/2
L2=Lo/4
After k iterations
Lk=Lo/2k
Lk
e a 100 %
x
PPS-UB-PAT-TM-2010
Chapter 5Chapter 5
ea es
11
es x
100 %
10
2
k
2
PPS-UB-PAT-TM-2010
2 k 2 10 4
ChapterChapter
5
5
k 14 .3 15
12
by xl and xu of f(x)=0,
then we can
approximate the
solution by doing a
linear interpolation
between the points [xl,
f(xl)] and [xu, f(xu)] to
find the xr value such
that l(xr)=0, l(x) is the
linear approximation of
f(x).
== > Fig. 5.12
PPS-UB-PAT-TM-2010
Chapter 5
13
Procedure
1.
2.
xl f u xu f l
xr
fu fl
and evaluate f(xr).
PPS-UB-PAT-TM-2010
Chapter 5
14
3.
== >
fl=f(xr)
== > fu=f(xr)
PPS-UB-PAT-TM-2010
Chapter 5
15
4.
Faster
Always converges for a single root.
PPS-UB-PAT-TM-2010
Chapter 5
16