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
laplace_transform(cosh(2*x), x, s) raises RecursionError #21202
Comments
This piece of code looks incorrect: sympy/sympy/functions/elementary/piecewise.py Lines 179 to 183 in f9badb2
It should be removed. |
Interestingly,
works. |
Laplace transform of |
Since #22376 was merged this issue is no longer seen when calling In [5]: expr = parse_expr(
...: "Piecewise((s*exp_polar(I*pi)/(4*(1 - s**2/4)), Abs(s**2)/4 < 1), (1/(s*(1 - 4/s**2)), 4/
...: Abs(s**2) < 1), (pi*meijerg(((1/2,), (0, 0)), ((0, 1/2), (0,)), s**2/4)/2, True))"
...: )
In [6]: expr
Out[6]:
⎧ ⅈ⋅π │ 2│
⎪ s⋅ℯ │s │
⎪ ────── for ──── < 1
⎪ 2 4
⎪ 4 - s
⎪
⎪ 1 4
⎪ ────────── for ──── < 1
⎪ ⎛ 4 ⎞ │ 2│
⎨ s⋅⎜1 - ──⎟ │s │
⎪ ⎜ 2⎟
⎪ ⎝ s ⎠
⎪
⎪ ⎛ │ 2⎞
⎪ ╭─╮2, 1 ⎜ 1/2 0, 0 │ s ⎟
⎪π⋅│╶┐ ⎜ │ ──⎟
⎪ ╰─╯3, 3 ⎝0, 1/2 0 │ 4 ⎠
⎪───────────────────────────── otherwise
⎩ 2
In [7]: simplify(expr)
...
RecursionError: maximum recursion depth exceeded while calling a Python object The infinite recursion seems to be here: sympy/sympy/functions/elementary/piecewise.py Lines 290 to 291 in b9b33b4
|
Maybe this should get a different label for people working in simplify to find it. It can also lose the integrals.transforms label since that part is solved. |
The text was updated successfully, but these errors were encountered: