1 / 33

The Islamic University of Gaza Faculty of Engineering Civil Engineering Department

The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5. Bracketing Methods. PART II ROOTS OF EQUATIONS. Muller Method. Study Objectives for Part Two. ROOTS OF EQUATIONS.

walcantar
Download Presentation

The Islamic University of Gaza Faculty of Engineering Civil Engineering Department

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter5 BracketingMethods

  2. PART II ROOTS OF EQUATIONS Muller Method

  3. Study Objectives for Part Two

  4. ROOTS OF EQUATIONS • Root of an equation: is the value of the equation variable which make the equations = 0.0 • But

  5. ROOTS OF EQUATIONS • Non-computer methods: • - Closed form solution (not always available) • - Graphical solution (inaccurate) • Numerical systematic methods suitable for computers

  6. roots • The roots exist where f(x) crosses the x-axis. Graphical Solution • Plot the function f(x) f(x) x f(x)=0 f(x)=0

  7. f(c) c c=14.75 Graphical Solution: Example • The parachutist velocity is • What is the drag coefficient c needed to reach a velocity of 40 m/s if m=68.1 kg, t =10 s, g= 9.8 m/s2 Check: F (14.75) = 0.059 ~ 0.0 v (c=14.75) = 40.06 ~ 40 m/s

  8. Numerical Systematic MethodsI. Bracketing Methods f(x) f(x) No roots or even number of roots Odd number of roots f(xl)=+ve f(xl)=+ve roots roots f(xu)=+ve x x xl xu f(xu)=-ve xu xl

  9. Bracketing Methods (cont.) • Two initial guesses (xl and xu) are required for the root which bracket the root (s). • If one root of a real and continuous function, f(x)=0, is bounded by values xl , xuthen f(xl).f(xu) <0. (The function changes sign on opposite sides of the root)

  10. Bracketing Methods 1. Bisection Method • Generally, if f(x) is real and continuous in the interval xl to xu and f (xl).f(xu)<0, then there is at least one real root between xl and xu to this function. • The interval at which the function changes sign is located. Then the interval is divided in half with the root lies in the midpoint of the subinterval. This process is repeated to obtained refined estimates.

  11. f(x) xr = ( xl + xu )/2 f(xu) Step 1: Choose lower xl and upper xuguesses for the root such that: f(xl).f(xu)<0 Step 2: The root estimate is: xr = ( xl + xu )/2 Step 3: Subdivide the interval according to: • If (f(xl).f(xr)<0) the root lies in the lower subinterval; xu = xrand go to step 2. • If (f(xl).f(xr)>0) the root lies in the upper subinterval; xl = xrand go to step 2. • If (f(xl).f(xr)=0) the root is xr and stop xu xr1 xl x f(xu) f(xr1) f(x) (f(xl).f(xr)<0):xu = xr xr = ( xl + xu )/2 f(xu) f(xr2) xl xu x xr2 f(xu)

  12. Bisection Method - Termination Criteria • For the Bisection Method ea > et • The computation is terminated when eabecomes less than a certain criterion (ea < es)

  13. Bisection method: Example • The parachutist velocity is • What is the drag coefficient c needed to reach a velocity of 40 m/s if m = 68.1 kg, t = 10 s, g= 9.8 m/s2 f(c) c

  14. f(x) 6.067 • Assumexl =12 and xu=16 f(xl)=6.067 and f(xu)=-2.269 • The root: xr=(xl+xu)/2= 14 • Check f(12).f(14) = 6.067•1.569=9.517 >0; the root lies between 14 and 16. • Set xl = 14 and xu=16, thus the new root xr=(14+ 16)/2= 15 • Check f(14).f(15) = 1.569•-0.425= -0.666 <0; the root lies bet. 14 and 15. • Setxl = 14 and xu=15, thus the new root xr=(14+ 15)/2= 14.5 and so on…... 1.569 x 12 14 16 -2.269 f(x) (f(12).f(14)>0):xl = 14 1.569 15 x 14 16 -0.425 -2.269

  15. Bisection method: Example • In the previous example, if the stopping criterion is et = 0.5%; what is the root? Iter. XlXuXrea% et% 1 12 16 14 5.279 -- 2 14 16 15 6.667 1.487 3 14 15 14.5 3.448 1.896 4 14.5 15 14.75 1.695 1.204 5 14.75 15 14.875 0.84 0.641 6 14.74 14.875 14.813 0.422 0.291

  16. Bisection method

  17. Flow Chart –Bisection Start Input: xl , xu, s, maxi f(xl).f(xu)<0 False i=0 a=1.1s while a> s & i <maxi False Print: xr, f(xr) ,a , i Stop

  18. xu+xl=0 True Test=f(xl). f(xr) Test=0 True a=0.0 True Test<0 xu=xr False xl=xr

  19. Bracketing Methods 2. False-position Method • The bisection method divides the interval xlto xuin half not accounting for the magnitudes of f(xl)andf(xu).For example if f(xl)is closer to zero than f(xu), then it is more likely that the root will be closer to f(xl). • False position method is an alternative approach where f(xl) and f(xu) are joined by a straight line; the intersection of which with the x-axis represents and improved estimate of the root.

  20. 2. False-position Method • False position method is an alternative approach where f(xl) and f(xu) are joined by a straight line; the intersection of which with the x-axis represents and improved estimate of the root.

  21. False-position Method -Procedure f(x) f(xu) xr xl xu x f(xl) f(xr)

  22. False-position Method -Procedure Step 1:Choose lower xl and upper xuguesses for the root such that: f(xl).f(xu)<0 Step 2:The root estimate is: Step 3: Subdivide the interval according to: • If (f(xl).f(xr)<0) the root lies in the lower subinterval; xu = xrand go to step 2. • If (f(xl).f(xr)>0) the root lies in the upper subinterval; xl = xrand go to step 2. • If (f(xl).f(xr)=0) the root is xr and stop

  23. False position method: Example • The parachutist velocity is • What is the drag coefficient c needed to reach a velocity of 40 m/s if m =68.1 kg, t =10 s, g= 9.8 m/s2 f(c) c

  24. f(x) 6.067 False position method: Example • Assume xl = 12 and xu=16 f(xl)= 6.067 and f(xu)= -2.269 • The root: xr=14.9113 f(12) . f(14.9113) = -1.5426 < 0; • The root lies bet. 12 and 14.9113. • Assume xl = 12 and xu=14.9113, f(xl)=6.067 and f(xu)=-0.2543 • The new root xr= 14.7942 • This has an approximate error of 0.79% 14.91 x 12 16 -2.269

  25. False position method: Example

  26. Flow Chart –False Position Start Input: xl , x0 , s, maxi f(xl). f(xu)<0 False i=0 a=1.1s while a> s & i <maxi False Print: xr, f(xr) ,a , i Stop

  27. i=1 or xr=0 True Test=f(xl).f(xr) Test=0 True a=0.0 True Test<0 xu=xr xr0=xr False xl=xr xr0=xr

  28. False Position Method-Example 2

  29. False Position Method - Example 2

  30. Roots of Polynomials: Using Software Packages MS Excel:Goal seek f(x)=x-cos x

  31. MS Excel: Solver u(x,y)= x2+xy-10 =0 v(x,y)=y+3xy2-57=0

More Related