bisection method

19
B.E. 4 th Semester Maths-IV: 140001 Numerical Analysis Prof. K.K.Pokar Assistant Professor in Mathematics Government Engineering College,Bhuj

Upload: kishor-pokar

Post on 14-Jun-2015

631 views

Category:

Engineering


4 download

TRANSCRIPT

Page 1: Bisection method

B.E. 4th Semester

Maths-IV: 140001

Numerical Analysis

Prof. K.K.PokarAssistant Professor in Mathematics

Government Engineering College,Bhuj

Page 2: Bisection method

Numerical Methods

Bisection Method

Page 3: Bisection method

Bisection Method

Page 4: Bisection method

Bisection Method

Page 5: Bisection method

Bisection Method

Page 6: Bisection method

Algorithm for Bisection MethodStep-1:

Find the two points a and b such that f(a) f(b) < 0

Compute

Evaluate

Page 7: Bisection method

Step-2:Decision Making for Replacing a / b with new

value

f(x0)

f(x0)=0 f(x0) > 0

f(x0) < 0

Page 8: Bisection method

If f(x0)=0

Then x0 is the required root/solution

of the given equation

f(x) = 0

Page 9: Bisection method

If f(x0) > 0

Then x0 replaces any one of a & b

f(x0) > 0

f(a) > 0

Root lies b/w b and

x0

f(b) > 0

Root lies b/w a and

x0

Page 10: Bisection method

If f(x0) < 0

Then x0 replaces any one of a & b

f(x0) < 0

f(a) < 0

Root lies b/w b and

x0

f(b) < 0

Root lies b/w a and

x0

Page 11: Bisection method

Step-3:

Repeating Step-2 for in place of

till the desired accuracy is obtained

Page 12: Bisection method

Example: Find a real root of the equation Step-1:Find the two points a and b such that f(a) f(b)

< 0

Compute

Evaluate

Page 13: Bisection method

Step-2:Decision Making for Replacing 2 / 3 with new

value =2.5

f(x0)=2.125

f(x0)=0 f(x0) > 0

f(x0) < 0

Page 14: Bisection method

If f(x0)=2.125 > 0

Then x0 =2.5 replaces any one of 2 & 3

f(2.5) > 0

f(3) > 0

Root lies b/w 3 and

2.5

f(2) > 0

Root lies b/w a and

x0

Page 15: Bisection method

Step-2:Decision Making for Replacing 2 / 2.5 with

new value 2.25

f(2.25)=-1.859375

f(x0)=0 f(x0) > 0

f(x0) < 0

Page 16: Bisection method

If f(2.25) < 0

Then 2.25 replaces any one of 2 & 2.5

f(2.25) < 0

f(2) < 0

f(2.5) > 0

Root lies b/w

2.25 and 2.5

Page 17: Bisection method

Table formn a f(a) b f(b) M=(a+b)

/2f(M)

0 2 -5 3 13 2.5 2.125

1 2 -5 2.5 2.125 2.25 -1.85938

2 2.25 -1.85938 2.5 2.125 2.375 0.021484

3 2.25 -1.85938 2.375 0.021484 2.3125 -0.94604

4 2.3125 -0.94604 2.375 0.021484 2.34375 -0.46915

5 2.34375 -0.46915 2.375 0.021484 2.359375 -0.22556

6 2.359375 -0.22556 2.375 0.021484 2.367188 -0.10247

7 2.367188 -0.10247 2.375 0.021484 2.371094 -0.0406

8 2.371094 -0.0406 2.375 0.021484 2.373047 -0.00959

9 2.373047 -0.00959 2.375 0.021484 2.374023 0.005942

10 2.373047 -0.00959 2.374023 0.005942 2.373535 -0.00182

11 2.373535 -0.00182 2.374023 0.005942 2.373779 0.002059

12 2.373535 -0.00182 2.373779 0.002059 2.373657 0.000118

Page 18: Bisection method

Understanding the tablen a f(a) b f(b) M=(a+

b)/2f(M)

0 2 -5 3 3 2.5 2.125

1 2 -5 2.5 2.125 2.25 -1.85938

2 2.25 -1.85938 2.5 2.125 2.375 0.021484

3 2.25 -1.85938 2.375 0.021484 2.3125 -0.94604

4 2.3125 -0.94604 2.375 0.021484 2.34375 -0.46915

5 2.34375 -0.46915 2.375 0.021484 2.359375 -0.22556

6 2.359375 -0.22556 2.375 0.021484 2.367188 -0.10247

7 2.367188 -0.10247 2.375 0.021484 2.371094 -0.0406

8 2.371094 -0.0406 2.375 0.021484 2.373047 -0.00959

9 2.373047 -0.00959 2.375 0.021484 2.374023 0.005942

10 2.373047 -0.00959 2.374023 0.005942 2.373535 -0.00182

11 2.373535 -0.00182 2.374023 0.005942 2.373779 0.002059

12 2.373535 -0.00182 2.373779 0.002059 2.373657 0.000118

Page 19: Bisection method