Hi,
I asked a question yesterday regarding a factor of 2:
/*Maxima Input*/
assume(omega>0);
assume(c>0);
assume(sigma>0);
assume(k>0);
W(p):=2*k*cos(omega*(p)/c);
l0(s,p):=q/(sigma*sqrt(2*pi))*exp(-(s-p)^2/(2*sigma^2));
l1(s):=q/(sigma*sqrt(2*pi))*exp(-(s)^2/(2*sigma^2));
V(s):=integrate(l0(s,p)*W(p),p,minf,inf);
V(s);
U(s):=integrate(V(s)*l1(s),s,minf,inf);
U(s);
/* Output gives:
(2*k*q^2*%e^(-(omega^2*sigma^2)/c^2))
*/
/*Mathematica Input*/
W[p_] := 2*k*Cos[omega*(p)/c];
I0[s_, p_] := q/(sigma*Sqrt[2*\[Pi]])*Exp[-(s - p)^2/(2*sigma^2)];
I1[s_] := q/(sigma*Sqrt[2*\[Pi]])*Exp[-(s)^2/(2*sigma^2)];
V[s_] := Integrate[I0[s, p]*W[p], {p, 0, \[Infinity]},
Assumptions -> {k > 0 && omega > 0 && c > 0 && sigma > 0}];
Integrate[V[s] I1[s], {s, -\[Infinity], \[Infinity]},
Assumptions -> {k > 0 && omega > 0 && c > 0 && sigma > 0}];
/*Output:
k*q^2*%e^(-(omega^2*sigma^2)/c^2))
/*
I had forgotten that I had changed the limits of integration on the maxima
integral "V(s)" to (minf,inf) instead of (0,inf). The reasoning was that
maxima was seemingly unable to correctly formulate an the answer with the
(0,inf) bounds (it spits out a very long and complicated answer). The
factor of 2 comes from the even nature of the integrand.
However, it would still be nice to know if maxima can evaluate the integral
under the correct limits of (0,inf).
--
Thanks and sorry for any wasted time/confusion,
Fran?ois