# Numerical Analysis/Bisection Method Worked Example

X^3=20 ,f(X), X4=4, X1=1 take four iterations .

## Example

Find an approximation of ${\displaystyle {\sqrt {3}}}$ correct to within 10-4 by using the bisection method on ${\displaystyle f(x)=x^{2}-3\ }$. starting on [1, 2].

### Analysis of the Problem

The number of iterations we will use, n, must satisfy the following formula:
${\displaystyle n>\log _{2}{\frac {b-a}{\epsilon }}=\log _{2}{\frac {2-1}{10^{-4}}}=\log _{2}{\frac {1}{10^{-4}}}=\log _{2}{10^{4}}={\frac {\log {10^{4}}}{\log {2}}}={\frac {4}{.3010}}=13.29}$.
Thus, we will use 14 iterations of the bisection method.

### Iteration #1

First, we find the midpoint of the interval [1, 2]:

${\displaystyle c_{1}={\frac {1+2}{2}}=1.5\ }$

Then we check if ${\displaystyle f(c_{1})\ }$ is positive or negative:

${\displaystyle f(c_{1})=1.5^{2}-3=-0.75\ }$

The value of ${\displaystyle f(c_{1})\ }$ is negative, which means that ${\displaystyle c_{1}\ }$ is less than ${\displaystyle {\sqrt {3}}}$.

We therefore use ${\displaystyle c_{1}\ }$ as the left endpoint of our new interval and keep 2 as the right endpoint.

yes

### Iteration #2

Repeat the process from Iteration #1 to do Iteration #2:

### Iteration #3 - Iteration #14

Complete Iteration #3 - Iteration #14:

is an approximation of ${\displaystyle {\sqrt {3}}}$ correct to within 10-4.