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 b  
    581581        ((e*erf(1) - e)*sqrt(pi) + 1)*e^(-1)
    582582        sage: ideal_result = 1/2*gamma(-1/2, 1)
    583583        sage: error = actual_result - ideal_result
    584         sage: error.numerical_approx() # abs tol 10e-10
     584        sage: error.numerical_approx() # abs tol 1e-10
    585585        0
    586586
    587587    We won't get an evaluated answer here, which is better than
     
    591591        sage: integrate(f, x, 0, 2*pi)
    592592        integrate(abs(sin(x)), x, 0, 2*pi)
    593593
     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 1e-10
     603        4.32025625668262
     604
    594605    """
    595606    if isinstance(v, (list, tuple)) and a is None and b is None:
    596607        if len(v)==1: # bare variable in a tuple