Skip to content

Commit fdd4ea2

Browse files
committed
src/sage/interfaces/maxima_lib.py: update some integration doctests
There are some tests in this file that still mention abs_integrate, though it was disabled a few years ago. We remove all mention of it, and clean up a bit: * Drop a test repeated in src/sage/symbolic/integration/integral.py * Remove "# known bug" from any examples that now pass without abs_integrate * Delete any remaining "# known bug" tests. They are not really bugs -- you just don't get a nice answer -- and it is a waste of time to run them and then throw away the answer.
1 parent 2710684 commit fdd4ea2

File tree

1 file changed

+6
-43
lines changed

1 file changed

+6
-43
lines changed

src/sage/interfaces/maxima_lib.py

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -726,58 +726,21 @@ def sr_integral(self, *args):
726726
sage: assumptions() # Check the assumptions really were forgotten
727727
[]
728728
729-
Make sure the abs_integrate package is being used,
730-
:issue:`11483`. The following are examples from the Maxima
731-
abs_integrate documentation::
729+
An example from the maxima documentation involving the
730+
absolute value::
732731
733-
sage: integrate(abs(x), x)
734-
1/2*x*abs(x)
735-
736-
::
737-
738-
sage: integrate(sgn(x) - sgn(1-x), x) # known bug
732+
sage: integrate(sgn(x) - sgn(1-x), x)
739733
abs(x - 1) + abs(x)
740734
741-
This is a known bug in Sage symbolic limits code, see
735+
This is a fixed bug in Sage symbolic limits code, see
742736
:issue:`17892` and https://sourceforge.net/p/maxima/bugs/3237/ ::
743737
744-
sage: integrate(1 / (1 + abs(x-5)), x, -5, 6) # not tested -- known bug
738+
sage: integrate(1 / (1 + abs(x-5)), x, -5, 6)
745739
log(11) + log(2)
746740
747-
::
748-
749-
sage: integrate(1/(1 + abs(x)), x) # known bug
750-
1/2*(log(x + 1) + log(-x + 1))*sgn(x) + 1/2*log(x + 1) - 1/2*log(-x + 1)
751-
752-
::
753-
754-
sage: integrate(cos(x + abs(x)), x) # known bug
755-
-1/2*x*sgn(x) + 1/4*(sgn(x) + 1)*sin(2*x) + 1/2*x
756-
757-
The last example relies on the following simplification::
758-
759-
sage: maxima("realpart(signum(x))")
760-
signum(x)
761-
762-
An example from sage-support thread e641001f8b8d1129::
763-
764-
sage: f = e^(-x^2/2)/sqrt(2*pi) * sgn(x-1)
765-
sage: integrate(f, x, -Infinity, Infinity) # known bug
766-
-erf(1/2*sqrt(2))
767-
768-
From :issue:`8624`::
769-
770-
sage: integral(abs(cos(x))*sin(x),(x,pi/2,pi))
771-
1/2
772-
773-
::
774-
775-
sage: integrate(sqrt(x + sqrt(x)), x).canonicalize_radical() # known bug
776-
1/12*((8*x - 3)*x^(1/4) + 2*x^(3/4))*sqrt(sqrt(x) + 1) + 1/8*log(sqrt(sqrt(x) + 1) + x^(1/4)) - 1/8*log(sqrt(sqrt(x) + 1) - x^(1/4))
777-
778741
And :issue:`11594`::
779742
780-
sage: integrate(abs(x^2 - 1), x, -2, 2) # known bug
743+
sage: integrate(abs(x^2 - 1), x, -2, 2)
781744
4
782745
783746
This definite integral returned zero (incorrectly) in at least

0 commit comments

Comments
 (0)