[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-gsl] Monte carlo integration

**From**: |
Sergio Dominguez |

**Subject**: |
Re: [Help-gsl] Monte carlo integration |

**Date**: |
Thu, 22 Apr 2004 08:59:50 +0100 |

**User-agent**: |
Mutt/1.3.28i |

El A las 10:23 del 21 de Apr de 2004, Brad Bell dijo:
>* *
>* I am uncertain of the function you are integrating. Is it something like*
>* *
>* int_{-1}^{+1} dx*
>* int_{-sqrt(1-x^2)}^{+sqrt(1-x^2)} dy*
>* exp[ - a * .5 * (x^2 + y^2) ]*
>* *
>* ?*
Something like,
int_{-1}^{1} dx1 int_{-sqrt(1-x1^2)}^{+sqrt(1-x1^2)} dy1 int_{-1}^{1} dx2
int_{-sqrt(1-x2^2)}^{+sqrt(1-x2^2)} dy2
exp [ -a *sqrt[ (x1-x2)^2 + (y1-y2)^2] ]
This can be rewritten in a more elegant way. The reason, in case
someone wonders, I'm doing it like this is: this is the first
of a series of integrals, with different integration limits, that
have to be integrated in cartesians.
I know the analytic solution
for this integral, and I'm trying to integrate numerically to contrast
the numerical result with the analytic result before attempting the others.
Hence my question.
Thank you very much,
Sergio
--
There is an old time toast which is golden for its beauty.
"When you ascend the hill of prosperity may you not meet a friend."
-- Mark Twain