Today, technologies make everything easy and fast. And sometimes, when we see the ancient marvels of engineering, we wonder: “How they designed this without computers”? And the answer is: “with knowledge, inspiration and hard work”.

However, being almost irreplaceable, computers makes us more and more adjective. Our brains become lazy and we are losing some knowledge and skills. Such is the manual calculation of root. It is so easy and elegant, so I will share it here for the sake of the good old math science.

## Square root

Let’s calculate *x* = √*a* first. By squaring both sides and moving *a* to the left side, we obtain the following equation:

*x*^{2} − *a* = 0

This is an equation of type *f*(*x*) = 0 and we can solve it numerically, using the Newton’s method, as follows:

- Start with initial guess:
*x*_{0}. It is good to be close to the solution, so you can use the nearest exact root. - Calculate the next approximation of the root by the equation:
*x*_{1}=*x*_{0}−*f*(*x*_{0})/*f*′(*x*_{0}) - Continue the iterations by using the previous result to estimate a new one:
*x*_{n+1}=*x*_{n}−*f*(*x*_{n})/*f*′(*x*_{n}). - Stop when you reach the desired precision.

In the above formulas, *f*(*x*) is the function and *f*′(*x*) is the first derivative. In our case:*f*(*x*) = *x*^{2} − *a**f*′(*x*) = 2*x*

If we substitute the above equations into the Newton’s iterative formula, we get:*x*_{n+1} = *x*_{n} − (*x*_{n}^{2} − *a*)/2*x*_{n}*x*_{n+1} = (*x*_{n} + *a*/*x*_{n})/2

Now, lets use it to calculate √a = ?, for *a* = 5. We will start with an initial guess of *x*_{0} =√4 = 2.

1st iteration: *x*_{1} = (*x*_{0} + *a*/*x*_{0})/2 = (2 + 5/2)/2 = 2.25

2nd iteration: *x*_{2} = (*x*_{1} + *a*/*x*_{1})/2 = (2.25 + 5/2.25)/2 = 2.2361

3rd iteration: *x*_{3} = (*x*_{2} + *a*/*x*_{2})/2= (2.2361 + 5/2.2361)/2 = 2.2361

After the second iteration, we have 5 correct significant digits, which is quite sufficient for most cases.

## Cubic root

We will use the same approach, as follows:*f*(*x*) = *x*^{3} − *a**f*′(*x*) = 3*x*^{2}

*x*_{n+1} = *x*_{n} − (*x*_{n}^{3} − *a*)/3*x*_{n}^{2}*x*_{n+1} = (2*x*_{n} + *a*/*x*_{n}^{2})/3

Let’s see how it works for ^{3}√7. Our initial guess is: *x*_{0} = ^{3}√8 = 2.

1st iteration: *x*_{1} = (2*x*_{0} + *a*/*x*_{0}^{2})/3 = (2·2 + 7/2^{2})/3 = 1.9167

2nd iteration: *x*_{2} = (2*x*_{1} + *a*/*x*_{1}^{2})/3 = (2·1.9167 + 7/1.9167^{2})/3 = 1.9129

3rd iteration: *x*_{3} = (2*x*_{2} + *a*/*x*_{2}^{2})/3 = (2·1.9129 + 7/1.9129^{2})/3 = 1.9129

Again, we managed to find it after two iterations. We can also use Calcpad to create a tiny program for that:

It is interesting that after just 4 iterations, the Newton’s method finds 16 correct significant digits, which is the limit precision for most computers. We also calculated the root by three different methods which gived the same result.