Square root of 2 has geometric significance as a result of Pythagorean
theorem and algebraic significance as it is one of the first numbers proved to be
irrational. Maybe you have gone to the calculator and it outputs the value of
square root of 2 but how does the calculator do this? you might think that
they have some storage so that whenever someone asks for these inputs they
immediately spew out digits you see on screen but most likely there is no such
storage. There are just too many possible inputs. Here are three ways from the
least to most efficient to calculate any square roots in general. The first is
long division. It works like this: first, add a decimal point and many zeros
behind the number, then add the square root sign and slice the number at the
decimal point. Slice every two zeros behind the decimal point and if there
are more than two digits before the decimal point also slice them every two
digits from the decimal point. For the leftmost slice write down the number
whose square is just smaller than this number.
Subtract this number squared then add the two digits behind multiply the
quotient by two and write it down or the left. Write also a blank. This blank must
be the same as the one you are going to put in next. Fill in this blank so that
this product is just under the remainder.
With the two digits in the quotient, multiply these two digits together by
two and put it on the left side.
Repeat what you have done
It is a really good method if you only want a few digits but in the long run it
is the least efficient. Secondly we have continued fraction. Note that only some
square roots can be more efficiently calculated this way this is because
there is no general method to write down the continued fraction of a square root.
Continued fraction looks complicated like this but we often simplify it with
this notation. If we denote alpha as the infinite continued fraction then by
truncating it at different layers we have these different fractions which
gets closer and closer to alpha we also denote the truncated continued
fraction at the nth layer to be pn over qn. Continued fraction has an interesting
property as shown on the screen. Although it looks complicated don't
worry because I will use an example to illustrate that. Now let's use square
root of 3 as an example. We know that it is between 1 and 2 so the integral part
of square root of 3 is 1 and the yellow part is the remaining part. Take the
reciprocal, rationalize the fraction, and we get square root of 3 plus 1 divided by 2.
Now from the original inequality we get this new inequality with square root of 3
plus 1 divided by 2 so the integral part here is 1 again. Now take the reciprocal,
rationalize the fraction, and we get square root of 3 plus 1.
From this inequality we get square root of three plus one is between two and
three so the integral part here is two, but the remaining part: square root of
three minus one is something similar, because it is the entire fractional part
we start off with! So we can then repeat and get the same integral parts, so we
can now write square root of three in terms of continued fraction as shown.
Or if you want to be cool right a bar above 1,2 to denote that from then
on it would be one and two alternately. Now you can imagine that this is not
efficient for some other square roots - it might already take a lot of work to get
continued fraction and we still have not approximated the square roots yet, so
this method is only more efficient for some square roots. Now back to the
approximation of square root of three. We have this continued fraction expression
here, then this sequence of numbers get closer and closer to the square root.
We know the value of the first few pretty easily but the further down the sequence
the harder it gets. This is where the property comes in handy:
we only need to know the previous two fractions,
as well as the last entry of the continued fraction so we can use this
property to get the fraction to be 7/4 without having to calculate
the entire continued fraction again. For the next fraction the previous two
fractions will be shifted while the last entry now becomes two. Now we can apply
the property and we can get 19/11 pretty easily. If you want
better approximations you could use this property a few more times.
The third method is Babylonian method. To approximate the square root of a, firstly
we take a guess a_0 which can be anything positive, but practically it
should not differ from square root of a too much then we take the average of the
previous value and a over the previous value. Let's say we want to approximate
the square root of five, then we first take a reasonable guess of
2, and take the average of 2 and 5/2 to get 9/4, then take
the average of 9/4 and 5 over 9/4 to get a_2. If you
start off with two, then only after three iterations you will have ten correct
digits of square root of five, so this is a very efficient method.
Next video is going to be about why these methods work. Subscribe if you want
more of these math videos. See you next time!