4 ms·
I chose a coincidentally easy problem (whoops). Here's another one, less accessible to attack: Find e^7. Or 25000^(1/8). The trick to using the musical scale
by time-of-flight 9y ago
I chose a coincidentally easy problem (whoops).
Here's another one, less accessible to attack: Find e^7. Or 25000^(1/8).
The trick to using the musical scale is that it's logarithmic in frequency but linear in key (ABCDEFG). The frequency step between adjacent notes is 2^(1/12); the frequency jump over an octave is 2; the frequency jump over 40 notes is 10. There are other handy ratios to remember, like that going up a whole step is a frequency increase of 9/8, and the more you know the more powerful this method is.
To solve 25000^(1/8) = x, you're looking for an interval x on the keyboard such that if you were to go up 8 of those intervals, the frequency would jump by 25000. Well, 25000 is just 10^5 / 2^2, or in terms of keyboard intervals, "Go up 40 notes (repeat four more times), then down two octaves". This means to represent a frequency increase by a factor of 25000, I need to go up 105-212 = 176 half steps on a keyboard.
Divide by 8 to find x = 22 steps, which is two octaves minus a whole step on the keyboard. The frequency change over this 22-step interval is thus (2*2) [up two octaves] / (9/8) [down a whole step] ~ 3.5. So that's the final answer: 3.5
The actual value of 25000^(1/8) is 3.546, so this approximation is good to within a couple of percent.
- posterboy 9y agoFor one, actual scales aren't exactly purely logarithmic because of physical limitations (overtones in low freqs) and secondly music has nothing more to do with it than any other log scale, eg ... well I don't actually a more common one
- jonsen 9y agoIf you memorize some of the "nice" log10 approximations like ... log10 2 ~= 0.3 log10 2.5 ~= 0.4 log10 3 ~= 0.5 log10 4 ~= 0.6 ... then 25000^(1/8) could be done mentally as log10 of 25000 is 4.4 4.4 / 8 is 0.55 antilog10 of 0.55 is approximately 3.5
- credit_guy 9y agoA good trick for calculating powers of e is that e^3 ~ 20. So e^7 is roughly 400e, so about 1080, completely without pen and paper. This is only 1.5% off. Your trick is cool too, by the way. For your other challenge, I would use the enormously useful 2^10 = 1024 ~ 1000 (which the musical trick implicitly uses too, in the 40 notes is 10 times the frequency mnemonic). So 25000 is close to 5^2 * 2^10, and it's square root is 5 * 2^5 = 160 (we can always keep in mind that 2^10 ~ 1000 is an overestimate by 2.4%, so our 160 ~ sqrt(25000) is an overestimate by 1.2%, so an improved approximation of sqrt(25000) is 158). 158 is very close to the midpoint of 144 and 169, so its square root is not far from the midpoint of 12 and 13. So my approximation of 25000^(1/4) is 12.5. Finally I need to take a sqrt of that. I know the square of 3.2 is 10.24 (our old friend 2^10 = 1024), and that's about 20% too low. Ok, we need to bump our 3.2 up by 10%, that makes is 3.52, and that's our answer. It's only 0.7% off, but it's only by luck. For a more general problem, keeping a tab of your first estimate as an absolute number and your current correction as a percentage gives an error of less than 2%.