A fundamental matter : Why do trigonometric function depend on unit?

1.5k Views Asked by At

I may be confused with the wording here, and maybe my question has no reason to be - but in any case I am intrigued.

So like many people I work with angle and distances every day, and compute formulas using those, and use computers to calculate numerical results.

And I noticed that the computer is sensitive to the angle unit used, but not to any other units : feeding feet instead of meters (without telling the computer) will still get me a correct result (albeit in feet). Even if the formula makes use of many other units (seconds, degrees celsius, ... ) and I change all those units (to minutes, degrees kelvin, ...) the result that comes out is still correct (albeit in a different unit). Except if I feed radians instead of degrees.

But of course that doesn't happen for distances. Why ? Why are formulas containing sine and cosine dependent on the angle unit used, and not on any other unit used ?

2

There are 2 best solutions below

9
On

This confusion arises because angles are dimensionless. Let's first look at the case of computing the area of a circle in terms of its radius:

$$A = \pi r^2$$

When we plug in a value for $r$ with units, we get back an answer with units:

$$ \pi (3\, \mathrm m)^2 = (9 \pi) \, \mathrm m^2$$

We could have started with any unit, and we will get back an answer which is expressed in units.

However, when we use the trigonometric functions, we plug in something dimensionless and get back something dimensionless:

$$\sin (\pi \; \text{radians}) = 0 \quad , \quad \sin (180^\circ) = 0$$ The input to the $\sin$ function is a pure (real) number without any units attached to it. The expression $180^\circ$ only means something to the humans who read it. We see $180^\circ$ and interpret that degree sign $\circ$ to be a constant factor of $\pi / 180$ multiplying the number preceding it. By converting the argument to $\sin$ to radians, the $\sin$ function can be defined so that it looks like this:

enter image description here

Instead of looking like this (function of degrees):

enter image description here

In principle, we could use either definition. If we chose the latter, then we should convert arguments in radians to their value in degrees. However, there are good reasons for choosing the former definition which takes in radians as the input. One of the best illustrations of these 'good reasons' is that $\mathrm d \sin(x) / \mathrm d x = \cos x$. If we chose the latter definition, then instead it would be $\mathrm d \sin(x) / \mathrm d x = \frac \pi {180} \cos x$.

In mathematics, if the $\circ$ sign is not used, then it is assumed that the argument is measured in radians. In other words, we take $\sin$ to be first definition above. It is not good practice to implement a sin function in a program which expects degrees, because this goes against convention. I would advise naming such a function something like sind instead.

0
On

Suppose, for example, that you add two distances. 10 meters plus 5 meters make 15 meters, of course. And 10 feet plus 5 feet make 15 feet. But 10 meters plus 5 meters is not the same distance as 10 feet plus 5 feet -- how does $10+5$ know the difference? The naked addition doesn't, but since you get another distance out of the addition, it is reasonable that the $15$ you get out should be interpreted in the same units as the distances you put in -- that that is what can make the same addition produce a number $15$ that means two different actual lengths in the two cases.

When you take a sine, however, you put an angle in, and get a dimensionless ratio out. (The result of a sine can be interpreted as a ratio of two distances, and the ratio is the same number no matter which units you measure those distances in).

Since the result of $\sin(2)$ does not have any units attached to it, it is impossible from the outset to use the units of the result to interpret the same sine operation to give the right result no matter whether we meant 2 degrees or 2 radians.

Instead, the sine computation needs to know which units its input was measured by.