My title - Departamento de Matemática da Universidade do Minho
My title - Departamento de Matemática da Universidade do Minho
My title - Departamento de Matemática da Universidade do Minho
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2 ITERATION/RECURSION 9<br />
<strong>do</strong> primeiro, o terceiro rectângulo tem como base a média aritmética x 3 = (x 2 + y 2 )/2 <strong>da</strong> base e a<br />
altura <strong>do</strong> segun<strong>do</strong>, e assim sucessivamente. A equação recursiva para as bases é<br />
x n+1 = 1 (<br />
x n + a )<br />
.<br />
2 x n<br />
Observe que se a e a conjectura inicial são racionais, então to<strong>do</strong>s os x n são números racionais.<br />
The algorithm converges, and quite fast.<br />
x 1 = 3/2 for √ 2 (since 1 2 < 2 < 2 2 ), and find<br />
We could, as the babylonians, put an initial guess<br />
x 2 = 17<br />
12 ≃ 1.41666666666 x 3 = 577<br />
408 ≃ 1.41421568627 x 4 = 665857<br />
470832 ≃ 1.41421356237<br />
As you see, the sequence stabilizes quite fast.<br />
Error estimate. As a first attempt to explain this miracle, we could start looking at the<br />
recursive equations for the bases and the heights of the rectangles:<br />
x n+1 = x n + y n<br />
2<br />
y n+1 = 1/x n + 1/y n<br />
2<br />
(so, the next height is the “harmonic mean” of the base and height). We see that the x n ’s and the<br />
y n ’s form <strong>de</strong>creasing and increasing sequences, respectively (disregarding the first guess, of course),<br />
namely<br />
y 2 ≤ y 3 ≤ ... ≤ y n ≤ ... ≤ x n ≤ ... ≤ x 3 ≤ x 2 ,<br />
The real root is somewhere between, namely y n ≤ √ a ≤ x n . Hence, we have an explicit control of<br />
the error. A computation shows that the lenghts of those intervals, the differences ε n = x n − y n<br />
satisfy the recursion<br />
ε n+1 < 1 2 · ε n<br />
So, and initial “error” ε 1 ≤ 1 (an easy achievement, since we easily recognize squares of integers)<br />
reduces to at least ε n ≤ 2 −n after n iterations. The true error is actually much smaller. In<strong>de</strong>ed,<br />
in our example we may compute<br />
ε 2 = 17<br />
12 − 212 17 = 1<br />
204 ≃ .005 and ε 3 = 577<br />
408 − 2408 577 = 1<br />
235416 ≃ 0.000004<br />
So that the first improved guess x 2 has already one correct <strong>de</strong>cimals, and the second, x 3 has already<br />
four correct <strong>de</strong>cimals!<br />
Irrationals. What babylonians didn’t suspect is that if you start with a rational guess for √ 2,<br />
you get an infinite sequence of rational approximations, but the process never stops. This is due<br />
to<br />
Pythagoras theorem.<br />
The square root of 2 is not rational.<br />
Exercícios.<br />
• De acor<strong>do</strong> com a fórmula <strong>de</strong> Heron, a área <strong>de</strong> um triângulo <strong>de</strong> la<strong>do</strong>s a, b e c, e semi-perímetro<br />
s = (a + b + c)/2 é<br />
área = √ s(s − a)(s − b)(s − c)<br />
Estime a área <strong>de</strong> um triângulo <strong>de</strong> la<strong>do</strong>s 7, 8 e 9.<br />
• Estime √ 13 com um erro < 0.01 e 0.001.<br />
• Estime quantas iterações é preciso fazer para obter os primeiros n dígitos <strong>de</strong>cimais <strong>de</strong> √ 2<br />
usan<strong>do</strong> o méto<strong>do</strong> <strong>do</strong>s babilónios.