Beruflich Dokumente
Kultur Dokumente
Saharudin Haron
Page 3 - 1
Roots of Equations
Definitions: Root of an equation can be defined as the value of x that makes f(x) = 0 or can be called as the zeros of the equation. The quadratic formula normally used to calculate the roots of equation f(x) = ax2 + bx +c = 0,
b b 2 4ac x= 2a
cannot solve the root for many other equations, such as, f(x) = e-x x ,
f (c) =
gm 1 e ( c / m ) t v c
Page 3 - 2
Bracketing Method
Called bracketing method because two initial guesses for the root are required The name implies that the guesses bracketing the root There are two types of bracketing method Bisection Method False Position Algorithm The difference of both method lies through their strategies to systematically reduce the width of the bracket
Page 3 - 3
f(x)
One root
x f(x)
Even # of roots
x f(x)
Odd # of root
x f(x)
Multiple roots occur when the function tangential to the x axis - having even # of roots
x xl xu
Requirements: f(x) is real and continuos in the interval of xl and xu f(xl ) and f(xu ) having opposite sign that is f(xl ) f(xu ) < 0 This method is also known as Binary chopping Interval halving Bolzanos method Characteristic incremental search method in which the interval is divided in half if a function changes sign over an interval, the function value at midpoint is evaluated
Page 3 - 6
Bisection Method
xl + xu xr = 2 3. Make the following evaluations z If f(xl ) f(xr ) < 0, the roots lies in the lower subinterval. Set xu = xr Return to step 2 z If f(xl ) f(xr ) > 0, the roots lies in the upper subinterval. Set xl = xr Return to step 2 z If f(xl ) f(xr ) = 0, the roots equals xr : Terminate the computations
Page 3 - 7
Page 3 - 9
False-Position Method
Exploits graphical insight to join the points by a straight line The intersection of this line with the x axis represents an improved estimate of the root. The replacement of the curve with f(x) f(xu) straight line give a false position for the roots xr The intersection of the straight line with the x axis can be estimated as xl f ( xl ) f ( xu ) = x r xl x r xu x xu f ( xu )( xl xu ) f(xl) xr = xu f ( xl ) f ( xu )
Page 3 - 10
Parachute Problem
Use the bisection method and the false position method to determine the drag coefficient c needed for a parachutist of mass m = 68.1 kg to have a velocity of 40 m/s after free falling for time t = 10 s. Note the acceleration due to gravity is 9.8 m/s2. This problem can be solved by using cl = 12 and cu = 16 and s = 0.5%. True value = 14.78024. Equation needed to solve the problem
f ( c) =
f (c) =
Page 3 - 12
Results
Bisection Algorithm Results Example 5.4 with s = 0.5%
Iter cl cu cr
a(%)
a(%)
t(%)
1 2 3 4 5 6
0.792 0.085
Page 3 - 13
Solution
After ten iteration, the true error only reduced to about 31 %. Note that | a | < | t | thus the approximate is misleading Insight to this problem can be examined by plotting the function
Page 3 - 14
Results
Bisection Algorithm Results
Example 5.7 with Iter xl xu
= 2%
s
= 2%
s
xr
a(%)
t(%)
Iter
xl
xu
xr
a(%)
t(%)
1 2 3 4 5 6 7 8 9 10
0.00 0.09 0.18 0.26 0.34 0.41 0.47 0.53 0.59 0.64
1.300 1.300 1.300 1.300 1.300 1.300 1.300 1.300 1.300 1.300
0.0943 0.1818 0.2629 0.3381 0.4079 0.4726 0.5326 0.5881 0.6395 0.6869
90.570 81.824 73.713 66.189 59.212 52.742 46.743 41.186 36.046 31.306
Page 3 - 15
1.0
Page 3 - 16
Bracketing Method
(assignment in class)
The velocity v of falling parachutist is given by,
v(t ) =
gm 1 e ( c / m ) t c
where
Compute the mass m so that the velocity is v = 35 m/s at t = 7 s. Use the bisection method with s = 1.0 and false-position method with s = 0.1.
Page 3 - 17
Open Method
Bracketing method requires root to be located between the upper and lower bound. Repeated application always result in closer estimates of the true value of the root Such method are normally called convergent, because they move closer to the real roots In contrast Open Method requires one to have a formula Requires one or two starting value but not necessarily bracket the root Sometimes diverge or move away after several computations However when it converges it will be faster than bracketing method
Page 3 - 18
(B)
xi xi+1 x
xi xi+1 x
Page 3 - 19
transform into
x2 + 3 x= 2
sin x = 0 transform into x = sin x + x e-x - x = 0 transform into x = e-x Given an initial guess at the root xi the above equation can be used to estimate x i+1
The iterative formula will be
x i+1 = g (xi )
Page 3 - 20
f(x) f(x) = ex - x
x
Since we have two equal equations as f1(x) = g(x) The two function can be drawn separately and the intersection of these function represent the roots of f(x) = 0
f(x)
f1(x) =x
g(x) = ex x
Page 3 - 21
a =
xi +1 xi 100 % xi +1
Determine the root of the following equation using simple point iteration method, f(x) = sin (x) x Use initial guess, xo = 0.5 and s = 0.1%. (Give answer in 7 significant figures)
Page 3 - 23
f(x) f(xi )
Slope = f( xi ) f(xi ) - 0
Newton Raphson method can be derived by using the figure as a guide: f ( x i ) = f (xi ) 0 xi xi +1 f ( xi ) f ( x i )
xi+1
xi
xi +1 = x i
xi - xi+1
Page 3 - 24
xi +1 = x i
a =
xi +1 xi 100 % xi +1
Secant Method
Potential problem with Newton Raphson is to evaluate the derivative For this case the derivative can be estimated by using backward finite divided difference f ( xi 1 ) f ( xi ) f(x) f ( x i ) x i 1 x i f(xi )
a =
xi +1 xi 100 % xi +1
Open Method
(assignment in class)
The concentration rate of a toxic agent discharged into a river can be approximated by the following mathematical model, dc V dt = W-Qc-kV c where V = 1 x 106 m3 Q = 1 x 105 m3/yr W = 1 x 106 g/yr k = 0.2 g0.5/m1.5yr
If the concentration of the toxic agent, c is constant, determine its value using Newton Raphson and Secant method with initial guesses, ci = 4 g/m3 and ci-1 = 3.8 g/m3 , and s = 0.1 %.
Page 3 - 28