Академический Документы
Профессиональный Документы
Культура Документы
ROOTS OF
EQUATIONS
1
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
~ Problems are concerned
with the value of variable or
a parameter that satisfies a
single nonlinear equation.
~ Valuable in engineering
design contexts where it is
often impossible to
explicitly solve design
equations for
parameters
2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Learning Outcomes
• Students should be able to:
•Why?
b b 2 4ac
ax 2 bx c 0 x
2a
•But
ax5 bx4 cx 3 dx2 ex f 0 x ?
sin x x 0 x ?
Chapter 5 4
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Nonlinear Equation
Solvers
All Iterative
5
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure PT2.1
Chapter 5 6
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Bracketing Methods
(Or, two point methods for finding roots)
Figure 5.4c 9
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Bisection Method
For the arbitrary equation of one variable, f(x)=0
1. Choose guesses ; lower xl and upper xu such
that they bound the root of interest by checking
f(xl).f(xu) <0.
Chapter 5 11
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 5.6
Chapter 5 12
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Evaluation of Method
Pros Cons
• Easy • Slow
• Always find root • Know a and b that
• Number of iterations bound root
required to attain an • Multiple roots
absolute error can be • No account is taken
computed a priori. of f(xl) and f(xu), if f(xl)
is closer to zero, it is
likely that root is
closer to xl .
Chapter 5 13
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
How Many Iterations will It Take?
Lk
a 100% a s
x
Chapter 5 14
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
• If the absolute magnitude of the error is
xs 4
10
100%
and Lo=2, how many iterations will you
have to do to get the required accuracy in
the solution?
4 2
10 2k 2 104 k 14.3 15
2k
Chapter 5 15
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The False-Position Method
(Regula-Falsi)
If a real root is bounded
by xl and xu of f(x)=0,
approximate the
solution by doing
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).
Chapter 5 16
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Procedure
1. Find a pair of values of x: xl and xu such that
fl=f(xl) <0 and fu=f(xu) >0.
2. Estimate the value of the root from the following
formula (Refer to Box 5.1)
f ( xu ) ( xl xu )
xr xu
f ( xl ) f ( xu )
and evaluate f(xr).
Chapter 5 17
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3. Use the new point to replace one of the
original points, keeping the two points on
opposite sides of the x axis.
(Similar as in Bi-section method)
Chapter 5 19
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem 5.1
Determine the real roots of f(x) = -0.6x^2 + 2.4 x + 5.5
x f(x)
0 5.5000
f(x)
10.0000
1 7.3000
2 7.9000 0.0000
3 7.3000 0 2 4 6 8 10
-10.0000 f(x)
4 5.5000
5 2.5000 -20.0000
6 -1.7000 -30.0000
7 -7.1000
8 -13.7000
9 -21.5000 The root is between 5.0 and 6.0
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
b) Using Quadratic Equation
2
2 b b 4ac
ax bx c 0 x
2a
x= -1.63 This is not shown in the graph, unless the scale starts at < 0)
and x = 5.63
21
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
c) Using Bisection Method
Using 3 iterations of the bisection method to detemine the highest root.
Employ initial guesses of xl = 5 and xu = 10,
Compute estimated error ea and the true error et after each iteration.
Solution :
xl = 5 xu = 10
xr = (xl+xu)/2,
f(x) = -0.6x2 + 2.4 x + 5.5
1st iteration
xr = (5 + 10) / 2 = 7.5
Check:
f(xl) = -0.6*(5^2) + (2.4*5) + 5.5 = 2.50
f(xr) = -0.6*(7.5^2) + (2.4*7.5) + 5.5 = -10.25
f(xl) *f(xr) = -25.63( < 0)
t is
obtain from Quadratic equation
(or from actual maths. procedure)
2nd Iteration
Xl = 5, Xu = Xr = 7.5
Xr = (5 + 7.5)/2 = 6.25
f(5) = 2.5, f(6.25) = -2.9375 Repeat the process
f(xl) * f(xr) < 0
Therefore, Xu’ = Xr = 6.25
23
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
6.25 7.5 5.63 6.25
a 100% 20.0 % t 100% 11.01%
6.25 5.63
3rd Iteration:
New Xl = 5.0, Xu = 6.25
:
Repeat the process
:
Iteration
No. Xl Xu Xr f(xl) f(xr) (fxl).f(xr) CHECK Ea (%) Et (%)
TABULATION
1 5 10 7.5000 2.5000 -10.2500 -25.6250 Xu = Xr 33.21
2 5.000 7.5000 6.2500 2.5000 -2.9375 -7.3438 Xu = Xr 20.00 11.01
3 5.000 6.2500 5.6250 2.5000 0.0156 0.0391 Xl = Xr 11.11 0.09
24
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Exercises
25
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.