NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Why Mathematica does not simplify sinh(arccosh(x)) (johndcook.com)
derf_ 2 hours ago [-]
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.

noosphr 3 hours ago [-]
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.

hnarayanan 3 hours ago [-]
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.
burnt-resistor 2 hours ago [-]
That's not what it simplifies to using a real or complex number domains for x, it's abs(x). CAS need type inference assumptions and/or type qualifiers to be more powerful.

Edit: Fixed stuff.

yorwba 14 minutes ago [-]
For x = -i, square(x) = -1, sqrt(square(x)) = i. Meanwhile, abs(x) = 1. You're right that it simplifies to abs(x) for real x, but that no longer holds for arbitrary complex values.
jstanley 2 hours ago [-]
Right, that's why you need further assumptions on x in order for that simplification to hold.
contubernio 1 hours ago [-]
It's not a simplification, it's wrong. Sqrt(square(x)) equals abs(x).
MForster 26 minutes ago [-]
It also equals x with appropriate assumptions (x > 0).
bryango 3 hours ago [-]
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.
MinimalAction 1 hours ago [-]
That blackbox being their entire moat, I would assume they'd never want to open-source any function. Mathematica as a front-end has innumerable frustrating bugs, but its CAS is top-notch. Especially combined with something like Rubi for integration, for me nothing comes close to Mathematica for algebraic computations.
eulerboiler 18 minutes ago [-]
gdelfino01 11 minutes ago [-]
Many built-in functions are open source too. Use the "PrintDefinitions" ResourceFunction to see the code of functions that are implemented in Wolfram Language itself.
SillyUsername 2 hours ago [-]
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.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 10:35:23 GMT+0000 (Coordinated Universal Time) with Vercel.