Opened 2 years ago

Last modified 2 years ago

## #25627 new defect

# RuntimeError: ECL says: THROW: The catch RAT-ERR is undefined

Reported by: | gh-nasser1 | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-8.3 |

Component: | PLEASE CHANGE | Keywords: | RuntimeError: |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

Using `8.3.beta6`

on Linux Manjaro

Is this a known issue? Problem with integrate.

sage: var('x') sage: integrate((cos(x) + 2*sin(x) + 1)/(cos(x)^2 - 2*cos(x)*sin(x) + 2*sin(x) + 3),x)

gives

RuntimeError Traceback (most recent call last) <ipython-input-2-f1dceacbaccd> in <module>() ----> 1 integrate((cos(x) + Integer(2)*sin(x) + Integer(1))/(cos(x)**Integer(2) - Integer(2)*cos(x)*sin(x) + Integer(2)*sin(x) + Integer(3)),x) ....... RuntimeError: ECL says: THROW: The catch RAT-ERR is undefined.

This one also

integrate(log(x + sqrt(x + 1))/(x^2 + 1),x)

gives

RuntimeError Traceback (most recent call last) <ipython-input-70-f29d0d9e0a0b> in <module>() ----> 1 anti=integrate(log(x + sqrt(x + Integer(1)))/(x**Integer(2) + Integer(1)),x) ......

**Note:**See TracTickets for help on using tickets.

In maxima, the throw/catch RAT-ERR is used because it's a frequently occurring condition that needs to be handled efficiently, and the common-lisp way of handing "conditions" (close to python's exceptions) is slow on some lisps. That's why they set up a RAT-ERR. Since this error should happen a lot anyway, I'm a little surprised that we're finding this here. If we're supposed to be running maxima code inside a "catch" for this, then I expect we would have noticed elsewhere. It's also strange that these integrals in maxima itself do not seem to generate an error of this type. So I suspect this may be more a bug/anomalous in maxima's integrate (bad interaction with other options sage is setting?) than the obvious solution: catch the throw and raise an error.