# [Maxima] Integration has problems with sums

Detlef Schmicker d.schmicker at physik.de
Fri Jun 22 06:09:46 CDT 2007

```Hi,

I use
detlef at sarge:~\$ maxima

Maxima 5.12.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)

and tried a simple integration.
If I integrate the sumands, everything works fine, but maxima is not
able to integrate the sum at once?

Is there a way, to change simplifications used for integration?

Thanks a lot,
Detlef

(%i3) x^2*%e^(-x^2)*sin(x)^2+%e^(-x^2);
2                2
2   - x     2        - x
(%o3)                     x  %e     sin (x) + %e
(%i4) integrate(%,x,-inf,inf);
inf
/               2                2
[        2   - x     2        - x
(%o4)               I      (x  %e     sin (x) + %e    ) dx
]
/
- inf
(%i5) x^2*%e^(-x^2)*sin(x)^2;
2
2   - x     2
(%o5)                          x  %e     sin (x)
(%i6) integrate(%,x,-inf,inf);
- 1
%e    sqrt(%pi) (%e + 1)
(%o6)                      ------------------------
4
(%i7) %e^(-x^2);
2
- x
(%o7)                               %e
(%i8) integrate(%,x,-inf,inf);
(%o8)                              sqrt(%pi)
(%i9)

```