Professional Documents
Culture Documents
2a Roots of Equations One Equation
2a Roots of Equations One Equation
2a Roots of Equations One Equation
Topic 2
2
06/18/2024
TOPICS COVERED FROM CHAPTER 1 & 4
1. Why numerical methods?
2. Mathematical Modelling concept
3. Error Analysis:
Numerical Methods
a. Significant figures
b. Accuracy and precision
c. Error definitions
i. For known true value
ii. For approximations
d. Major errors
i. Round off
ii. Truncation
3
WHAT WILL BE COVERED FROM CHAPTER
06/18/2024
5
b b 2 4ac
ax bx c 0
2
x
2a
Difficult: nonlinear
ax5 bx 4 cx3 dx 2 ex f 0 x ?
sin x x 0 x ?
a sin x b cos x cx 0 x ?
5
FINDING ROOTS…
Graphical
Bisection
Nonlinear Equation
Bracketing
Solvers
False Position
Fixed-point
8
1. GRAPHICAL APPROACH…EXAMPLE
5.1
The function crosses the axis
between 140 and 150 . Visual
inspection of the plot
Root
provides a rough estimate of
the root of 145 . The validity
of the graphical estimate can
be checked by substituting it
into Eq.
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 then
.
(The function changes sign on
opposite sides of the root)
10
2. BRACKETING…
11
Odd and even number of roots
2. BRACKETING METHODS…
Exceptions
12
2. BRACKETING METHODS…
13
2.A. THE BISECTION METHOD
16
2.A. EVALUATION OF BISECTION
METHOD
Pros Cons
Easy Slow
Always finds roots Knowing and that bound root
Number of iterations required Multiple roots
to attain an absolute error can No account is taken of and , if
be computed a priori. is closer to zero, it is likely
that root is closer to .
17
2.A. BISECTION METHOD…EX. 5.3, 5.4
Using Bisection method determine the mass of the bungee
jumper with a drag coefficient of 0.25 to have a velocity of
36 after s of free fall. Note: The acceleration of gravity is
9.81 .
18
2.A. BISECTION METHOD: EG. 5.3, 5.4:
Initial guess: 50, 200
19
2.A. BISECTION METHOD: EXAMPLE
20
2.A. BISECTION METHOD: TRY
IfYOURSELF
in Example 5.4 how many iterations will it take?
=8 iterations
21
2.B. THE FALSE-POSITION METHOD
(Regula-Falsi or linear interpolation method)
22
2.B. THE FALSE-POSITION METHOD
(Regula-Falsi or linear interpolation method)
23
2.B. FALSE-POSITION…PROCEDURE
and evaluate .
24
2.B. FALSE-POSITION…PROCEDURE
26
2.B. FALSE-POSITION METHOD: EX. 5.5
27
2.B. FALSE-POSITION METHOD…
EXAMPLE 5.5
28
IS FALSE-POSITION ALWAYS BETTER
THAN BISECTION? EXAMPLE 5.5
Use bisection and false position to locate the root of
between and 1.3.
29
WHAT IS COVERED FROM CHAPTER 5
divergent
● Bracketing methods are “convergent”.
● Fixed-point methods may sometime “diverge”,
depending on the starting point (initial guess) and how
the function behaves. 31
SIMPLE FIXED-POINT ITERATION
Rearrange the function so that x is on the left side of the
equation: 2
𝑥𝑖 +1 =1+
𝑥𝑖
i x g(x)
1 1.000 3.000
2 3.000 1.667
is given or guessed 3 1.667 2.200
4 2.200 1.909
Example: 5 1.909 2.048
Solve , for 6 2.048 1.977
7 1.977 2.012
Solution: 8 2.012 1.994
9 1.994 2.003
10 2.003 1.999
or, 11 1.999 2.001
or 32
FIXED-POINT-GRAPHICAL EXPLANATION
(component equations)
●Plot them separately
●Their point of intersection is the
solution.
33
FIXED-POINT:CONVERGENCE
Fixed-point iteration
converges if
g ( x) 1
34
NEWTON-RAPHSON METHOD
●Based on Taylor series expansion:
x 2
f ( xi 1 ) f ( xi ) f ( xi )x f ( xi ) Ox 3
2!
●The root is the value of when
●After rearranging and
neglecting the higher order
terms:
35
NEWTON-RAPHSON METHOD…
●Newton-Raphson is A
convenient method for
functions whose derivatives can
be evaluated analytically
Rate of convergence:
●
●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
38
SECANT METHOD…
●Requires two initial estimates
of , e. g, . However, because
is not required to change signs
between estimates, it is not
classified as a “bracketing”
method.
m/s at s
Modified Secant Method
41
Modified Secant Method
42
Roots of Polynomials
f n ( x) ao a1 x a2 x an x
2 n
43
SUMMARY
…
…
…
…
…
44