Thread: Algebra involving errors and root 2

1. Algebra involving errors and root 2

I can do the first bit, which is just manipulation of the LHS, but I'm not sure how to start on the second and third bit.

Say we wish to estimate the square rot of 2. We begin with a good first estimate $\displaystyle x_1$, say $\displaystyle x_1 = 1.5$. In fact, it is a little too big. We note that 2/1.5 is a little too small, so we form a new guess by averaging them, $\displaystyle x_2 = \frac{1}{2}(1.5+2/1.5)$. We continue this method to give a sequence:

$\displaystyle x_{n+1} = \frac{1}{2}\bigg(\frac{2}{x_n} + x_n\bigg)$

To ease notation, we set $\displaystyle x_n = \sqrt{2} + \epsilon_n$, so, $\displaystyle \epsilon_1 < 1/2^3$

i) Show that

$\displaystyle \bigg(\frac{2}{\sqrt{2} + \epsilon_n} - \big(\sqrt{2} - \epsilon_n\big)\bigg) = \frac{\epsilon_n^2}{\sqrt{2} + \epsilon_n}$;

ii) show that

$\displaystyle \epsilon_{n+1} = \frac{1}{2} \frac{\epsilon_n^2}{\sqrt{2}+\epsilon_n} < \frac{1}{2}\epsilon_n^2$

iii) How big do we require $\displaystyle n$ so that $\displaystyle x_n$ is within $\displaystyle 2^{-15}$ of $\displaystyle \sqrt{2}$. Find the fraction $\displaystyle x_n$

2. Errors and Square Roots

Hello mitch_nufc
Originally Posted by mitch_nufc
I can do the first bit, which is just manipulation of the LHS, but I'm not sure how to start on the second and third bit.

Say we wish to estimate the square rot of 2. We begin with a good first estimate $\displaystyle x_1$, say $\displaystyle x_1 = 1.5$. In fact, it is a little too big. We note that 2/1.5 is a little too small, so we form a new guess by averaging them, $\displaystyle x_2 = \frac{1}{2}(1.5+2/1.5)$. We continue this method to give a sequence:

$\displaystyle x_{n+1} = \frac{1}{2}\bigg(\frac{2}{x_n} + x_n\bigg)$

To ease notation, we set $\displaystyle x_n = \sqrt{2} + \epsilon_n$, so, $\displaystyle \epsilon_1 < 1/2^3$

i) Show that

$\displaystyle \bigg(\frac{2}{\sqrt{2} + \epsilon_n} - \big(\sqrt{2} - \epsilon_n\big)\bigg) = \frac{\epsilon_n^2}{\sqrt{2} + \epsilon_n}$;

ii) show that

$\displaystyle \epsilon_{n+1} = \frac{1}{2} \frac{\epsilon_n^2}{\sqrt{2}+\epsilon_n} < \frac{1}{2}\epsilon_n^2$

iii) How big do we require $\displaystyle n$ so that $\displaystyle x_n$ is within $\displaystyle 2^{-15}$ of $\displaystyle \sqrt{2}$. Find the fraction $\displaystyle x_n$
As you say, part (i) is straightforward. So:

(ii) $\displaystyle x_{n+1} = \sqrt{2}+ \epsilon_{n+1}$

$\displaystyle \Rightarrow \epsilon_{n+1} = x_{n+1} - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{x_n}+ x_n\right) - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{\sqrt{2} +\epsilon_n}+ \sqrt{2} +\epsilon_n\right) - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{\sqrt{2} +\epsilon_n}- (\sqrt{2} -\epsilon_n)\right) - \sqrt{2}$

$\displaystyle = \frac{1}{2}\frac{\epsilon_n^2}{\sqrt{2}+\epsilon_n }$

$\displaystyle = \frac{1}{2}\frac{\epsilon_n^2}{x_n}$

$\displaystyle < \frac{1}{2}\epsilon_n^2$, since $\displaystyle x_n > 1$

(iii) $\displaystyle \epsilon_1 < 2^{-3} \Rightarrow \epsilon_2 < \tfrac{1}{2}\cdot 2^{-6}=2^{-7}$

$\displaystyle \Rightarrow \epsilon_3 < \tfrac{1}{2}\cdot 2^{-14}= 2^{-15}$

$\displaystyle x_2 = \frac{1}{2}\left(\frac{3}{2}+ \frac{4}{3}\right) = \frac{17}{12}$

$\displaystyle \Rightarrow x_3 = ... = \frac{577}{408}$

3. Correction to part (ii)

Hello mitch_nufc

Sorry, I left an extra $\displaystyle \sqrt{2}$ term in part (ii), so here's the corrected version:

(ii) $\displaystyle x_{n+1} = \sqrt{2}+ \epsilon_{n+1}$

$\displaystyle \Rightarrow \epsilon_{n+1} = x_{n+1} - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{x_n}+ x_n\right) - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{\sqrt{2} +\epsilon_n}+ \sqrt{2} +\epsilon_n\right) - \sqrt{2}$

$\displaystyle = \frac{1}{2}\left(\frac{2}{\sqrt{2} +\epsilon_n}- (\sqrt{2} -\epsilon_n)\right)$

$\displaystyle = \frac{1}{2}\frac{\epsilon_n^2}{\sqrt{2}+\epsilon_n }$

$\displaystyle = \frac{1}{2}\frac{\epsilon_n^2}{x_n}$

$\displaystyle < \frac{1}{2}\epsilon_n^2$, since $\displaystyle x_n > 1$

(iii) $\displaystyle \epsilon_1 < 2^{-3} \Rightarrow \epsilon_2 < \tfrac{1}{2}\cdot 2^{-6}=2^{-7}$

$\displaystyle \Rightarrow \epsilon_3 < \tfrac{1}{2}\cdot 2^{-14}= 2^{-15}$

$\displaystyle x_2 = \frac{1}{2}\left(\frac{3}{2}+ \frac{4}{3}\right) = \frac{17}{12}$

$\displaystyle \Rightarrow x_3 = ... = \frac{577}{408}$