Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent treatment of hyperbolic functions with simplify #26592

Open
terben opened this issue May 12, 2024 · 2 comments
Open

inconsistent treatment of hyperbolic functions with simplify #26592

terben opened this issue May 12, 2024 · 2 comments
Labels

Comments

@terben
Copy link

terben commented May 12, 2024

Here is my Ipython interaction with SymPy:

In [1]: import sympy as sp

In [2]: x, y = sp.symbols('x, y', real=True)

In [3]: sp.simplify(sp.sinh(x)**2 + 1)
Out[3]: cosh(x)**2

In [4]: sp.simplify(sp.sinh(x + y)**2 + 1)
Out[4]: cosh(x + y)**2

In [5]: sp.simplify(sp.cosh(x)**2 - 1)
Out[5]: sinh(x)**2

In [6]: sp.simplify(sp.cosh(x + y)**2 - 1)
Out[6]: cosh(x + y)**2 - 1

The results of the first three In[]- expressions meet my expectations but I would expect the Output of the last expression to yield sp.sinh(x + y)**2.

In [7]: sp.__version__
Out[7]: '1.12'
@smichr
Copy link
Member

smichr commented May 13, 2024

Given that [4] works, it is curious that [6] does not.

@terben
Copy link
Author

terben commented May 13, 2024

Given that [4] works, it is curious that [6] does not.

Yes! I am currently doing quite a lot of calculations involving hyperbolic functions and it is the third issue of this kind. Unfortunately, I do not know anything about SymPys internal implementation but perhaps
#26595 (redirect of #26593)
#26579
and this issue are connected in some way (missing or erroneous implementaion of cosh, sinh properties).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants