I Don’t Have Any Good Ideas For Finding Cube Roots By Trigonometry


So I did a bit of thinking. There’s a prosthaphaeretic rule that lets you calculate square roots using nothing more than trigonometric functions. Is there one that lets you calculate cube roots?

And I don’t know. I don’t see where there is one. I may be overlooking an approach, though. Let me outline what I’ve thought out.

First is square roots. It’s possible to find the square root of a number between 0 and 1 using arc-cosine and cosine functions. This is done by using a trigonometric identity called the double-angle formula. This formula, normally, you use if you know the cosine of a particular angle named θ and want the cosine of double that angle:

\cos\left(2\theta\right) = 2 \cos^2\left(\theta\right) - 1

If we suppose the number whose square we want is \cos^2\left(\theta\right) then we can find \cos\left(\theta\right) . The calculation on the right-hand side of this is easy; double your number and subtract one. Then to the lookup table; find the angle whose cosine is that number. That angle is two times θ. So divide that angle in two. Cosine of that is, well, \cos\left(\theta\right) and most people would agree that’s a square root of \cos^2\left(\theta\right) without any further work.

Why can’t I do the same thing with a triple-angle formula? … Well, here’s my choices among the normal trig functions:

\cos\left(3\theta\right) = 4 \cos^3\left(\theta\right) - 3\cos\left(\theta\right)

\sin\left(3\theta\right) = 3 \sin\left(\theta\right) - 4\sin^3\left(\theta\right)

\tan\left(3\theta\right) = \frac{3 \tan\left(\theta\right) - \tan^3\left(\theta\right)}{1 - 3 \tan^2\left(\theta\right)}

Yes, I see you in the corner, hopping up and down and asking about the cosecant. It’s not any better. Trust me.

So you see the problem here. The number whose cube root I want has to be the \cos^3\left(\theta\right) . Or the cube of the sine of theta, or the cube of the tangent of theta. Whatever. The trouble is I don’t see a way to calculate cosine (sine, tangent) of 3θ, or 3 times the cosine (etc) of θ. Nor to get some other simple expression out of that. I can get mixtures of the cosine of 3θ plus the cosine of θ, sure. But that doesn’t help me figure out what θ is.

Can it be worked out? Oh, sure, yes. There’s absolutely approximation schemes that would let me find a value of θ which makes true, say,

4 \cos^3\left(\theta\right) - 3 \cos\left(\theta\right) = 0.5

But: is there a way takes less work than some ordinary method of calculating a cube root? Even if you allow some work to be done by someone else ahead of time, such as by computing a table of trig functions? … If there is, I don’t see it. So there’s another point in favor of logarithms. Finding a cube root using a logarithm table is no harder than finding a square root, or any other root.

If you’re using trig tables, you can find a square root, or a fourth root, or an eighth root. Cube roots, if I’m not missing something, are beyond us. So are, I imagine, fifth roots and sixth roots and seventh roots and so on. I could protest that I have never in my life cared what the seventh root of a thing is, but it would sound like a declaration of sour grapes. Too bad.

If I have missed something, it’s probably obvious. Please go ahead and tell me what it is.

How To Calculate A Square Root By A Method You Will Never Actually Use


Sunday’s comics post got me thinking about ways to calculate square roots besides using the square root function on a calculator. I wondered if I could find my own little approach. Maybe something that isn’t iterative. Iterative methods are great in that they tend to forgive numerical errors. All numerical calculations carry errors with them. But they can involve a lot of calculation and, in principle, never finish. You just give up when you think the answer is good enough. A non-iterative method carries the promise that things will, someday, end.

And I found one! It’s a neat little way to find the square root of a number between 0 and 1. Call the number ‘S’, as in square. I’ll give you the square root from it. Here’s how.

First, take S. Multiply S by two. Then subtract 1 from this.

Next. Find the angle — I shall call it 2A — whose cosine is this number 2S – 1.

You have 2A? Great. Divide that in two, so that you get the angle A.

Now take the cosine of A. This will be the (positive) square root of S. (You can find the negative square root by taking minus this.)

Let me show it in action. Let’s say you want the square root of 0.25. So let S = 0.25. And then 2S – 1 is two times 0.25 (which is 0.50) minus 1. That’s -0.50. What angle has cosine of -0.50? Well, that’s an angle of 2 π / 3 radians. Mathematicians think in radians. People think in degrees. And you can do that too. This is 120 degrees. Divide this by two. That’s an angle of π / 3 radians, or 60 degrees. The cosine of π / 3 is 0.5. And, indeed, 0.5 is the square root of 0.25.

I hear you protesting already: what if we want the square root of something larger than 1? Like, how is this any good in finding the square root of 81? Well, if we add a little step before and after this work, we’re in good shape. Here’s what.

So we start with some number larger than 1. Say, 81. Fine. Divide it by 100. If it’s still larger than 100, divide it again, and again, until you get a number smaller than 1. Keep track of how many times you did this. In this case, 81 just has to be divided by 100 the one time. That gives us 0.81, a number which is smaller than 1.

Twice 0.81 minus 1 is equal to 0.62. The angle which has 0.81 as cosine is roughly 0.90205. Half this angle is about 0.45103. And the cosine of 0.45103 is 0.9. This is looking good, but obviously 0.9 is no square root of 81.

Ah, but? We divided 81 by 100 to get it smaller than 1. So we balance that by multiplying 0.9 by 10 to get it back larger than 1. If we had divided by 100 twice to start with, we’d multiply by 10 twice to finish. If we had divided by 100 six times to start with, we’d multiply by 10 six times to finish. Yes, 10 is the square root of 100. You see what’s going on here.

(And if you want the square root of a tiny number, something smaller than 0.01, it’s not a bad idea to multiply it by 100, maybe several times over. Then calculate the square root, and divide the result by 10 a matching number of times. It’s hard to calculate with very big or with very small numbers. If you must calculate, do it on very medium numbers. This is one of those little things you learn in numerical mathematics.)

So maybe now you’re convinced this works. You may not be convinced of why this works. What I’m using here is a trigonometric identity, one of the angle-doubling formulas. Its heart is this identity. It’s familiar to students whose Intro to Trigonometry class is making them finally, irrecoverably hate mathematics:

\cos\left(2\theta\right) = 2 \cos^2\left(\theta\right) - 1

Here, I let ‘S’ be the squared number, \cos^2\left(\theta\right) . So then anything I do to find \cos\left(\theta\right) gets me the square root. The algebra here is straightforward. Since ‘S’ is that cosine-squared thing, all I have to do is double it, subtract one, and then find what angle 2θ has that number as cosine. Then the cosine of θ has to be the square root.

Oh, yeah, all right. There’s an extra little objection. In what world is it easier to take an arc-cosine (to figure out what 2θ is) and then later to take a cosine? … And the answer is, well, any world where you’ve already got a table printed out of cosines of angles and don’t have a calculator on hand. This would be a common condition through to about 1975. And not all that ridiculous through to about 1990.

This is an example of a prosthaphaeretic rule. These are calculation tools. They’re used to convert multiplication or division problems into addition and subtraction. The idea is exactly like that of logarithms and exponents. Using trig functions predates logarithms. People knew about sines and cosines long before they knew about logarithms and exponentials. But the impulse is the same. And you might, if you squint, see in my little method here an echo of what you’d do more easily with a logarithm table. If you had a log table, you’d calculate \exp\left(\frac{1}{2}\log\left(S\right)\right) instead. But if you don’t have a log table, and only have a table of cosines, you can calculate \cos\left(\frac{1}{2}\arccos\left(2 S - 1 \right)\right) at least.

Is this easier than normal methods of finding square roots? … If you have a table of cosines, yes. Definitely. You have to scale the number into range (divide by 100 some) do an easy multiplication (S times 2), an easy subtraction (minus 1), a table lookup (arccosine), an easy division (divide by 2), another table lookup (cosine), and scale the number up again (multiply by 10 some). That’s all. Seven steps, and two of them are reading. Two of the rest are multiplying or dividing by 10’s. Using logarithm tables has it beat, yes, at five steps (two that are scaling, two that are reading, one that’s dividing by 2). But if you can’t find your table of logarithms, and do have a table of cosines, you’re set.

This may not be practical, since who has a table of cosines anymore? Who hasn’t also got a calculator that does square roots faster? But it delighted me to work this scheme out. Give me a while and maybe I’ll think about cube roots.

Reading the Comics, July 5, 2013


I’m surprised to discover it’s been over a month since I had a roster of mathematics-themed comic strips to share, but that’s how things happen to happen. It’s also been a month with repeated references to “finding square roots”, I suppose because that sounds like a really math-y thing to do. It’s certainly computationally challenging; the task of finding such is even a (very minor) moment in Isaac Asimov’s magnificent short story about arithmetic, “The Feeling Of Power”. I remember reading the procedure for finding them when I was a kid, and finding that with considerable effort, I was able to, though I’d probably refuse to do more than give a rough estimate of such a root nowadays.

Bill Watterson’s Calvin and Hobbes (June 4, rerun) is another entry in the long string of jokes about “why bother studying mathematics”, but Watterson’s craft lifts it above average. Admire that fourth panel: that’s every resistant student in one pose.

Continue reading “Reading the Comics, July 5, 2013”

I Know The Square Root Of Five, Too


Now I want to do a little more complicated problem of showing two numbers are equal because the difference between them is so tiny. It struck me that if I wanted to do that, I’d have to do some setup to even start. What I really meant to do was to show that some number was equal to the square root of five. I picked the square root of five because I had it burned into my memory from a children’s book that knowing the first few digits of an irrational number would be sufficient to immobilize the mind-controlled population of an all-powerful computer dictator, and I’ve kept it in mind just in case ever since. I’m also glad to know on double-checking that I remembered the first couple digits of the square root of five well (2.236). I’m shakier on the square root of seven (2.something) so if it’s a more advanced computer we’re up against I’m in trouble.

Still, most square roots would do. It’s a neat little property of the whole numbers that the square roots of them are either whole numbers themselves — the square root of 4 is 2, the square root of 169 is 13, the square root of 4,153,444 is not worth thinking about — or else they’re irrational numbers, going on without ending and without repetition. Most people who’d read a mathematics blog on purpose have heard about how the irrationality of the square root of 2 was proven in ancient days, and maybe heard the story of how the Pythagoreans murdered the person who let slip the horrifying secret that there were irrational numbers and they represented real things that might be of interest, and a few are even aware we don’t really know with certainty that the story’s actually true. (At this point, I suspect it’s too strong a claim to say we know anything about the Pythagoreans for certain, but I haven’t looked closely. Maybe matters are not quite that dismal.) Whether true or not the legend of the Pythagoreans turning to murder is a fine way to get an algebra class’s attention. I just fear that what the students take away from it is, “if you learn any of this math stuff a cabal of mathematicians will murder you” and they stay oblivious for reasonable self-protection.

But anyone who’s understood a proof that the square root of two is irrational is perfectly able to show that the square root of three is irrational as well, or the square root of five, or any other such desired number. The proof that way runs just about the same route, but takes longer to get there.

Similarly, if you have a rational number that comes to an end, such as 0.49, then the square root either is a rational number that comes to an end, in this case 0.7; or else it never comes to an and and never repeats. That’s easy to prove, if you have that idea about the square roots of whole numbers. The square root of 4.9, for example, is not a rational number, although I can’t promise anything for its ability to halt world-spanning computers.