Integration - Maxima and Mathematica give different result
- Subject: Integration - Maxima and Mathematica give different result
- From: Francois Lemery
- Date: Sat, 9 Feb 2013 14:46:01 -0600
Dear Maximaticians,
I am confused why Maxima and Mathematica give different answers for the
following integration by 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*%pi*k*q^2*%e^(-(omega^2*sigma^2)/c^2))/pi
**Also, why doesn't maxima remove the pi/pi in this last expression? Even
after ratsimp??
*/
/*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))
/*
--
Many thanks,
Fran?ois