|  1 |    initial version    |  
Is this :
sage: integrate(g(x),(x,-oo,oo)).full_simplify().canonicalize_radical()         
-e^(1/2*a^2*s^2 - a*m)
 what you want ?
BTW :
sage: assume (a, m, x, "real")                                                  
sage: assume(s>0)                                                               
sage: assumptions()                                                             
[a is real, m is real, x is real, s > 0]
sage: integrate(g(x),(x,-oo,oo)).full_simplify()                                
-e^(1/2*a^2*s^2 - a*m)
sage: integrate(g(x),(x,-oo,oo)).simplify()                                     
-e^(1/2*a^2*s^2 - a*m)
 In integration, assumptions may be capital...
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.