Skip to content

Commit 4d02f7f

Browse files
committed
src/sage/interfaces/maxima_lib.py: add back two abs_integrate examples
Replace two examples that can only be solved when abs_integrate is loaded. These examples are now tested to NOT produce a meaningful result, so that if in the future they can be solved without abs_integrate, we will know. The surrounding text explains why the abs_integrate package is not loaded by default, and how to load it manually.
1 parent fdd4ea2 commit 4d02f7f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/sage/interfaces/maxima_lib.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,21 @@ def sr_integral(self, *args):
758758
0.124756040961038
759759
sage: a.imag().abs() < 3e-17
760760
True
761+
762+
The following examples (at least for now) require Maxima's
763+
``abs_integrate`` package. Enabling ``abs_integrate`` globally
764+
caused several bugs catalogued in :issue:`12731`, so we no
765+
longer load it by default, but you can load it manually by
766+
running ``maxima_calculus.eval("load(abs_integrate)")``.
767+
Afterwards, these integrals should produce a meaningful
768+
result; but be warned, there is no way to unload the
769+
``abs_integrate`` package once it is loaded::
770+
771+
sage: integrate(1/(abs(x) + 1), x)
772+
integrate(1/(abs(x) + 1), x)
773+
sage: integrate(cos(x + abs(x)), x)
774+
integrate(cos(x + abs(x)), x)
775+
761776
"""
762777
try:
763778
return max_to_sr(maxima_eval(([max_integrate],

0 commit comments

Comments
 (0)