Earlier quoted context omitted.
Right, that's why you need further assumptions on x in order for that simplification to hold.
It's not a simplification, it's wrong. Sqrt(square(x)) equals abs(x).
Why Mathematica does not simplify sinh(arccosh(x))
11–20 of 64 posts
Re: Why Mathematica does not simplify sinh(arccosh(x))
#12I 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.
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.
Re: Why Mathematica does not simplify sinh(arccosh(x))
#13This 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.
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.
Re: Why Mathematica does not simplify sinh(arccosh(x))
#14Earlier quoted context omitted.
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.
Many functions source ate viewable. Use https://resources.wolframcloud.com/FunctionRepository/resour...
Re: Why Mathematica does not simplify sinh(arccosh(x))
#15This 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 +…
Re: Why Mathematica does not simplify sinh(arccosh(x))
#16I 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.
It will have simple rules such as constant folding, “replace x - x by zero”, “replace zero times something with the conditions under which ‘something’ has a value”, etc, lots of more complex but still easy to understand rules with conditionals such as “√x² = |x| if x is real”, and some weird logic that decides the order in which to try simplification rules.
There’s an analogy with compilers. In LLVM, most optimization passes are easy to understand, but if you look at the set of default optimization passes, there’s no clear reason for why it looks like it looks, other than “in our tests, that’s what performed best in a reasonable time frame”.
Re: Why Mathematica does not simplify sinh(arccosh(x))
#17Earlier quoted context omitted.
It's not a simplification, it's wrong. Sqrt(square(x)) equals abs(x).
It also equals x with appropriate assumptions (x > 0).
Re: Why Mathematica does not simplify sinh(arccosh(x))
#18More 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.
Hyperbolic functions aren't used as much but the same principle applies. Here the core identity is cosh^2(x) = sinh^2(x) = 1 so:
sinh(arccosh(x))
= sqrt(1 + cosh^2(arccosh(x))
= sqrt(1 + x^2)
You should absolutely expect that from "simplify".Re: Why Mathematica does not simplify sinh(arccosh(x))
#19Re: Why Mathematica does not simplify sinh(arccosh(x))
#20Earlier quoted context omitted.
Many functions source ate viewable. Use https://resources.wolframcloud.com/FunctionRepository/resour...
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.