# Ticket #11233: sage-trac_11233.patch

File sage-trac_11233.patch, 1.4 KB (added by mjo, 9 years ago)

Rebased patch on 5.0.beta14

• ## sage/symbolic/integration/integral.py

```# 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 ((e*erf(1) - e)*sqrt(pi) + 1)*e^(-1) sage: ideal_result = 1/2*gamma(-1/2, 1) sage: error = actual_result - ideal_result sage: error.numerical_approx() # abs tol 10e-10 sage: error.numerical_approx() # abs tol 1e-10 0 We won't get an evaluated answer here, which is better than sage: integrate(f, x, 0, 2*pi) integrate(abs(sin(x)), x, 0, 2*pi) Another incorrect integral fixed upstream in Maxima, from :trac:`11233`:: sage: a,t = var('a,t') sage: assume(a>0) sage: assume(x>0) sage: f = log(1 + a/(x * t)^2) sage: F = integrate(f, t, 1, Infinity) sage: F(x=1, a=7).numerical_approx() # abs tol 1e-10 4.32025625668262 """ if isinstance(v, (list, tuple)) and a is None and b is None: if len(v)==1: # bare variable in a tuple