Professional Documents
Culture Documents
FALL 2022
1
2
10/21/2022
Introduction
Solve?
Bracketing Methods.
Open Methods
Roots of Polynomials
Bracketing Methods
Bracketing Methods
Graphical method.
Bisection method.
Incremental searches.
Graphical Method
Graphical Method
Graphical Method
≈ zero
Graphical Method
Graphical Method
Between lower bound (xl) and upper bound (xu):
xl xu
If f(xl) and f(xu) have the same sign, there is either no
roots or even number of roots.
xl xu
Dr. Asmaa Moddather – Numerical Analysis – Fall 2022
11
Graphical Method
Between lower bound (xl) and upper bound (xu):
xl xu
If f(xl) and f(xu) have the opposite sign, there are an
odd number of roots.
Graphical Method
Exceptions
Tangential to x-axis
Multiple root
Discontinuous equations
13
Graphical Method
Graphical Method
x = 4.23 x = 4.26
15
Bisection Method
If f (x) is real and continuous in the interval from xl to xu and f (xl) and
f (xu) have opposite signs:
then there is at least one real root between xl and xu. Incremental search
methods capitalize on this observation by locating an interval where the
function changes sign. Then the location of the sign change (and
consequently, the root) is identified more precisely by dividing the
interval into a number of subintervals.
Bisection Method
17
Bisection Method
Bisection Method
Step 1
f(cl) = 6.06695
f(cu) = -2.26875
Dr. Asmaa Moddather – Numerical Analysis – Fall 2022
19
Bisection Method
Step 2
cr = (cl + cu)/2 = 14
Step 3
f(cr)= 1.56871
Bisection Method
Repeat Step 1
Assume cl = 14, cu = 16
Step 2
cr = (cl + cu)/2 = 15
Step 3
f(cr)= -0.42483
21
Bisection Method
Step 3
cl cu cr
True c ≈ 14.7802
t < a (conservative)
23
For example, if f (xl) is much closer to zero than f (xu), it is likely that
the root is closer to xl than to xu.
25
First Iteration
f(cl) = 6.06695
f(cu) = -2.26875
cr = 16 – {[-2.26875*(12-16)]/[6.06695-(-2.26875)]} = 14.9113
27
Second Iteration
f(cr)= -0.25426
f(cl) = 6.06695
f(cu) = -0.25426
True answer is x = 1
29
Bisection Method:
t < a
t > a !!!
31
Graphical Presentation:
Incremental Searches
33
Incremental Searches
The x values at the beginning and the end of the increment can
then serve as the initial guesses for one of the bracketing
techniques.
Incremental Searches
If the length is too small, the search can be very time consuming.
35
Incremental Searches
Open Methods
Multiple roots.
37
Open Methods
Open Methods
39
Fixed-Point Iteration
Rearrange the function f (x) = 0 so that x is on the left-hand side of the
equation:
Fixed-Point Iteration
Use simple fixed-point iteration to locate the root of:
41
Fixed-Point Iteration
Start with x = 0
Fixed-Point Iteration
43
Newton-Raphson Method
The most widely used of all root-
locating formulas is the Newton-
Raphson equation.
Newton-Raphson Method
Use Newton-Raphson method to locate the root of:
45
Newton-Raphson Method
Start with x = 0
Newton-Raphson Method
Use Newton-Raphson method to locate the root of:
True answer is x = 1
47
Newton-Raphson Method
Start with x = 0.5
49
51
53
Newton-Raphson Method
The most widely used of all root-
locating formulas is the Newton-
Raphson equation.
Secant Method
A potential problem in implementing
the Newton-Raphson method is the
evaluation of the derivative.
55
Secant Method
Use secant method to locate the root of, Start with initial estimates of
x−1 = 0 and x0 = 1.0:
Secant Method
57
59
True answer is x = 1
False Position
Secant
61
63
Multiple Roots
A double root results from The equation has a double root because
one value of x makes two terms equal to zero.
65
Multiple Roots
Multiple Roots
67
Multiple Roots
Not only f(x) but also f’(x) goes to zero at the root. This poses
69
Standard Modified
71
i xi
i xi
0 2.000000
0 2.000000 1 1.666667
2 1.222222
1 1.000000
3 1.015504
2 #DIV/0! 4 1.000061
5 1.000000
6 1.000000
73
True answer is x = 2, y = 3
Second Iteration
Solution is converging
75
True answer is x = 2, y = 3
Second Iteration
Solution is diverging!
77
79
81
Roots of Polynomials
83
Roots of Polynomials
Roots of Polynomials
For this reason, special methods have been developed to find the
real and complex roots of polynomials: The Müller and Bairstow
methods.
Dr. Asmaa Moddather – Numerical Analysis – Fall 2022
85
Case Study
The atmospheric levels of several greenhouse gases has been increasing
over the past 50 years. The Figure shows data for the partial pressure of
carbon dioxide (CO2) collected at Mauna Loa, Hawaii from 1958
through 2003. The trend in the data can be fit with polynomial.
Case Study
Aside from global warming, greenhouse gases can also influence
atmospheric chemistry. One question that we can address is how the
carbon dioxide trend is affecting the pH of rainwater. Outside of urban
and industrial areas, it is well documented that carbon dioxide is the
primary determinant of the pH of the rain. pH is the measure of the
activity of hydrogen ions and, therefore, its acidity. It can be computed:
87
Case Study
Following are five nonlinear system of equations govern the chemistry
of rainwater:
Case Study
Bracketing method
89
Case Study
Following are five nonlinear system of equations govern the chemistry
of rainwater:
HCO-3 = f(H+)
CO2-3 = f(H+)
OH- = f(H+)
cT = f (HCO-3, CO2-3)
Substitute all
Case Study
91
Graphical method
Goal Seek
93
Solver