Ticket #3732: gaussian-integral-testcase.py

File gaussian-integral-testcase.py, 487 bytes (added by gnprice, 13 years ago)

another failing integral

Line 
1"""
2# A failure case in integration.
3
4   sage: var('a b s')
5   (a, b, s)
6
7# This integral fails.
8
9   sage: integral( s^2 * exp(- (a + b) * s^2 ), s)
10   integrate(s^2*e^((-b - a)*s^2), s)
11
12# A trivial algebraic simplification succeeds,
13
14   sage: integral( s^2 * exp(- a * s^2 ), s)
15   sqrt(pi)*erf(sqrt(a)*s)/(4*a^(3/2)) - s*e^(-(a*s^2))/(2*a)
16   
17# and so does a slightly simpler integral.
18
19   sage: integral( exp(- (a + b) * s^2 ), s)
20   sqrt(pi)*erf(sqrt(b + a)*s)/(2*sqrt(b + a))
21"""