Why Mathematica does not simplify Sinh[ArcCosh[x]]
13 points by susam
13 points by susam
This might be off topic, but can anyone help build my intuition for why hyperbolic trig functions are useful in computing?
It's already intuitive to me that sine and cosine are important. Even if you're just making a whimsical PICO-8 game, you still have sin() and cos() because there are so many things that you'd like to make bounce, or move in a circle, or rotate against a pixel grid. Despite a world of square pixels and square sprites, the "circular nature" seeps through.
But I've never personally used hyperbolic trigonometry. I understand it comes up in relativistic calculations, but I don't do much of that. And I know tanh sees use as a neural network activation function, but ReLU and friends are more popular for that nowadays.
(This might be a tricky question to answer, because "building intuition" is not necessarily the same as "listing use cases for." But even if I get a glimmer of an understanding, I'll be happy!)
I mean, anyone doing numerical research who uses hyperbolic trigonometry? Computing is used for science!
Thess functions are used in stats too. E.g. cdf of a t-distribution (student/welch t-test) uses gamma function, and you'll often use arcsin or arccos to define gamma.
From a purely game-development/creative coding standpoint, a hyperbolic tangent is very convenient for applying a "fisheye lens" effect: translate 2d cartesian coordinates into polar relative to the center of a "lens", scale the radius proportionally by its hyperbolic tangent, then convert back into cartesian; points closer to the edge of your imaginary lens will clump together asymptotically. Make the lens bigger than the screen for a more subtle effect.
Push the idea further and you get something like HyperRogue.
Note that this application doesn't rest on any "deep truth" of mathematics, just observing that tanh() offers a useful unit asymptotic curve.
Consider how sin() and cos() come up. The equation for the unit circle in Cartesian coordinates is x^2 + y^2 = 1. This equation is solved by x = cos(phi), y = sin(phi) for some real number phi. In hyperbolic geometry (e.g., in special relativity), the equivalent equation is x^2 - y^2 = 1 (note the minus sign), which is solved by x = cosh(phi), y = sinh(phi)`. This is one approach that made their relationship clearer to me: the Euclidean and hyperbolic trigonometric functions are solutions to slightly different equations defining what a circle is (in other words, they arise when you do geometry with different metrics).
sinh() and cosh() can also come up in calculations involving real exponentials. That's because of cosh(x) = (e^x + e^(-x)) / 2 and sinh(x) = (e^x - e^(-x)) / 2. It happened to me occasionally that I was just rearranging some exponentials and just happened to get an expression of this form, although the problem didn't seem like it had anything to do with hyperbolic geometry, say. From this point of view, cosh() and sinh() are just shorthand for these slightly longer expressions involving real exponentials.
It's also noteworthy that cos(x) = (e^(ix) + e^(-ix)) / 2 and sin(x) = (e^(ix) - e^(-ix)) / (2i), which means that the Euclidean and hyperbolic functions are closely connected and behave in very similar ways.
For the record, this is not the whole picture, and, in fact, I don't know exactly what is. These are just some insights that feel important to me from various calculus classes.