# HG changeset patch
# User Michael Orlitzky <michael@orlitzky.com>
# Date 1335554960 14400
# Node ID 0040359c75477c329d79d2451738ba77e34e0451
# Parent 38d39a4ac8f7e50cabac4c7c5e45d2ca3053ec90
Trac #11233: Add a doctest for an integral calculation fixed upstream in Maxima.
diff git a/sage/symbolic/integration/integral.py b/sage/symbolic/integration/integral.py
a

b


581  581  ((e*erf(1)  e)*sqrt(pi) + 1)*e^(1) 
582  582  sage: ideal_result = 1/2*gamma(1/2, 1) 
583  583  sage: error = actual_result  ideal_result 
584   sage: error.numerical_approx() # abs tol 10e10 
 584  sage: error.numerical_approx() # abs tol 1e10 
585  585  0 
586  586  
587  587  We won't get an evaluated answer here, which is better than 
… 
… 

591  591  sage: integrate(f, x, 0, 2*pi) 
592  592  integrate(abs(sin(x)), x, 0, 2*pi) 
593  593  
 594  Another incorrect integral fixed upstream in Maxima, from 
 595  :trac:`11233`:: 
 596  
 597  sage: a,t = var('a,t') 
 598  sage: assume(a>0) 
 599  sage: assume(x>0) 
 600  sage: f = log(1 + a/(x * t)^2) 
 601  sage: F = integrate(f, t, 1, Infinity) 
 602  sage: F(x=1, a=7).numerical_approx() # abs tol 1e10 
 603  4.32025625668262 
 604  
594  605  """ 
595  606  if isinstance(v, (list, tuple)) and a is None and b is None: 
596  607  if len(v)==1: # bare variable in a tuple 