Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6881 > unrolled thread

NIntegrate with AdaptiveMonteCarlo gives different results

Started byvalentina <fuchi8@tiscali.it>
First post2011-12-01 13:04 +0000
Last post2011-12-02 12:24 +0000
Articles 2 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  NIntegrate with AdaptiveMonteCarlo gives different results valentina <fuchi8@tiscali.it> - 2011-12-01 13:04 +0000
    Re: NIntegrate with AdaptiveMonteCarlo gives different results valentina <fuchi8@tiscali.it> - 2011-12-02 12:24 +0000

#6881 — NIntegrate with AdaptiveMonteCarlo gives different results

Fromvalentina <fuchi8@tiscali.it>
Date2011-12-01 13:04 +0000
SubjectNIntegrate with AdaptiveMonteCarlo gives different results
Message-ID<jb7u17$jr5$1@smc.vnet.net>
Hello everybody,
I am dealing with a three dimensional integral and I am using
NIntegrate. Searching the web I found out that the best method is the
AdaptiveMonteCarlo, which also speed up the calculation.
this is the integral, no particular singular points:


test[d_] := (0.5  NIntegrate[(compnx[x, y, z, d] +
       compny[x, y, z, d] + compnz[x, y, z, d]), {z, -R - d/2,
      R + d/2}, {x, -R, R}, {y, -R, R},
     Method -> "MultiDimensionalRule"]*hc) // Timing

so I want to calculate it for different values of the parameter d, but
for example if I successively calculate it for d=4 i get two different
results which differs of about 30-50 MeV.

Does anyone know if it is a bug or how could I fix it?

Thanks in advance.

[toc] | [next] | [standalone]


#6889

Fromvalentina <fuchi8@tiscali.it>
Date2011-12-02 12:24 +0000
Message-ID<jbag1n$1ub$1@smc.vnet.net>
In reply to#6881
On Dec 1, 2:04 pm, valentina <fuc...@tiscali.it> wrote:
> Hello everybody,
> I am dealing with a three dimensional integral and I am using
> NIntegrate. Searching the web I found out that the best method is the
> AdaptiveMonteCarlo, which also speed up the calculation.
> this is the integral, no particular singular points:
>
> test[d_] := (0.5  NIntegrate[(compnx[x, y, z, d] +
>        compny[x, y, z, d] + compnz[x, y, z, d]), {z, -R - d/2,
>       R + d/2}, {x, -R, R}, {y, -R, R},
>      Method -> "MultiDimensionalRule"]*hc) // Timing
>
> so I want to calculate it for different values of the parameter d, but
> for example if I successively calculate it for d=4 i get two different
> results which differs of about 30-50 MeV.
>
> Does anyone know if it is a bug or how could I fix it?
>
> Thanks in advance.

Sorry,
I did not tell everything about the integrand.
x,y,z are the Cartesian coordinate, so I am dealing with three
dimensional functions, smooth function imagine like having two smooth
peaks centered in a symmetric way around (0,0,0). Just when both x and
y are equal to zero i have singularities but NIntegrate seems to deal
with them because without specifying the method, it took hours, but i
get the correct result.
hc is a physical constant, namely 197.3 MeV fm, so it's a number just
to have the result in energy dimension.
Should I specify more options when calling the AdaptiveMonteCarlo?

thanks  and sorry again for my lack of informations

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web