Saturday, 16 February 2013

Remove the cotangent from CSA A23.3



A right triangle.

A long time ago, three important trigonometric ratios were committed to memory thanks to the mnemonic SOH-CAH-TOA. These ratios are the sine, cosine, and tangent. 
\sin A=\frac{\textrm{opposite}}{\textrm{hypotenuse}}=\frac{a}{\,c\,}\,.

\cos A=\frac{\textrm{adjacent}}{\textrm{hypotenuse}}=\frac{b}{\,c\,}\,.

\tan A=\frac{\textrm{opposite}}{\textrm{adjacent}}=\frac{a}{\,b\,}=\frac{\sin A}{\cos A}\,.

What helped me retain this knowledge was the fact that these functions are on my calculator, so I actually use these ratios. Now, there are other, lesser known trigonometric functions, such as the reciprocals and the slew of ratios defined to make circle and spherical geometry calculations more convenient for navigators. All of these functions are just some arithmetic manipulation of the sine, cosine, and tangent. The only reason they were given special names is because they were printed in tables to facilitate computations in the days before calculators.
\textrm{versin} (\theta) := 2\sin^2\!\left(\frac{\theta}{2}\right) = 1 - \cos (\theta) \,
The "versed sine" or "versine". 
Today, functions like versine and coversine aren't taught in school. They aren't on your calculators. It's because they aren't necessary. It's easy to express a problem in terms of sine or cosine and then evaluate it with a modern calculator in just a fraction of the time it used to take to look up the versine in a table. But for some reason, we are taught the reciprocal trigonometric functions (cosecant, secant, and cotangent) in schools. 
\csc A=\frac{1}{\sin A}=\frac{c}{a} ,

\sec A=\frac{1}{\cos A}=\frac{c}{b} ,

\cot A=\frac{1}{\tan A}=\frac{\cos A}{\sin A}=\frac{b}{a} .
The reciprocal trigonometric functions. 
It's not explained to us why the reciprocals are useful or why they even get their own names. We're just given the definitions and then expected to regurgitate them on tests. Later, we see a few reciprocals in calculus classes, Not because there's some practical reason for an engineer or scientist to know how to integrate the secant function, but because it's another math problem to throw at the students. 

Which brings me to the Canadian structural concrete design standard, CSA A23.3. The folks who wrote CSA A23.3 seem to have a special place in their hearts for the cotangent. While it is certainly well within their rights to be especially fond of any mathematical function of their choosing, I don't understand why a design standard, written by engineers for engineers, would put a useless trigonometric function in a math expression. When I see a cotangent, I see unnecessary extra work. My calculator doesn't come equipped with a 'cot' button, but I do have 'sin', 'cos', and 'tan' buttons. Where there's a cotangent, I have to take a moment (however brief) to recall that the cotangent is really just the reciprocal of the tangent. I then have to rearrange the formula using the tangent in order to punch the right buttons on the calculator to get my answer.

Sure, this is only a tiny amount of extra work, even if I forget the cotangent's definition and have to do a quick internet search. But why not make the code's expression a little more practical? Save the user's time and effort by expressing formulas the way they are actually used: the way they're entered into a calculator. 

1 comment:

  1. Haha I love that you're doing more nerdy blogging!

    That reminded me of a similarly trigonometric rant: https://www.youtube.com/watch?v=jG7vhMMXagQ

    ReplyDelete