Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problem with Integral in mathematica 5.1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82493] Problem with Integral in mathematica 5.1
  • From: cyrius24 <cyrilschamper at hotmail.com>
  • Date: Mon, 22 Oct 2007 05:39:12 -0400 (EDT)

Hi,

I have three integrals on a volume which normaly gives the same value when I make the integral on a cubic volume (same intervals for the three variables). In the starting functions which all depend on x,y and z, there is just a change in the numerator, it is x^2 for Gxx, y^2 for Gyy, and z^2 for Gzz. I obtain the same results at the end for Gxx and Gzz, but Gyy is different. And I actually don't understand. Below I paste the three different scripts for Gxx,Gyy, and Gzz. If you find something strange, please tell me.

Thank you in advance for your response

Best regards



Gxx:

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, x], 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^(-3);
res


Gyy:

f[x_, y_, z_] = 1/(4*Pi*yc)*(3*
    y^2/(Sqrt[x^2 + 
            y^2 + z^2])^5 - 1/(
                Sqrt[x^2 + y^2 + z^2])^3 + k^2/2*(y^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, x], 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^(-3);
res




Gzz:

f[x_, y_, z_] = 1/(4*Pi*yc)*(3*
    z^2/(Sqrt[x^2 + 
            y^2 + z^2])^5 - 1/(
                Sqrt[x^2 + y^2 + z^2])^3 + k^2/2*(z^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, x], 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^(-3);
res


  • Prev by Date: Re: compute distribution
  • Next by Date: Re: Hankel transform question
  • Previous by thread: Re: DSolving(?) for a given tangent
  • Next by thread: Re: Problem with Integral in mathematica 5.1