Finding roots without a calculator?

  • Thread starter Thread starter eNathan
  • Start date Start date
  • Tags Tags
    Calculator Roots
AI Thread Summary
To raise a number to a power without a calculator, methods like Newton's method and Horner's method are discussed as effective techniques. Newton's method involves iterative formulas for finding square roots and higher roots, such as x:=(x+N/x)/2 for square roots. The conversation also touches on the complexity of these methods and the possibility of expressing roots in a single equation. For fractional powers, the general algorithm for finding roots is emphasized, requiring knowledge of derivatives for accurate calculations. Overall, while there are established methods, finding simpler techniques remains a topic of interest.
eNathan
Messages
351
Reaction score
2
hello. I was wanting to know how to raise a number to any power without using a calculator. More specifically, I was wanting to raise numbers to the .5 power, (and all the other roots, 1/2, 1/3, 1/4). How can this be done?

<---------------------->

My fellow 633|<5 :smile:
 
Mathematics news on Phys.org
Newton's method is one of the more general ways. For an example of getting a square root, see http://planetmath.org/encyclopedia/NewtonRaphsonMethod.html .
 
Last edited by a moderator:
Horner's Method

http://math.fullerton.edu/mathews/n2003/horner/HornerBib/Links/HornerBib_lnk_1.html is also good.
 
Last edited by a moderator:
hmn, it all seems very complicated. I will try to go over those sites tho :) But isn't there just an equation that can do it? It might be an extreamly large equation, but there should be one right?
 
Not really.Handy methods would involve logarithm tables and slide rule...

Daniel.

P.S.Do u know the algorithm of extracting sq.root from any real #...?If not,learn it...
 
Yes, those references do look a bit complicated. Newton's method for finding the square root of N is to use the iterative formula x:=(x+N/x)/2, and for kth roots I think it is x:=((k-1)x+N/(x^(k-1))). There is also an algorithm for finding the square root from the decimal expansion, given at http://www.geocities.com/cnowlen/Cathy/Emat4680/Squareroot.htm (This used to be taught in schools in the days before calculators) There are similar algorithms for higher roots, but they do get a bit difficult.
 
Yes, those references do look a bit complicated. Newton's method for finding the square root of N is to use the iterative formula x:=(x+N/x)/2, and for kth roots I think it is x:=((k-1)x+N/(x^(k-1))). There is also an algorithm for finding the square root from the decimal expansion, given at http://www.geocities.com/cnowlen/Ca.../Squareroot.htm (This used to be taught in schools in the days before calculators) There are similar algorithms for higher roots, but they do get a bit difficult.

notice in the equation x:=(x+N/x)/2 you yse the variable "x" when the whole purpose of the equation is to get the value of "x". What is the logic in that?

chronon, would you happen to be a Delphi programmer? lol, I just notice how you use the ":=" operator instead of "=". := is the variable assignment operator in Delphi, and is quite unique from any other language (exept Pascal which is the same), so that is why I ask. :smile:

And dextercioby, I have a theory that anything can be expressed in a single equation. I find it hard to believe that it is imposible to make an equation to find the square root, no matter how long it is.
 
:= \ \mbox{or} \ =: could also stand for definitions...

Daniel.

P.S.If u have a theory,publish it...
 
P.S.If u have a theory,publish it...

lol. yes, I have found my theory to be true (and when its not, its a result of my own mind not being able to make the euqations). Did you know you can do boolean operations in an equation? It is equavilent to running "if" statements in computer code. And what makes this posible is the fact that a negative times a negative is a positive, while a positive times a positive is a positive. Do you agree with my theory?
 
Last edited:
  • #10
U know,every mathematical theory needs "acta,non verba",meaning formulas/ae.

Daniel.
 
  • #11
Here is a very simple example of my theory.

//in code...
If x < 0 then R = -i
Else If x > 0 then R = i

//Translation: If x is negative, then R equals the negative form of i. If x is
//positive, then R equals the positive form of i.

Or, in an equation...

R=i(x/abs(x))
 
  • #12
eNathan said:
chronon, would you happen to be a Delphi programmer? lol, I just notice how you use the ":=" operator instead of "=". := is the variable assignment operator in Delphi, and is quite unique from any other language (exept Pascal which is the same), so that is why I ask. :smile:

Yes, I am a Delphi programmer, and I used := deliberately because, to me, it shows that it is an assignment (that is you start with x having some value and repeatedly replace x with (x+N/x)/2 ) rather than an equation.
 
  • #13
eNathan said:
notice in the equation x:=(x+N/x)/2 you yse the variable "x" when the whole purpose of the equation is to get the value of "x". What is the logic in that?
It is iterative. In sequential form, one guesses an a0 that is close to the root (this can be made more precise, but such machinery is unnecessary at this level) and uses it to generate a series of ai's that converge to your root. For a square root of some number b, the relation is an = (1/2)(an-1 + b/an-1) . As shown in the link, 3 or 4 iterations will give more digits than a simple scientific calculator.
 
  • #14
notice in the equation x:=(x+N/x)/2 you yse the variable "x" when the whole purpose of the equation is to get the value of "x". What is the logic in that?

It's an iterated algorithm. It isn't really

x = \frac{x + \frac{N}{x}}{2},

but

x_{n+1} = \frac{x_n + \frac{N}{x_n}}{2}

where N is the number you want the root of. Say, for example, I want \sqrt{2}, so N=2. Then I make the initial guess x_1 = 1, so

x_2 = \frac{x_1 + \frac{2}{x_1}}{2} = \frac{1+\frac{2}{1}}{2} = \frac{3}{2} = 1.5

x_3 = \frac{x_2 + \frac{2}{x_2}}{2} = \frac{\frac{3}{2} + \frac{2}{\frac{3}{2}}}{2} = \frac{17}{12} \approx 1.4167

x_4 = \frac{x_3 + \frac{2}{x_3}}{2} = \frac{\frac{17}{12} + \frac{2}{\frac{17}{12}}}{2} \approx 1.414216

and you can repeat as necessary to get arbitrarily close. The exact root is 1.414213562....

In general, if you want to solve for a root of a differentiable real-valued function f of a single variable x, the algorithm is

x_{n+1} = x_n - \frac{f(x_n)}{f^\prime(x_n)},

though this algorithm is by no means guaranteed to converge (it is quite easy to put conditions on its convergence though).

Anyways, what exactly do you mean by

...anything can be expressed in a single equation.

?
 
Last edited:
  • #15
I have tried that method over and over...and it actually gets the root! I think I can implement this method into an asm code using a loop. There is one probem tho. I thougt that I could use this method to raise any number to any power. For instance, if I wanted to do 25^.4 I would run the equation x:=(x+n/x)/2.5 (I use 2.5 because it is the Multiplicative Inverse of .4) and the closest I get is 4.0... Is there a way around this?

Thanks everyone :)
 
  • #16
You need to use the general algorithm to find different roots. As I said above, this is

x_{n+1} = x_n - \frac{f(x_n)}{f^\prime(x_n)}.

In the square root case, you take f(x) = x^2 - N, and you're trying to find a root, ie. to solve f(x)=0. Thus you use

x_{n+1} = x_n - \frac{f(x_n)}{f^\prime(x_n)} = x_n - \frac{x_n^2 - N}{2x_n} = \frac{x_n + \frac{N}{x_n}}{2}

If you want to find N^{0.4}, then you would be solving f(x) = x^{2.5} - N = 0, which gives

f^\prime(x) = 2.5x^{1.5}

so

x_{n+1} = x_n - \frac{f(x_n)}{f^\prime(x_n)} = x_n - \frac{x_n^{2.5}-N}{2.5x_n^{1.5}} = x_n - \frac{2}{5}x_n + \frac{2N}{5x_n^\frac{3}{2}}

= \frac{3}{5}x_n + \frac{2N}{5x_n{}^{1.5}}

so to use the algorithm to find N^{0.4}, you're going to need to know how to calculate 1.5th roots anyways, unfortunately. But that's not too hard, since 1.5th roots can be found using f(x) = x^2 - n^3, for which the algorithm works nicely :wink:

Edit: Silly me, of course you can just use f(x) = x^5 - N^2 to find N^{0.4}! Then

x_{n+1} = x_n - \frac{x_n^5 - N^2}{5x_n^4} = \frac{4}{5}x_n + \frac{N^2}{5x_n^4}.
 
Last edited:
  • #17
If you memorize the logarithmic table for single digits to about 4 decimal places, you can approximate roots and powers in your head. I actually did this when I was a youth [I didn't have a very glamorous life back then either]. It was fun watching the shocked looks you get upon rattling off fairly accurate cube roots [or other fractional powers] at the drop of a hat.
 
  • #18
The "shocked looks" were probably people wondering why in the world you would DO such a thing!
 
  • #19
lets say you need a root of 65 so y=f(x) where x is 65
f(x) = f(a)+f'(a)(x-a)
sqrt 65 = sqrt64+1/2Sqrt(64)* (65-64) = ~ 8.0625
where a is the closest known root ie a=64 ... sqrt 64 = 8
but this is only good to like 3 significant digits
 
Last edited:
  • #20
Sorry to bring this from the grave but it was the only suitable thread for me to ask if there is an easier way to find cube roots without a calculator than this?

Also square roots without a calculator. This website helped but is there an easier way?

Cheers.

The Bob (2004 ©)
 
Back
Top