Re: Problem with Integral in mathematica 5.1
- To: mathgroup at smc.vnet.net
- Subject: [mg82524] Re: Problem with Integral in mathematica 5.1
- From: cyrius24 <cyrilschamper at hotmail.com>
- Date: Tue, 23 Oct 2007 05:35:03 -0400 (EDT)
Hi,
I found some errors in the last script. But, I remark if I change the order of the integrations, I do not have the same results! I paste two different cases below. Do you find same thing with your mathematica?
Best regards
If I integrate first z, then y, then x
f[x_, y_, z_] = 1/(4*Pi*yc)*(3*
x^2/(Sqrt[x^2 +
y^2 + z^2])^5 - 1/(
Sqrt[x^2 + y^2 + z^2])^3 + k^2/2*(x^2/(Sqrt[x^2 + y^2 +
z^2])^3 + 1/(Sqrt[x^2 + y^2 + z^2])));
g[x_, y_, z_] = Integrate[f[x, y, z], z];
h[x_, y_] = g[x, y, z2] - g[x, y, z1];
i[x_, y_] = Integrate[h[x, y], y];
j[x_] = i[x, y2] - i[x, y1];
l[x_] = Integrate[j[x], x];
res = l[x2] - l[x1] // FortranForm
x1 = -0.5;
x2 = 0.5;
y1 = -0.5;
y2 = 0.5;
z1 = -0.5;
z2 = 0.5;
yc = 1 + I*5.56*10^(-11);
k = 1.99*10^(-3) - I*1.99*10^(-3);
res
If I integrate first x, then y, then z :
f[x_, y_, z_] = 1/(4*Pi*yc)*(3*
x^2/(Sqrt[x^2 +
y^2 + z^2])^5 - 1/(
Sqrt[x^2 + y^2 + z^2])^3 + k^2/2*(x^2/(Sqrt[x^2 + y^2 +
z^2])^3 + 1/(Sqrt[x^2 + y^2 + z^2])));
g[x_, y_, z_] = Integrate[f[x, y, z], x];
h[y_, z_] = g[x2, y, z] - g[x1, y, z];
i[y_, z_] = Integrate[h[y, z], y];
j[z_] = i[y2, z] - i[y1, z];
l[z_] = Integrate[j[z], z];
res = l[z2] - l[z1] // FortranForm
x1 = -0.5;
x2 = 0.5;
y1 = -0.5;
y2 = 0.5;
z1 = -0.5;
z2 = 0.5;
yc = 1 + I*5.56*10^(-11);
k = 1.99*10^(-3) - I*1.99*10^(-3);
res