How to calculate square/cubic root by hand?

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:

x2a = 0

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

  1. Start with initial guess: x0. It is good to be close to the solution, so you can use the nearest exact root.
  2. Calculate the next approximation of the root by the equation: x1 = x0f(x0)/f′(x0)
  3. Continue the iterations by using the previous result to estimate a new one:
    xn+1 = xnf(xn)/f′(xn).
  4. 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) = x2a
f′(x) = 2x

If we substitute the above equations into the Newton’s iterative formula, we get:
xn+1 = xn − (xn2a)/2xn
xn+1 = (xn + a/xn)/2

Now, lets use it to calculate √a = ?, for a = 5. We will start with an initial guess of x0 =√4 = 2.

1st iteration: x1 = (x0 + a/x0)/2 = (2 + 5/2)/2 = 2.25
2nd iteration: x2 = (x1 + a/x1)/2 = (2.25 + 5/2.25)/2 = 2.2361
3rd iteration: x3 = (x2 + a/x2)/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) = x3a
f′(x) = 3x2
xn+1 = xn − (xn3a)/3xn2
xn+1 = (2xn + a/xn2)/3

Let’s see how it works for 3√7. Our initial guess is: x0 = 3√8 = 2.

1st iteration: x1 = (2x0 + a/x02)/3 = (2·2 + 7/22)/3 = 1.9167
2nd iteration: x2 = (2x1 + a/x12)/3 = (2·1.9167 + 7/1.91672)/3 = 1.9129
3rd iteration: x3 = (2x2 + a/x22)/3 = (2·1.9129 + 7/1.91292)/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.

Published by Calcpad

Hi, my name is Ned. I am a structural engineer with over 20 years of experience in the design of nuclear and industrial facilities, factories, residential and public buildings. I am a fan of engineering, mathematics and computer programming. I spend a lot of time for developing of useful tools that help structural design.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: