Originally Posted by
bobby77 find the root of f(x)=2x^3-x^2+x-1=0 to 3 decimal places using interval bisection.
First sketch the graph to locate the approximate position of the root.
See attachment:
Now we see the root is located at about $\displaystyle x=0.7$. Now we need
a pair of values $\displaystyle x_{lo}, x_{hi}$ such that $\displaystyle x_{lo}<x_{hi}$ such that
$\displaystyle sgn(f(x_{lo}) \ne sgn(f(x_{hi}) $.
It looks as though $\displaystyle 0.6, 0.8$ will do for these (check).
Now we need a table:
Code:
x_lo x_hi f(x_lo) f(x_hi) x_mid f(x_mid)
0.6 0.8 -0.328 0.184 0.7 -0.104
This is the first row, the next row is obtained by replacing $\displaystyle x_{lo}$ or $\displaystyle x_{hi}$ by $\displaystyle x_{mid}$, so that we
still bracket the zero, thus:
Code:
x_lo x_hi f(x_lo) f(x_hi) x_mid f(x_mid)
0.6 0.8 -0.328 0.184 0.7 -0.104
0.7 0.8 -0.104 0.184 0.75 0.0312
0.7 0.75 -0.104 0.0312 0.725 -0.0385
and so on utill $\displaystyle |x_{hi}-x_{lo}|<0.001$.
RonL