Approximating cube roots to high precision.

1.6k Views Asked by At

I learned that to approximate $\sqrt{n}$ to one digit of precision (where $n$ is a real number), we find the closest square to $n$ ($s^2$), take the square root of that, and add the following $$\frac{n-s^2}{2s}\tag{1}$$ where the two in the denominator of $(1)$ comes from the two in the denominator of the power ($\sqrt{n}=n^{1/2}$).

I thought that to approximate cube roots, we replace that two with a three and we choose the closest cube instead. However, I don’t get great approximations when doing that. For example, using this method we get that the cube root of 200 is about 6.1, which isn’t the desired $5.8$.

So how can we approximate cube roots for at least one decimal digit without technical assistance?

Edit: By "technical assistance" I originally meant computers, calculators, or any machinery that computes expressions quickly. But this now includes things like no big coefficients, radicals, or anything too complicated. The purpose of this question was to be able to compute cube roots mentally.

7

There are 7 best solutions below

3
On BEST ANSWER

I think your formula for square roots should be

$$\frac{n+s^2}{2s}.$$

This is an implementation of Newton's Method (which is easy to look up.) The equivalent for cube roots is

$$\frac{n+2s^3}{3s^2}$$

If you take $n=6$, it gives $5.851851853...$

Note that you can always take the output and put it back into the formula and get an even better approximation for $s$. You can do this as often as you like.

EDIT: OK, I see that your formula gives you a number to add to your guess. My formula has the guess already figured in. To get the square root of $10$, I guess $s=3$ to get $(10+3^2)/6 = 3.16667.$ To get a better approximation, put in $3.16667$ to get

$$\frac{10+3.16667^2}{2*3.16667} = 3.162280707.$$

2
On

Since you have a trick for square roots already, consider, for $s^3$ the largest cube smaller than $n$, $$\sqrt[3]n\approx\frac{s}{2}+\sqrt{\frac{4n-s^3}{12s}}.$$

This is a better approximation than the use of differentials via $\frac{n-s^3}{3s^2}$.

Reference: Poursaeed M. H., A Way of Approximation of a Cube Root, here

3
On

The problem is to find a simple approximation of $\sqrt[3] x$ for $0\leq x \leq 1000$.

Since, around $x=a^3$, the Taylor series is $$\sqrt[3] x=\sum_{n=0}^\infty \binom{\frac{1}{3}}{n}\, a^{1-3 n}\,(x-a^3)^n$$ the idea is to convert it as the corresponding $[m,m]$ Padé approximant $P_m$ of low degree $m$. For example, the simplest $$P_1=\frac{b \left(b^3+2 x\right)}{2 b^3+x}$$ whose error is $\frac{2 \left(x-b^3\right)^3}{81 b^8}$.

The problem being to find the best integer value of $b$ (between $0$ and $10$), compute the norm $$\Phi_m(b)=\int_0^{1000} \Big(\sqrt[3] x-P_m \Big)^2 \,dx$$ and to minimize it with respect to $b$.

For example, for $m=1$, we have $b=7$ and then $$\sqrt[3] x \sim \frac{7 (2 x+343)}{x+686}$$

For mental calculations, you could replace $343$ by $350$ and $686$ by $700$.

Trying for $x=456.789$, this gives $7.69700$ while the exact value is $7.70144$ which seems to be decent.

1
On

I'll take "without technical assistance" to mean that you want arithmetic that you can do easily, so no square roots, multiplying by large coefficients, and so on.

Your approximation is

$$\sqrt{n} \approx s + {n - s^2 \over 2s}$$

where $s^2$ is the closest square to $n$. This is just a linear approximation to $\sqrt{n}$ at $n = s^2$. The derivative of $\sqrt{n}$ with respect to $n$ is $1/{2\sqrt{n}}$, which is where the $2s$ comes from. Alternately, this is Newton's method applied with an initial guess of $s$.

Similarly let $c^3$ ($c$ for "cube") be the closest cube to $n$. Then you have

$$n^{1/3} \approx c + {n - c^3 \over 3c^2} $$

since the derivative of $n^{1/3}$ with respect to $n$ is $1/{3 n^{2/3}}$, or again by a single step of Newton's method.

Let's use this to find, for example, the cube root of 400. The closest cube to 400 is $343 = 7^3$ so you get

$$400^{1/3} \approx 7 + {400 - 343 \over 3 \times 7^2} = 7 + {57 \over 147} = 7.387\ldots $$

and it's reasonable to mentally approximate that fraction and get $7.4$. The correct value is $7.368\ldots$

As for how accurate this is, it's least accurate midway between the cubes, when $n = (c \pm 1/2)^3$. Then the approximation to the cube root will be

$$ c + {(c \pm 1/2)^3 - c^3 \over 3 n^2} = c + {\pm 3c^2/2 \mp 3c/4 \pm 1/8 \over 3c^2} = c \pm {1 \over 2} \mp {1 \over 4c} \pm {1 \over 8c^2} $$

and so this approximation is accurate to about $1/(4c)$. You asked for one-place accuracy; if I take that to mean the approximation is good to within 0.05 then this means we'll get that when $c > 5$. (This assumes you can do mental arithmetic perfectly, and always choose the nearest cube $c$ correctly.)

2
On

For $r = \sqrt[3]{n} = \sqrt[3]{\alpha^3 + \beta}$, where $\beta$ is chosen to be close to zero, the idea is for initial guess $r_1 = \alpha$, $$ n^3 = (\alpha + \epsilon)^3 = \alpha^3 + \underbrace{3\alpha^2\epsilon + 3\alpha\epsilon^2 + \epsilon^3}_\beta $$

Newton's Method (one step): Using just first-order $\epsilon$ term, ignoring $\epsilon^2$ and $\epsilon^3$ terms, we get $\beta \approx 3 \alpha^2 \epsilon$, that is $\epsilon \approx \beta / (3\alpha^2)$, so the approximation is $$ r_2 = \alpha + \epsilon = \alpha + \frac{\beta}{3 \alpha^2} $$

Halley's method (one step, in njuffa's answer): Using the second order $\epsilon$ and $\epsilon^2$ terms, ignoring just the $\epsilon^3$ term, we get $\beta \approx 3 \alpha^2 \epsilon + 3 \alpha\epsilon^2$, so $$ \epsilon \approx \frac{\beta}{3\alpha^2 + 3 \alpha \epsilon} $$

This is a recursive formula, but approximating the denominator $\epsilon$ with our previous $\epsilon \approx \beta / (3\alpha^2)$, the root approximation is

$$ r_3 = \alpha + \frac{\beta}{3\alpha^2 + \beta / \alpha} = \alpha + \frac{\alpha\beta}{3 \alpha^3 + \beta} = \alpha + \frac{\alpha\beta}{3n - 2\beta} $$

These also appear in General Method for Extracting Roots using (Folded) Continued Fractions by Manny Sardina which gives some continued fraction (rational) approximations for integer cube roots (Section 2.6).

For your example $y=200$ (with $\sqrt[3]{200} \approx 5.8480$), the approximations for $\alpha = 6, \beta = -16$ are

\begin{align} r_1 &= 6 \\ r_2 &= 6 - \frac{16}{3 \times 6^2} = \frac{158}{27} = 5.851851 \dots \tag{1 decimal digit}\\ r_3 &= 6 + \frac{6 \times -16}{3 \times 200 + 2 \times 16} = \frac{462}{79} = 5.84810\dots \tag{3 decimal digits}\\ \end{align}

Just for fun, here are the errors of $r_2$ and $r_3$ for $1 \le x \le 1000$, simply taking $\alpha = \operatorname{round}(r)$:

library(tidyverse)

cbrt_err <- function(x) {
  r <- x^(1/3)
  alpha <- round(r)
  beta <- x - alpha^3
  r1 <- alpha
  r2 <- alpha + beta / (3 * alpha^2)
  r3 <- alpha + (alpha*beta) / (3*x - 2*beta)
  list(r-r1, r-r2, r-r3)
}

ggplot() + 
  xlim(1, 1000) + 
  geom_function(aes(color = "r2 err"), fun = ~ cbrt_err(.)[[2]], n=10000) + 
  geom_function(aes(color = "r3 err"), fun = ~ cbrt_err(.)[[3]], n=10000) + 
  labs(y = "error") +
  theme_bw()

approx errors

3
On

Edmond Halley, "A New, Exact, and Easie Method, of finding the Roots of any Equations Generally, and that without previous Reduction." In Miscellanea Curiosa, Vol. II., London 1706, pp. 70-88, suggested the following computation on p. 73, the so-called rational formula. I have translated this into the terminology used by the asker and have corrected a typographical error in the original. Let $c^{3}$ be the closest cube to $n$, such that $c^{3} \le n$. Then $$\sqrt[3]{n} \approx c + \frac{c(n-c^{3})}{3c^{3}+(n-c^{3})}$$

3
On

You can also use the Taylor expansion: $(1+x)^a\sim 1+ax$. I'll show you the tecnique in a specific example and then you can generalize it. Consider $\sqrt[3] {200}$, and rewrite it as $\sqrt[3] {216-16}$: $$\sqrt[3] {216-16}=\sqrt[3] {216\left(1-\frac{2}{27}\right)}=6 \sqrt[3] {1-\frac{2}{27}}\sim6\left(1-\frac{2}{81}\right)\approx5.85$$ Obviously, if you want to have more precision, you can use more terms from the Taylor series.