0
$\begingroup$

We assume $f(a) < \xi < f(b)$
We have $f$ a continuous function on $[a,b]$, by the intermediate value theorem $ \forall \xi \in (f(a), f(b)) \exists c \in [a,b] \space s.t. \space f(c)= \xi$
To construct the value $c$ we proceed as follows:
define $I_1$ to be $[a,b]$.
to define $I_2$ we take the midpoint $m_1$ between $a$ and $b$. We have 3 options:
- $f(m_1) = \xi$ in which case $m_1 = c$
- $f(m_1) < \xi$ in which case $I_2 = [m_1, b]$
- $f(m_1) > \xi$ in which case $I_2 = [a, m_1]$
This construction allows us to contain the point c inside the interval $I_1$.
The following step to construct $I_3$ is identical, we elaborate: we take the midpoint between $inf(I_2)$ and $sup(I_2)$ called $m_2$, again we have 3 options:
- $f(m_2) = \xi$ in which case $m_2 = c$
- $f(m_2) < \xi$ in which case $I_2 = [m_2, sup(I_2)]$
- $f(m_2) > \xi$ in which case $I_2 = [inf(I_2), m_2]$
As such we create a nested sequence of intervals $I_1 \supset I_2 \supset I_3 \supset ...$ with $c$ in their intersection.

We take function $f(x) = x^2$ , $\xi = 2$, $[a,b] = [1,2]$

Say I take some sequence of all the $m_i$, I have been able to show that this converges to $\sqrt{2}$ however i would like to see how fast. Is there anyway I could compute the number of iterations necessary to achieve some $\epsilon$ degree of precision? I was considering using the definition of limit for sequences: $\forall \epsilon >0 , \exists N$, natural, s.t. $\forall n > N |x_i - \sqrt{2}| < \epsilon$. However i do not see how to implement this.

1 Answers 1

1

The intuition behind this algorithm is that it is trapping the value $c$ in a set of intervals whose lengths are getting smaller with each iteration.

At step $n$ of your algorithm you compute the midpoint $m_n$ of interval $I_n$ and you either discover that $c=m_n$, or you isolate $c$ to be in the left half or right half of $I_n$. In any case the distance from $c$ to the midpoint $m_n$ must be at most half the length of the interval $I_n$: $$ |m_n-c|\le \frac12\operatorname{length}(I_n)\tag1$$

Since each step of the algorithm cuts the interval in half, you should be able to find a formula for length($I_n$), as a function of $n$ and the length of the initial interval $I_1$.

Combining (1) with this formula, you now have an upper bound (as a function of $n$) on the error $|m_n-c|$, so the error is guaranteed to be no bigger than this upper bound. From this upper bound you can determine the $n$ that will make the error less than a specified $\epsilon$.

  • 0
    Makes sense! using the length of interval as upper bound, to estimate the number of steps2017-02-24