logoalt Hacker News

Why Mathematica does not simplify sinh(arccosh(x))

45 pointsby ibobevlast Wednesday at 1:30 PM7 commentsview on HN

Comments

derf_today at 8:10 AM

This sentence confused me: "For example, Sinh[ArcCosh[-2 + 0.001 I]] returns 11.214 + 2.89845 I but Sinh[ArcCosh[-2 + 0.001 I]] returns 11.214 - 2.89845 I," not the least of which because the two input expressions are the same, but also because we started out by saying Sinh[ArcCosh[-2]] = -Sqrt[3], which is not at all near 11.214 +/- 2.89845 I.

I think the author meant to say, "ArcCosh[-2 + 0.001 I] returns 1.31696 + 3.14102 I but ArcCosh[-2 - 0.001 I] returns 1.31696 - 3.14102 I," because we are talking about defining ArcCosh[] on the branch cut discontinuity, so there is no need to bring Sinh[] into it (and if we do, we find the limits are the same: the imaginary component goes to zero and Sinh[ArcCosh[-2 +/- t*I]] approaches -Sqrt[3] as t goes to zero from above or below). I am not sure what went wrong to get what they wrote.

hnarayanantoday at 7:30 AM

This is a general pattern in CAS. For a more basic case, it’s not obvious sqrt(square(x)) will simplify to x without any further assumptions on x.

show 1 reply
noosphrtoday at 7:39 AM

More generally it's not at all clear what 'simplify' means.

Is x*x simpler than x^2? Probably? Is sqrt(5)^3 simpler than 5^(3/2)? I don't know.

It entirely depends on what you're going to be doing with the expression later.

SillyUsernametoday at 8:06 AM

I've only an A-Level in Further Maths from 1997, but understand complex numbers and have come across complex inverse trig functions before.

My takeaway for other people like me from this is "computer is correct" because the proof shows that we can't define arccosh using a single proof across the entire complex plane (specifically imaginary, including infinity).

The representation of this means we have both complex functions that are defined as having coverage of infinity, and arccosh, that a proof exists in only one direction at a time during evaluation.

This distinction is a quirk in mathematics but means that the equation won't be simplified because although it looks like it can, the underlying proof is "one sided" (-ve or +ve) which means the variables are fundamentally not the same at evaluation time unless 2 approaches to the range definition are combined.

The QED is that this distinction won't be shown in the result's representation, leading to the confusion that it should have been simplified.

bryangotoday at 7:46 AM

I really wish Mathematica would open-source the heuristics behind these core functions (including common mathematical functions, Simplify, Integrate, etc.). The documentation is good, but it still lags behind the actual implementation. It would be much easier if we could peek inside the black box.

show 1 reply