@@ -137,7 +137,7 @@ def _print_latex_(self, f, x):
137137class DefiniteIntegral (BuiltinFunction ):
138138 def __init__ (self ):
139139 """
140- Symbolic function representing a definite integral.
140+ The symbolic function representing a definite integral.
141141
142142 EXAMPLES::
143143
@@ -156,7 +156,7 @@ def __init__(self):
156156
157157 def _eval_ (self , f , x , a , b ):
158158 """
159- Returns the results of symbolic evaluation of the integral
159+ Return the results of symbolic evaluation of the integral
160160
161161 EXAMPLES::
162162
@@ -185,7 +185,7 @@ def _eval_(self, f, x, a, b):
185185
186186 def _evalf_ (self , f , x , a , b , parent = None , algorithm = None ):
187187 """
188- Returns numerical approximation of the integral
188+ Return a numerical approximation of the integral
189189
190190 EXAMPLES::
191191
@@ -209,7 +209,7 @@ def _evalf_(self, f, x, a, b, parent=None, algorithm=None):
209209
210210 def _tderivative_ (self , f , x , a , b , diff_param = None ):
211211 """
212- Returns derivative of symbolic integration
212+ Return the derivative of symbolic integration
213213
214214 EXAMPLES::
215215
@@ -233,7 +233,7 @@ def _tderivative_(self, f, x, a, b, diff_param=None):
233233
234234 def _print_latex_ (self , f , x , a , b ):
235235 r"""
236- Returns LaTeX expression for integration of a symbolic function.
236+ Convert this integral to LaTeX notation
237237
238238 EXAMPLES::
239239
@@ -254,6 +254,22 @@ def _print_latex_(self, f, x, a, b):
254254 dx_str = "{d %s}" % (latex (x ))
255255 return "\\ int_{%s}^{%s} %s\\ ,%s" % (latex (a ), latex (b ), latex (f ), dx_str )
256256
257+ def _sympy_ (self , f , x , a , b ):
258+ """
259+ Convert this integral to the equivalent SymPy object
260+
261+ The resulting SymPy integral can be evaluated using ``doit()``.
262+
263+ EXAMPLES::
264+
265+ sage: integral(x, x, 0, 1, hold=True)._sympy_()
266+ Integral(x, (x, 0, 1))
267+ sage: _.doit()
268+ 1/2
269+ """
270+ from sympy .integrals import Integral
271+ return Integral (f , (x , a , b ))
272+
257273definite_integral = DefiniteIntegral ()
258274
259275
0 commit comments