by kazinator · 4y ago · 0 comments
That is not entirely true. It comes from the relationship between those functions and the complex numbers via the Euler formula.
ix
e = cos x + i sin x
There may be arithmetic/numerical inconveniences, but that's not all there is to "math".Let's define ncos and nsin ("nice cos, nice sin") as follows:
nsin x = sin 2πx
ncos x = cos 2πx
So then what do we make of: ncos x + i nsin x
This has to be cos 2πx + i sin 2πx
which is then 2πix ( 2π) ix ix
e = ( e ) = f
2π
Where f = e is a weird number like 535.4916. This f doesn't have nice properties. E.g.: d x x
- f /= f
dx
Otherwise it works; for instance 90 degrees is 0.25 and surely enough 0.25i
f = i
In situations not involving e in relation to angular representations via Euler, f cannot replace e.I'm all for having parallel trig functions in libraries that work with turns, though.
The annoying 2π factor shows up in lots of places though. Should way, say, in electronics, redefine a new version of capacitive reactance which doesn't have 2πf in the denominator, but only f?
(-1)^(2x) = ncos(x) + i nsin(x)
And yes, -1 is a very weird number. If you take it to the power of something divisible by 2 you get itself raised to zero. What's up with this spooky periodicity? Also if you have x=1/4, then we get weird numbers like sqrt(-1) what on earth is that all about? No way that will fly, no way. No I'll take my 2.718^((-1)^(1/2)) and multiply through with 6.28318 that way I don't have to bother understanding what I'm doing I can sleep comfortable at night knowing that someone else has done all the thinking that needs to be done on the matter, and that turns or rotations are a blasphemous concept that breaks the very concept of math through scaling of an axis. You'd think math was strong enough to withstand such a minor change, but the textbooks do not mention it thus it must not be contemplated!
There's a famous equation relating sin and cos to complex exponentiation. It also helps explain the Taylor expansions of sin and cos, which is one way to compute them and to find properties about them. It's a very important equation. It is:
ix
e = cos x + i sin x
kazinator's point was that this equation relies on cos and sin taking radians as arguments. If they take turns instead, then you need to insert messy extra constants to state this equation!jVinc's counter-point, made with lots of snark, is that there's an equation that's even nicer if you just instead measure angles in turns with ncos and nsin:
(-1)^(2x) = ncos(x) + i nsin(x)
It's similar, but doesn't require the magic constant e.A proof sketch that these are equivalent:
(-1)^(2x) = e^ln((-1)^(2x)) = -e^(2x) = e^(i * (2 pi x)) using e^(pi i) = -1 1^x = ncos(x) + i nsin(x)
using a multi-valued definition of the exponentiation on the left hand side.Same way we might use electron volts rather than volts to make the equations nice.
2πix πi2x ( πi ) 2x
e -> e -> (e )
Where e^(πi) is -1. That shows there is something to the turns units; we can express the analog of the Euler identity using exponentiation using a base and factor which are integers.Huge selling point for turns, IMHO.
Ok, then let’s measure angles in quarter-turns! Then the equation becomes even nicer:
i^x = cos(x) + isin(x)
Beautiful! :-0
Except not. Because you’re obscuring the connection of sin/cos with their hyperbolic counterparts. I.e. this is no longer true:
sinh(x) = -isin(ix)
cosh(x) = cos(ix)
Also, this new convention obscures the connection with the exponential map of Lie groups.
I.e. the exponential map of the complex unit circle as a Lie group is:
e^ix = cos(x) + isin(x)
Similarly, the exponential map of the unit hyperbola of the split-complex plane is:
e^jx = cosh(x) + jsinh(x)
Similarly, for the group of unit quaternions:
e^q = cos(|q|) + sin(|q|)(q/|q|)
These are deep connections, which would be obscured by using anything other than radians.
Only because we forgot the name change: these are supposed to to be nsin and ncos.
Remember also that people use sin and cos with 360-degree degrees just fine; and don't worry about wrecking the connection to the hyperbolic counterparts --- and without changing the names, either.
(-1)^x = ncos(x) + i nsin(x)
It's obvious how to handle it for integers (an even number of half turns is 1, an odd number is -1), and the extension to real numbers aids the intuition.
Or, depending on your focus, quarter turns are very clean too:
i^x = ncos(x) + i nsin(x)
Either way, turns > radians (it's what I think in when doing most fourier kinds of work anyways!).
>(-1)^(2x) = ncos(x) + i nsin(x)
Try to formally define this procedure, though. You end up going in circles.
Here's another version:
lim[N->infinity] (1 + ix/N)^N = cos(x) + i sin(x)
Now there are no "weird numbers", and both sides of the equation can be calculated directly, even by hand if you wanted.
If all you're teaching students is a bunch of formulas to be memorized, the (-1)^x notation is kind of cute. But usually when teaching math, we want to build some kind of understanding.
The cos(x) + isin(x) formula gives us a way to find the point on the complex plane's unit circle corresponding to an angle x, given in radians. (Plus it does more, because the argument is complex valued.)
The new formula with ncos and nsin does the same thing for an angle given in turns. E.g 0.25 (90 degrees): -1^(0.5) = i. It's understandable in terms of roots of -1.
When you want to know the principal N-th root of number on the complex plane, you can simply divide its argument (i.e. angle) by N. The other roots are then equidistant points around the circle. So for instance, the square root of -1, which is sitting at 180 degrees, is found at 90 degrees, and is therefore i.
We can use -1 as the reference for measuring angles. The turns unit (one circle) is twice as far around the circle as as -1, so that's where we get the 2. Because 90 degrees in turns isn't 0.5, but 0.25.
We could use 1 directly, but then we need the first complex root of unity. For instance, here is the Wikimedia diagram of the fifth roots:
https://en.wikipedia.org/wiki/Root_of_unity#/media/File:One5...
That root which is close to i, has an angle which is exactly 1/5 turns. There is a relationship between turns and roots of unity, because N roots occupy N equidistanct points on the circle spaced by 1/N turns.
You seem to have missed the point. You need the formula I gave to rigorously compute the roots of -1. Of course, you could notice that (cos(x) + i sin(x))^n = cos(nx) + i sin(nx), but that's what I meant by "going in circles". You end up defining (-1)^x in terms of sines and cosines, making the "formula" trivial. It's difficult, working this way, to understand why (-1)^(1/3) is (1 + isqrt(3))/2 and not just -1.
By contrast, the Bernoulli formula is actually computable. In fact, the CORDIC algorithm corresponds quite closely to computing the Bernoulli formula by repeated squaring. The use of arctan(2^(-n)) is just like taking (1 + i2^(-n))^(2^n).
There's a reason why math is structured the way it is.
Well, 2.718 is different than those numbers, because the derivative of 2.718^x is 2.178^x, which is a very interesting property of 2.718. The same cannot be said about 535.4. (6.283 is the ratio of a circle's, diameter to radius, which is just something intrinsic to the universe. I think it even transcends the universe, but that's hard for me to reason about. But basically, both 2*pi and e are fundamentally interesting.)
But it really has nothing to do with the universe, except insofar as maths happen to (imperfectly) match it.
Presumably if the universe seemed to match some other maths, we would have invented that variety instead. The Greeks knew the Earth was round, yet made up plane geometry; and never touched on spherical geometry, as far as we know.
Astonishingly, the concept of the number line did not surface until 2000 years later. With the number line, school children can do on command what the best mathematicians of antiquity struggled with for centuries.
In cases outside of that, radians lose their advantage over turns.
Alternatively you can just directly represent angles as unit vectors in the desired direction, which is pretty much the same as using complex numbers. Angle addition is complex multiplication, angle bisection is complex square root, and computing the sine and cosine is simplicity itself. (This takes twice as much space. If you choose to store only the real part of the complex number, you can only represent angles up to half a turn, same as in Wildberger's approach, you lose some precision near the limits, and the other operations require some extra computations.) I have tried this, for example in http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra... and https://gitlab.com/kragen/bubbleos/-/blob/master/yeso/sdf.lu..., and in the cases I've tried it, it works great.
I'm interested to hear other people's experiences on this count!
______
* His main concern is that irrational numbers don't, in some sense, really exist, so they're a bad basis for trigonometry. As I understand it, not only is Platonism now a minority among foundations-of-mathematics types, but even Platonists generally believe that irrational numbers are just as real as rational ones, so as I understand it, Wildberger's viewpoint is held by quite a small minority. That doesn't, of course, imply anything about whether it's correct.
From what I quickly gleamed, using spreads would be really annoying to represent rotations, because you lose 'aditivity'. Two subsequent rotations with spreads a and b do not have spread `a` and spread `b`. Lots of code using trig is about rotations, so losing that feature would probably not be the nicest.
Also, of course, irrational numbers don't allow you to extend trigonometric theorems to Galois fields, complex numbers, and so on, which to my mind is a much more interesting direction. I don't know how much you lose if you use Wildberger's construction into a division algebra like the quaternions.
I don't actually know how you compute the "angle sum" in terms of Wildberger's spreads, but I'm pretty confident that there's a way to compute it, and it's pretty simple.
In the unit-vector representation I described, angle-sum is not just simple addition, but it's really not that bad: (a + bi)(c + di) = (ac - bd) + (ad + bc)i. That's four real multiplications, an addition, and a subtraction, and the result is exact if computed in bignums or bignum rationals. This is usually cheaper than computing sine and cosine, especially if you can use SIMD or vectors, and of course if you want to rotate some points around a center, you end up having to multiply by the sin and cos in exactly the same way anyway. (Maybe in strength-reduced fashion if you're texture-mapping or something, but that applies just as well to representing the angles as sin and cos.)
:)
If you have a slide rule, you can do this in a single motion: align c on the C scale over b on D and read off the answer on C above a on the D scale.
IMO this is at least the most accessible argument for why radians are special, and while I don't pretend to understand complex exponentiation, I expect it's the root of why other math involving radians turns out nicely.