Bisection Method Exmple

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 6

RMIT Classification: Trusted #

x y1=x y2=exp(-(x^2/2)) y1 and y2 graphs and intersectin


0 0 1 1.6
0.2 0.2 0.98019867331 1.4
0.4 0.4 0.92311634639
1.2
0.6 0.6 0.83527021141
1
0.8 0.8 0.72614903707
0.8
1 1 0.60653065971
1.2 1.2 0.48675225596 0.6

1.3 1.3 0.42955735821 0.4


1.4 1.4 0.37531109885 0.2
0
0 0.2 0.4 0.6 0.8 1

y1=x y2=exp(-(x^2/2))

x f(x)=x-exp(-(x^2/2)) f(x)=x-exp(-(x^2/2))
0 -1
1.5
0.2 -0.780198673307
0.4 -0.523116346387
1
0.6 -0.235270211411
0.8 0.073850962926 0.5
1 0.393469340287
1.2 0.71324774404 0
0 0.2 0.4 0.6 0.8 1 1.2
1.4 1.024688901149
-0.5

-1

-1.5
RMIT Classification: Trusted #

d y2 graphs and intersecting point

0.4 0.6 0.8 1 1.2 1.4 1.6

y1=x y2=exp(-(x^2/2))

=x-exp(-(x^2/2))

0.6 0.8 1 1.2 1.4 1.6


RMIT Classification: Trusted #

Bisection Method Example 1 f(x)=x-exp(-(x^2/2)) Error tolerance:

Step No. a b c f(b) f(c )


1 0.6 0.8 0.7 0.0738509629263 -0.082704538242
2 0.7 0.8 0.75 0.0738509629263 -0.004839601989
3 0.75 0.8 0.775 0.0738509629263 0.0344132488432
4 0.75 0.775 0.7625 0.0344132488432 0.0147623703207
5 0.75 0.7625 0.75625 0.0147623703207 0.004955102544
6 0.75 0.75625 0.753125 0.004955102544 5.615882096E-05
7 0.75 0.753125 0.7515625 5.615882096E-05 -0.00239212208
8 0.7515625 0.753125 0.75234375 5.615882096E-05 -0.001168081424
9 0.75234375 0.753125 0.752734375 5.615882096E-05 -0.000555986209
10 0.752734375 0.753125 0.7529296875 5.615882096E-05 -0.000249919916
RMIT Classification: Trusted #

ε = 0.005

sign of (f(c )* f(b)) error = b-c


-1 0.1
-1 0.05
1 0.025
1 0.0125
1 0.00625
1 0.003125 < 0.005 , so we can STOP the iteration at this 6th step
-1 0.0015625 r= 0.75
-1 0.00078125
-1 0.000390625
-1 0.0001953125
RMIT Classification: Trusted #

Bisection Method Example 1 f(x)=x-exp(-(x^2/2)) Error tolerance:

Step No. a b c f(b) f(c )


RMIT Classification: Trusted #

ε = 0.005

sign of (f(c )* f(b)) error = b-c

You might also like