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)

## 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:

- +

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

- +

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

Bisection Algorithm

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

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 ).

Bisection Algorithm

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.

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

When do we stop?

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 (+)

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

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

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

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

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

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

Start with x = 1.5

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

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].

Newton’s Method

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

Newton’s Method

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 ))

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

A sequence can be generated as:

Example:

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