d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Math - How To Constitute A Root As Decimal > Without Calulator Ofc
Add Reply New Topic New Poll
Member
Posts: 21,861
Joined: Dec 13 2010
Gold: 0.91
Nov 1 2013 10:31am
hey guys,

I got the task to constitute a root as decimal without calulator ((square root of 5) in this case)

can someone tell me a good method to do that?

thanks in advance, i'll pay some fg for useful replies

regards Bree


This post was edited by Breee on Nov 1 2013 10:32am
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Nov 1 2013 11:19am
well there is brute force: for example, sqrt(10)

3^2 = 9, 4^2 = 16; therefore the solution to sqrt(10) lies between 3 and 4:

3.5^2 = 12.25; therefore the solution to sqrt(10) lies between 3 and 3.5

3.1^2 = 9.61; therefore the solution to sqrt(10) lies between 3.1 and 3.5

3.2^2 = 10.24; therefore the solution to sqrt(10) lies between 3.1 and 3.2

3.15^2 = 9.9225; therefore the solution to sqrt(10) lies between 3.15 and 3.2

3.16^2 = 9.9856; therefore the solution to sqrt(10) lies between 3.16 and 3.2

3.17^2 = 10.0489; therefore the solution to sqrt(10) lies between 3.16 and 3.17

and so on, until your fingers bleed. Or you make a mistake calculating one of those squares (which is very likely without a calculator) and fuck everything up :P :

there is another algorithm which I don't know very well but is a better than this, which was taught to students back in the day but has fallen out of favor since you can buy a calculator that can do this for you for about $1:
http://www.homeschoolmath.net/teaching/square-root-algorithm.php

/e actually looking at that algorithm, I don't think it is much better, lol

This post was edited by Azrad on Nov 1 2013 11:38am
Member
Posts: 21,861
Joined: Dec 13 2010
Gold: 0.91
Nov 1 2013 12:47pm
Quote (Azrad @ 1 Nov 2013 18:19)
well there is brute force: for example, sqrt(10)

3^2 = 9, 4^2 = 16; therefore the solution to sqrt(10) lies between 3 and 4:

3.5^2 = 12.25; therefore the solution to sqrt(10) lies between 3 and 3.5

3.1^2 = 9.61; therefore the solution to sqrt(10) lies between 3.1 and 3.5

3.2^2 = 10.24; therefore the solution to sqrt(10) lies between 3.1 and 3.2

3.15^2 = 9.9225; therefore the solution to sqrt(10) lies between 3.15 and 3.2

3.16^2 = 9.9856; therefore the solution to sqrt(10) lies between 3.16 and 3.2

3.17^2 = 10.0489; therefore the solution to sqrt(10) lies between 3.16 and 3.17

and so on, until your fingers bleed. Or you make a mistake calculating one of those squares (which is very likely without a calculator) and fuck everything up  :P :

there is another algorithm which I don't know  very well but is a better than this, which was taught to students back in the day but has fallen out of favor since you can buy a calculator that can do this for you for about $1:
http://www.homeschoolmath.net/teaching/square-root-algorithm.php

/e actually looking at that algorithm, I don't think it is much better, lol


thanks alot!
very helpful ^.^

gonna send you a donation :D
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Nov 1 2013 07:49pm
There are 2 ways to compute decimals of a square root that I'm aware of, without using exponantial and logarithm functions, and in a direct way (also dichotomy method works fine of course).

The first is using continuous fractions :
every real number X can be expressed via a sequence of integers a1, a2, a3, ... such as : X = a1 + 1/ ( a2 + 1/( a3 + ... ))

If your real number is an algebraic number (like any square root), this sequence is periodic.

Let's try with square root of 5 ( sqrt5 ) :
4 < 5 < 9, hence a1 = 2.

sqrt5 = 2 + 1/x2
x2 = 1 / ( sqrt5 - 2 ) = ( sqrt5 + 2) / 1 = sqrt5 + 2 = 4 + 1/x3
sqrt5 = 2 + 1/x3

hence x2 = x3 = x4 = ... = sqrt5 + 2
and finally a1 = 2, a2 = a3 = a4 = ... = 4

That is to say :

sqrt5 = 2 + 1/ (4+1/(4+1/(4+1/(...)))) = [2,4,4,4,4,4,...]

Now if you want some decimals of sqrt5, just choose a rank for your approximation.

Example :
sqrt5 ~ 2 + 1/(4+1/(4+1/4))
sqrt5 ~ 2 + 1/(4+1/(17/4))
sqrt5 ~ 2 + 1/(4+4/17)
sqrt5 ~ 2 + 1/(72/17)
sqrt5 ~ 2 + 17/72
sqrt5 ~ 161/72

It it possible to prove that, in any case, |sqrt5 - 161/72| < 1/72²
(so your first 3 digits must be correct).

You can go as high as you want to compute every decimals of sqrt5, you are just left with a simple division.
It can be effective if you need a large number of digits, but it's a lot of work if you're just interested in the first 2 or 3 digits...

A second method consists in using the approximation : (1+x)² ~ 1+2x, as x approaches zero.
You can compute as follow :

variable A = 5 (the number you want to know the square root)
variable B = 0 (a kind of first remainder)
variable C = 2 (since we know that 2 is the integer part of sqrt5)

A := A - BC - C²
B := B + 2C
C := [A/B]
where [...] stands for the decimal developement of A/B, stopped at the first non-zero decimal.

step 1 :
A = 5 - 0*2 - 2² = 1
B = 0 + 2*2 = 4
C = [1/4] = 0.2

step 2 :
A = 1 - 4*0.2 - 0.2² = 0.16
B = 4 + 2*0.2 = 4.4
C = [0.16/4.4] = 0.03

step 3 :
A = 0.16 - 4.4*0.03 - 0.03² = 0.0271
B = 4.4 + 2*0.03 = 4.46
C = [0.0271 / 4.46] = 0.006

etc

and finally sqrt5 is the sum of all C's :
2 + 0.2 + 0.03 + 0.006 + ... ~ 2.236

This second method can be used to compute the decimals of a square root with only a pen and a paper.
It used to be taught in smaller classes and is very quick with some practice.

Good luck !
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 1 2013 07:54pm
Member
Posts: 21,861
Joined: Dec 13 2010
Gold: 0.91
Nov 2 2013 04:01am
aye, already solved with Azrad's method,

well but thank you very much! .. epecially thanks to feanur for his effort :thumbsup:

This post was edited by Breee on Nov 2 2013 04:01am
Member
Posts: 6,175
Joined: Jun 22 2005
Gold: 12,542.29
Nov 2 2013 04:42am
so i know ur already done with ur problem but honestly guessing and checking isnt really going to impress ur teacher. try this out:
http://www.wikihow.com/Find-a-Square-Root-Without-a-Calculator
it honestly blew my mind for how close u can get and its really simple to calculate
Member
Posts: 21,861
Joined: Dec 13 2010
Gold: 0.91
Nov 2 2013 04:51am
Quote (hellomoto13 @ 2 Nov 2013 11:42)
so i know ur already done with ur problem but honestly guessing and checking isnt really going to impress ur teacher. try this out:
http://www.wikihow.com/Find-a-Square-Root-Without-a-Calculator
it honestly blew my mind for how close u can get and its really simple to calculate


I think this is exactly the method from the link of azrad & i used it ^^

but ty ^^
Go Back To Homework Help Topic List
Add Reply New Topic New Poll