Академический Документы
Профессиональный Документы
Культура Документы
Roots of Equations
Chapter 5
Lecture 2
2
7/2/2015
Numerical Methods
7/2/2015
Bisection
b.
False position
3. Open methods
a.
b.
Newton-Raphson
c.
Secant methods
4
ax bx c 0
2
b b 2 4ac
x
2a
Difficult: nonlinear
ax 5 bx 4 cx3 dx 2 ex f 0 x ?
sin x x 0 x ?
a sin x b cos x cx 0 x ?
5
Graphical
Bisection
Solvers
Nonlinear Equation
FINDING ROOTS
Bracketing
False Position
Fixed-point
Open Methods
All Iterative
Newton-Raphson
Secant
6
1. GRAPHICAL APPROACH
Make a plot of the
function
and
observe where it crosses
the -axis, i.e.
0
Matlab
Excel
tanh
36
9.81
0.25
tanh
9.81
0
0.25
0
8
Root
36.0456 /
9
2. BRACKETING METHODS
(aka Two point methods for
finding roots)
Two initial guesses for the
root are required. These
guesses must bracket or be
on either side of the root.
If one root of a real and
continuous function,
is bounded by values
, and
then
0,
0.
10
2. BRACKETING
11
Exceptions
2. BRACKETING METHODS
12
2. BRACKETING METHODS
sin 10
cos 3
13
/2 .
14
4. Compare
/2 =0, then
/2 and terminate.
with
5. If
, stop. Otherwise
repeat the process.
xl xu
2
100%
xl xu
2
xl
or
xl xu
2
100%
xl xu
2
xu
15
16
Cons
Slow
Knowing and that
bound root
Multiple roots
No account is taken of
and
, if
is
closer to zero, it is likely
that root is closer to .
17
tanh
36
9.81
0.25
tanh
9.81
0
0.25
142.7376
0
18
50
200,
125
125
142.7376 125
142.7376
50
200
4.578
100%
0.409
12.43%
1.871
200
2
125
162.5
162.5
0.409 0.359
13.85%
0.147
162.5
2
19
143.75
0.709
1
:
2
2
:
2
: ,
2
20
200
,
2
.
50
150
log
log 2
=8 iterations
: 3.52050
21
to
in
half not accounting for the magnitudes of
and
. For example if
is closer to zero than
, then it is more likely that the root will be
closer to
2.B. FALSE-POSITIONPROCEDURE
Step 1: Find a pair of values of
such that
Step 2: Estimate the value of the root
from the following formula:
and evaluate
.
24
2.B. FALSE-POSITIONPROCEDURE
Step 3: Use the new point to replace one of the
original points, keeping the two points on opposite
sides of the axis.
If
If
If
0 then
0 then
25
Faster
Always converges for
a single root
26
tanh
36
9.81
0.25
tanh
9.81
0
0.25
142.7376
0
27
28
Slow convergence,
better use the
bisection method
29
Bisection
b.
False position
3. Open methods
a.
b.
Newton-Raphson
c.
Secant methods
30
OPEN METHODS
divergent
convergent
31
2,
2
or,
or,
2
1
4 2.200 1.909
5 1.909 2.048
6 2.048 1.977
7 1.977 2.012
8 2.012 1.994
9 1.994 2.003
10 2.003 1.999
11 1.999 2.001
32
FIXED-POINT-GRAPHICAL EXPLANATION
can be expressed
as a pair of equations:
1
(component
equations)
Plot them separately
Their point of intersection
is the solution.
2
33
FIXED-POINT:CONVERGENCE
Fixed-point iteration
converges if
g ( x) 1
34
NEWTON-RAPHSON METHOD
NEWTON-RAPHSON METHOD
Newton-Raphson is A
, ,
It may not always converge
There is no convergence
criteria
Sometimes, it may converge
very slowly
36
NEWTON-RAPHSON METHOD
Newton-Raphson iteration:
37
SECANT METHOD
1,2,3,
38
SECANT METHOD
39
xi
xi 1 xi f ( xi )
f ( xi xi ) f ( xi )
9.81 m/s2,
0.25 kg/m,
36 m/s at
40
4s
41
42
Roots of Polynomials
fn (x) ao a1x a2 x an x
2
43
SUMMARY
44