 # Inexact cube roots

In this post, I will describe an iterative method to calculate a cube roots.

Derivation of formulas
We look for a number x such that when raised to the third power, it gives the number N

• Second order formula
Let x = a + b, where b is much less than a
Then N = x3 = (a + b)3 = (a3 + 3a2b) + (3ab2 + b3)
You can omit the expression in the second parenthesis. It has little effect on the sum since b is much less than a.
So N = a3 + 3a2b
Hence b = (N - a3) / (3a2)
Finally, if we have some number a that is approximation to the root, then a better approximation is x = a + b = a + (N-a3) / (3a2)
The next approximation will be accurate to 2 times as many significant digits as the initial approximation.
• Third order formula
This time let x = a + b + c, where b is much less than a and c is much less than b
Then N = x3 = (a + b + c)3 = (a3 + 3a2b) + (3ab2 + 3a2c) + (3ac2 + b3 + 3b2c + 3bc2 + c3)
The expression in the third parenthesis has little effect on the sum.
The expression in the first parenthesis is approximately equal to N.
So the expression in the second parenthesis is approximately equal to 0.
3ab2 + 3a2c = 0
Hence c = - (3ab2) / (3a2) = - b2 / a
Finally, if a is an approximation to a root then a better approximation is x = a + b + c, where b = (N - a ^ 3) / (3a ^ 2) and c = - b ^ 2 / a
The next approximation will be accurate to 3 times as many significant digits as the initial approximation.

Calculation of the cubic root

• Normalization - shift decimal point

• Before starting the calculations, shift the decimal point left or right by the number of positions divisible by 3, so that the number N becomes between 1 and 1000.
After completing the calculations, shift decimal point to the opposite side by 3 times less number of positions.

• Example 1
Cube root of 777256
Shift 3 positions to the left
N = 777.256
After calculations x = 9.19436
Shift 1 position to the right
The result is 91.9436

• Example 2
Cube root of 0.00004389
Shift 6 positions to the right
N = 43.89
After calculations x = 3.5274
Shift 2 positions to the left
The result is 0.035274

• Calculate up to 2 significant figures

• Example 1
Calculating cube root of 118
To find the first digit of the result, it is enough to know the cubes of numbers from 1 to 10.
64 < 118 < 125 so the first digit is 4
However, 118 is much closer to 125 than 64, so 5 would be a better approximation
Let’s apply first formula.
We have N = 118 and a = 5
b = (118 - 125) / (3 * 52) = - 7/75 = -0.1
x = a + b = 5 - 0.1 = 4.9
The result is 4.9

• Example 2
N = 556
512 < 556 < 729, we can see that 556 is much closer to 512 than 729 so
a = 8
b = (556 - 512) / (3 * 82) = 44/192 = 0.2
The last division can be rounded up to 44/200 because only the first digit of this division is needed for the result.
The result is 8.2

• Calculate up to 3 significant figures

• Example 1
N = 662.5
Let’s apply second formula.
The number is close to 729, so a = 9
b = (662.5 - 729) /243 = -66.5/243 = -0.27
You can round the divisor to 240 or 250 but sometimes this will make the result inaccurate.
c = -0.272/9 = -0.07/9 = -0.01
The answer is x = a + b + c = 8.72

• Example 2
N = 156
a = 5
b = (156 - 125) / (3 * 52) = 31/75 = 0.41
c = -0.412/5 = -0.17 / 5 = -0.03
x = 5 + 0.41 - 0.03 = 5.38

• Calculate up to 4 significant figures

• Example 1
N = 142.15
This time the initial approximation will have 2 significant digits.
So we need to know between which two-digit cubes the number N is. The first way is memorization cubes up to 100. Second way is calculating cube root up to 2 digits and calculating cube of this number.
5.23 = 140.608
5.33 = 148.877
So a = 5.2
b = (142.15 - 140.608) / (3 * 5.22) = ((1.542 / 3) /5.2) /5.2 = (0.514 / 5.2) /5.2 = 0.099 / 5.2 = 0.019
In order to avoid division by 4-5 digits numbers, we break the operation into several smaller divisions. We need b to 2 significant digits, so the result of each intermediate division can be rounded to 2-3 digits
x = a + b = 5.219

• Example 2
N = 96.1
4.53 = 91.125
4.63 = 97.336
So a = 4.6
b = (96.1 - 97.336) / 3 / 4.6 / 4.6 = -1.236 / 3 / 4.6 / 4.6 = -0.412 / 4.6 / 4.6 = -0.0896/4.6 = -0.0195
x = 4.6 - 0.0195 = 4.5805

• Calculate up to 6 significant figures

• Example 1
N = 892
9.63 = 884.736
9.73 = 912.673
a = 9.6
b = (892 - 884.736) / (3 * 9.62) = 7.264 / 3 / 9.6 / 9.6 = 2.421 / 9.6 / 9.6 = 0.2522 / 9.6 = 0.02627
Since b is needed up to 4 significant digits, the result of each intermediate division can be rounded to 4-5 digits.
c = -b2 / a = -0.0262 / 9.6 = -0.00068 / 9.6 = -0.00007
When you square b, you can round b to 2 digits.
x = a + b + c = 9.6 + 0.02627 - 0.00007 = 9.62620

• Example 2
N = 362
7.13 = 357.911
7.23 = 373.248
a = 7.1
b = (362 - 357.911) / 3 / 7.1 / 7.1 = 4.089 /3 / 7.1 / 7.1 = 1.363 /7.1 /7.1 = 0.1920 /7.1 = 0.02704
c = -0.027 ^ 2 / 7.1 = -0.00073 / 7.1 = -0.00010
x = a + b + c = 7.12694
In order to increase speed when performing these calculations I don’t pay attention to where the comma is.
I would do 4089/3 = 1363, then 1363/71 = 19.20, then 1920/71 = 27.04
Further 27 ^ 2 = 729 and 729/71 = 10, finally 704-10 = 694

• Note: If it is not possible to write intermediate results, this method requires good short-term memory. Before you calculate the number c, you can’t write the current result 7.12704 but only 7.12, while the last digits (704) must be remembered when calculating c. This means you need to remember 3 other digits when squaring and dividing by a 2-digit number

Summary
The above method allows you to calculate cubic roots very quickly (Using this method, it takes me about 40 seconds on average to calculate with an accuracy of 6 digits). The disadvantage is the necessity to determine at the beginning how many significant digits you want calculate and the requirement of good short-term memory.

2 Likes