News for hackers. Stuff that matters.
Re:Stacking Triangles for Fun and Profit by gjm11 on Thursday April 11, 2024 @10:19AM (#40002446)
I don't agree with the perspective taken here; I don't see any reason to think that the definition in terms of triangles is the simplest or most natural, and I suspect the author feels that way just because it's how they were first taught about trigonometrical functions.

Of course I do agree that definitions in terms of power series and differential equations are less natural and require heavier mathematical machinery.

But: the "right-angled triangle" definitions have the severe drawback of only applying to a restricted range of angles, and their relationship to those higher-tech definitions is more indirect than necessary.

Instead, I claim that the One True Definition of the trig functions is: if you start with the point (1,0) and rotate it through an angle t (anticlockwise, which is conventionally the "positive" direction in maths) about (0,0), then the point where it ends up is (cos t, sin t).

This is just as simple, and just as geometrical, as the "triangle" definition. It leads directly to the differential-equation characterization (which in turn leads easily to the power series). For angles between 0 and pi/2, it's obviously equivalent to the "triangle" definition.

Can you get the addition theorems easily from this definition? Yes, and (again) without the severe drawback of only applying when all the angles involved are between 0 and pi/2 as for the "triangle" definition.

Start with a diagram showing the points (0,0), (cos t, 0), (0, sin t), (cos t, sin t). Now rotate the whole thing through an angle u about the origin. Obviously (0,0) stays where it is. (cos t, 0) just goes to cos t times (cos u, sin u), i.e., to (cos t cos u, cos t sin u). If you turn your head through 90 degrees it becomes clear that (0, sin t) similarly goes to (- sin t cos u, sin t sin u). And of course (cos t, sin t) goes to (cos t+u, sin t+u) since we have rotated it through an angle t and then through an angle u.

And now we're done, because the "vector addition" property the original diagram had remains true after rotation, so adding (cos t cos u, cos t sin u) to (- sin t cos u, sin t sin u) has to give you (cos t+u, sin t+u). And that's exactly the addition theorems.

(That may be hard to follow with no diagrams, but I think it's easier to follow than the triangle-stacking proof would be without diagrams, and with diagrams everything is pretty transparent.)

The right-angled-triangle definitions are traditional because historically trigonometry came before coordinates. But now we have coordinates and generally learn about them before we learn trigonometry, and at that point the point-on-the-unit-circle definitions are simpler, more general, and better suited for proving other things.

Re:Stacking Triangles for Fun and Profit by justinpombrio on Thursday April 11, 2024 @11:56AM (#40003607)
You phrase this as a disagreement, but in my mind this is complementary.

The point of the post is that you should define things in terms of what you care about, and then prove stuff about it. The sum:

    Sum from n=0 to infinity of (-1)^n / (2n+1)! * x^(2n+1)
isn't something you should start with, it should be the punchline. Instead, you should start with angles (the thing you care about), then prove that they behave the same as that sum (what an incredible claim!).

The post proposed "angles of the acute corners of right triangles" as the starting point. You've argued very well that "angles in the unit circle relative to (1, 0)" is a better starting point. Pedagogically, I think it's a wonderful starting point:

"Let's talk about angles. Just angles, nothing else. When you look at angles of actual objects, the side lengths are all different, which complicates matters. Since all we care about is the angle itself, not the side lengths, let's make all side lengths equal to 1. Etc. etc."

Re:Stacking Triangles for Fun and Profit by Tainnor on Thursday April 11, 2024 @11:37AM (#40003359)
I agree that the triangle-based definition starts breaking down once you get to angles greater than pi/2. I was told in school that "there are no right triangles with such angles, but just imagine that there were" and was then shown some weird (supposedly suggestive) diagrams. I found this unsatisfying and moreover hard to remember.

Of course, you could always just define sin and cos for acute angles only and then extend the definition with trig identities, but that seems rather unmotivated too.

Re:Stacking Triangles for Fun and Profit by lrasinen on Friday April 12, 2024 @07:21AM (#40011331)
Back in the day it was done via the unit circle. So the process goes something like this:

1. Define sin/cos as ratios in a triangle 2. Draw a unit circle with an appropriate triangle in the first quarter and note that for the vertex on the circle, x = cos alpha and y = sin alpha. 3. Assuming it holds for values of alpha > 90 deg, extend sin/cos definitions to match.

Don't quite remember how one got derivatives from that, because trig and calc were in separate modules. Possibly via the sum formula.

Re:Stacking Triangles for Fun and Profit by lupire on Thursday April 11, 2024 @11:13AM (#40003070)
If you allow negative side lengths, as you should, much of geometry is unified and simplified, such as this situation.

Negative (and imaginary) measurements make math better-behaved. (See also: quantum mechanics.)

Rectangular coordinates are suboptimal because they are arbitrary in a way that hides some of the symmetry of mathematics.

Your vector argument looks like a lot of algebra noise "without a diagram" because it relies on... triangles... for intuitive justification.

Re:Stacking Triangles for Fun and Profit by jvanderbot on Thursday April 11, 2024 @11:48AM (#40003505)
The rotating angle suggests immediately the domain and definition of Sin(x), Cos(x) using simple projections. And, huuuuge bonus, that's a right triangle.

I just think lesson zero in the above article should have been these projections, and a simple "From this all angles can be defined as right triangles in your preferred coordinate system", and you're off to the races in any old direction.

This is not how I was taught it, and I'm retrospectively upset.

Re:Stacking Triangles for Fun and Profit by tromp on Thursday April 11, 2024 @11:26AM (#40003209)
> Instead of adding two separate angles α and β, we’ll use θ and −θ.

It's not clear that the geometric proof based on pictures with positive angles α and β also applies to a negative β. I think one should at least provide a separate picture of that case...

Re:Stacking Triangles for Fun and Profit by Tainnor on Thursday April 11, 2024 @11:39AM (#40003389)
> If you allow negative side lengths, as you should [...]

I mean, the blog post was about a pedagogically better suited construction of trig functions. If we allow negative side lengths, it's not really going to be intuitive anymore. At this point, you might just as well use the power series definition (or the one based on the complex exp function) since it makes things easy to prove.

Re:Stacking Triangles for Fun and Profit by lupire on Thursday April 11, 2024 @11:55AM (#40003596)
Imaginary lengths may be unintuitive but negative is pretty simple.

The idea of negative measurements (meaning "opposite direction along a line") as is well understood before children study geometry. Kindergarteners learn "left" vs "right" and "forward" vs "backward".

I agree with other poster about the value of showing negative and positive lengths visually in the same diagram.

Re:Stacking Triangles for Fun and Profit by Tainnor on Thursday April 11, 2024 @12:00PM (#40003654)
Magnitudes are intuitionally directionless (hence why norms and measures are nonnegative reals). Of course, you can extend notions suitably and make it work, but I really don't think that this is terribly intuitive. (Of course, different people will find different things intuitive.)
Re:Stacking Triangles for Fun and Profit by enizor2 on Thursday April 11, 2024 @10:45AM (#40002770)
Could you expand on getting the differential equation from your definition? I don't really where to start from it.
Re:Stacking Triangles for Fun and Profit by outop on Thursday April 11, 2024 @04:21PM (#40006412)
Draw a line of length 1 which makes an angle of p with the positive x axis. The x and y coordinates of a, the point at the end of the line give cos(p) and sin(p).

Now think about what happens if you increase p by a tiny bit. a moves tangentially. (This works very similar to how the tangent to a curve gives the change in y for a change in x.) So the vector of cos'(p), sin'(p) is given by a vector starting from a, at a right angle to 0a, and pointing in the positive direction.

Since the point a moves through 2pi distance while p goes from 0 to 2pi (the definition of measuring angles in radians) the speed of the point is 1, and so the vector of derivatives has length 1.

You can check easily that this makes cos'(p) = -sin(p) and sin'(p) = cos(p).

Re:Stacking Triangles for Fun and Profit by gjm11 on Thursday April 11, 2024 @06:42PM (#40007571)
Yup!

(If I were trying to present this stuff in a maximally-elegant order without too much regard for what order human brains like to learn things in, the order of things would be: complex numbers, calculus, trigonometry. Then we define something that we might initially call e(t) to satisfy the differential equation de/dt = ie, and observe that having e and e' at right angles means that |e| remains constant, which means that |e'| also remains constant, so if we start with e(0)=1 then we have a point moving at unit speed around the unit circle, etc. Keep the linkage between the geometrical and formal points of view there at all times. But I suspect this wouldn't be great paedagogically for the majority of students.)

Re:Stacking Triangles for Fun and Profit by jessriedel on Thursday April 11, 2024 @02:27PM (#40005254)
It wasn’t a historical accident that triangles came before coordinates. Coordinates are more abstract than triangles quite generically for humans. (When we teach children numbers, we start with the natural numbers and then later introduce negative numbers.)

I claim it’s only because you and I have internalized them so well that they both seem intuitive, which is what allows you to prefer the coordinates approach due to its greater generality to negative angles.

In any case, as another commenter said, I think you basically agree with the author’s main point and are disagreeing with a minor point (which is to some extent a manner of taste).

Re:Stacking Triangles for Fun and Profit by jerf on Thursday April 11, 2024 @03:07PM (#40005653)
This is another way of looking at the concept of Kolmogorov Complexity and relating it to real life... which thing you consider the most "natural" encoding of these concepts, and thus the "shortest", can depend very heavily on your "native mathematical language". One not even reach out to strange hypothetical aliens who think utterly different than us. Multiple people all firmly raised in the modern conventional human mathematical landscape can vary, as is seen right here.

Though it does occur to me to wonder what an alien in a very obviously hyperbolic universe would consider the most natural. Or one of the beings that lives in Greg Egan's universe with two time and two space dimensions.

Re:Stacking Triangles for Fun and Profit by onedognight on Thursday April 11, 2024 @02:42PM (#40005403)
The only reason the author’s definition doesn’t apply to larger and smaller angles is that they explicitly considered the angles <ABC and <CBA to be equal rather than negatives of each other. That was a surprisingly odd oversight given that they immediately start talking about negative angles.