Presentation is loading. Please wait.

Presentation is loading. Please wait.

- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)

Similar presentations


Presentation on theme: "- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)"— Presentation transcript:

1

2 - +

3 Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p) = 0. Meaning, p is a root of the equation f(x) = 0

4 - +

5 The Bisection Method calls for a repeated halving of subintervals of [a, b] each time locating the half containing p. Bisection Method (Binary Search)

6 Bisection Algorithm

7 Set a 1 = a and b 1 = b. Find the midpoint between a 1 and b 1. Midpoint,

8 If f(p 1 ) = 0, then p 1 is the root of the equation within [a, b]. If f(p 1 )  0, then what? Then find if f(p 1 ) has the same sign as either f(a 1 ) or f(b 1 ).

9 Bisection Algorithm

10 IF f(p 1 ) has the same sign as f(a 1 ), then the root is in [p 1, b 1 ]. Set a 2 = p 1 and b 2 = b 1. IF f(p 1 ) has the same sign as f(b 1 ), then the root is in [a 1, p 1 ]. Set a 2 = a 1 and b 2 = p 1.

11 The root is in the interval [a 2, b 2 ]. Divide the interval in two halves and repeat the process.

12 When do we stop?

13 has a root in [1, 2]. nanan pnpn bnbn 11.0 (-)1.5 (+)2.0 (+) 21.0 (-)1.25 (-)1.5 (+) 31.25 (-)1.375 (+)1.5 (+) 41.25 (-)1.3125 (-)1.375 (+) 51.3125 (-)1.34375 (-)1.375 (+)

14 The Method of False Position The method is based on bracketing the root between two points. At the beginning choose two points, so that Now draw a line joining The x-intercept of the line is

15

16

17

18 Now bracket the root between either Which pair to choose? On the other hand Let us assume that This means that the root is between

19 Now draw a line joining The x-intercept of the line is and the process continues …

20

21

22

23

24

25

26

27

28 has a root in [1, 2]. n 11.26316 21.33883 31.35855 41.36355 51.36481

29 Fixed-Point Iteration Rewrite f(x) = 0 in the form of x = g(x) and iterate. has a root in [1, 2].

30 We can rewrite f(x) in the form of x = g(x) in the following ways.

31 Start with x = 1.5

32 Results of the Fixed-point Iteration n(a)(b)(c)(d) 11.5 2-0.8750.81651.28695371.3483997 36.7322.99691.40254081.3673763 4-469.71.34545831.3649570 51.37517021.3652647 61.36009411.3652255 71.36784691.3652305 81.36388701.3652299 91.36591671.3652300

33 Why some expressions failed to deliver the root? To deliver the root, g(x) for all x in [a, b] must stay within [a, b].

34 Newton’s Method

35 Consider the triangle (p 2, 0), (p 1, 0) and (p 1, f(p 1 )).

36 Newton’s Method

37 Consider the triangle (p 2, 0), (p 1, 0) and (p 1, f(p 1 )). (p 2, 0) (p 1, 0) (p 1, f(p 1 ))

38 (p 2, 0) (p 1, 0) (p 1, f(p 1 )) The slope,

39

40 A sequence can be generated as:

41 Example:

42


Download ppt "- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)"

Similar presentations


Ads by Google