Ticket #11238: sage-trac_11238.patch

File sage-trac_11238.patch, 983 bytes (added by mjo, 7 years ago)

Add a doctest for the non-zero result.

  • sage/misc/functional.py

    # HG changeset patch
    # User Michael Orlitzky <michael@orlitzky.com>
    # Date 1332430338 14400
    # Node ID 260181c1e74dc3c0b80cc68adebbb02936445b48
    # Parent  5a339d316469230d5a169f9b617aaf1b4e2fe8e0
    Trac #11238: Add a doctest for a Maxima bug fixed by 5.26.0.
    
    The integral of exp(-x)*sinh(sqrt(x)) from zero to positive infinity
    used to return zero, rather than the correct result of
    1/2*sqrt(pi)*e^(1/4). This is fixed in upstream Maxima 5.26.0, so we
    add a doctest for it.
    
    diff --git a/sage/misc/functional.py b/sage/misc/functional.py
    a b  
    716716        sage: integrate(f, (x, -Infinity, Infinity))
    717717        2
    718718
     719    Another symbolic integral, from :trac:`11238`, that used to return
     720    zero incorrectly::
     721
     722        sage: f = exp(-x) * sinh(sqrt(x))
     723        sage: integrate(f, x, 0, Infinity)
     724        1/2*sqrt(pi)*e^(1/4)
     725
    719726    """
    720727    if hasattr(x, 'integral'):
    721728        return x.integral(*args, **kwds)