@@ -952,8 +952,10 @@ class Integers(Builtin):
952952
953953class Integrate (SympyFunction ):
954954 r"""
955- <url>:WMA link:
956- https://reference.wolfram.com/language/ref/Integrate.html</url>
955+ <url>:Integral:https://en.wikipedia.org/wiki/Integral</url> (<url>:SymPy:
956+ https://docs.sympy.org/latest/modules/integrals/integrals.html</url>, \
957+ <url>:WMA:
958+ https://reference.wolfram.com/language/ref/Integrate.html</url>)
957959
958960 <dl>
959961 <dt>'Integrate[$f$, $x$]'
@@ -984,18 +986,20 @@ class Integrate(SympyFunction):
984986 >> Integrate[4 Sin[x] Cos[x], x]
985987 = 2 Sin[x] ^ 2
986988
987- > Integrate[-Infinity, {x, 0, Infinity}]
989+ >> Integrate[-Infinity, {x, 0, Infinity}]
988990 = -Infinity
989991
990- > Integrate[-Infinity, {x, Infinity, 0}]
991- = Infinity
992+ Integrating something ill-defined returns the expression untouched:
992993
993- Integration in TeX:
994+ >> Integrate[1, {x, Infinity, 0}]
995+ = Integrate[1, {x, Infinity, 0}]
996+
997+ Here how is an example of converting integral equation to TeX:
994998 >> Integrate[f[x], {x, a, b}] // TeXForm
995999 = \int_a^b f\left[x\right] \, dx
9961000
9971001 Sometimes there is a loss of precision during integration.
998- You can check the precision of your result with the following sequence
1002+ You can check the precision of your result with the following sequence \
9991003 of commands.
10001004 >> Integrate[Abs[Sin[phi]], {phi, 0, 2Pi}] // N
10011005 = 4.
@@ -1114,6 +1118,10 @@ def eval(self, f, xs, evaluation: Evaluation, options: dict): # type: ignore[ov
11141118 # e.g. NotImplementedError: Result depends on the sign of
11151119 # -sign(_u`j)*sign(_u`w)
11161120 return
1121+ except TypeError :
1122+ # SymPy can give this. For example:
1123+ # Integrate[-Infinity, {x, 0, Infinity}]
1124+ return
11171125 if prec is not None and isinstance (sympy_result , sympy .Integral ):
11181126 # TODO MaxExtraPrecision -> maxn
11191127 sympy_result = sympy_result .evalf (dps (prec ))
0 commit comments