Re: Monte Carlo in Mathematica ?
- To: mathgroup at smc.vnet.net
- Subject: [mg23924] Re: Monte Carlo in Mathematica ?
- From: adam_smith at my-deja.com
- Date: Fri, 16 Jun 2000 00:57:03 -0400 (EDT)
- References: <8i9qic$2o3@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Madhusudan,
Without knowing more details about the integration you are doing I
might suggest using the "Method->MonteCarlo" or "Method-
>QuasiMonteCarlo" for NIntegrate[] instead of Integrate[]. For your
example, you would do:
a=Sum[NIntegrate[.....,{},{},{},Method -> MonteCarlo],{}]
See the Help under NIntegrate for more information on the methods
available under NIntegrate and some examples. So experimentation may
be worthwhile.
Adam Smith
In article <8i9qic$2o3 at smc.vnet.net>,
Madhusudan Singh <chhabra at eecs.umich.edu> wrote:
>
> I have a complicated problem to solve in Mathematica.
>
> Basically,
> a=Sum[Integrate[.....,{},{},{}],{}] ;(*The integral is over three
> variables*)
> Print[N[a,MaxPoints->2000]];
>
> This yields an error that 2000 is not a machine sized real number in
the
>
> range $MinPrecision(0 in my case) and $MaxPrecision(1x10^6 in my
case).
>
> I have even tried MaxPoints->($MinPrecision+$MaxPrecision)/2 ! Had I
not
>
> been in a hurry, I would have probably found this amusing.
>
> The usual adaptive recursive algorithm for NIntegrate takes too long
and
>
> I want Mathematica to give me an approximate answer by using Monte
Carlo
>
> (or so the Mathematica book indicates) by using MaxPoints.
>
> Any ideas ?
>
> With regards,
> Madhusudan Singh.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.