integrate() handles infinite intervals.
The standard approach, which integrate() uses, is to use a
transformation (u-substitution)
u = 1/x
\int_1^\infty f(x) dx = \int_0^1 f(1/u) u^{-2} du
It adjusts this based on the value of a. For a double-infinite
integral it splits the domain into two and does a transformation
for each.
For Monte Carlo you can do a transformation followed by Monte Carlo.
But for a one-variable problem it is generally better to use an
adaptive deterministic method like integrate() rather than
Monte Carlo.
Tim Hesterberg
>Hello,
>
>I would like to perform integral calculation using the Monte-carlo method.
>I understood how to use the method when the integral is defined on a
>finite interval [a ; b], but how can I do when my integral is defined in
>an interval [a ; infinite[ ?
>Does someone have a clue for this, or may be an S-PLUS function ?
>
>Thanks a lot,
>
>Anna le Sanquer
========================================================
| Tim Hesterberg Senior Research Scientist |
| timh@insightful.com Insightful Corp. |
| (206)802-2319 1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax) Seattle, WA 98109-3044, U.S.A. |
| www.insightful.com/Hesterberg |
========================================================
I'll teach:
Advanced Programming in S-PLUS
Oct 8-9 San Francisco
Bootstrap Methods and Permutation Tests
Oct 10-11 San Francisco
http://www.insightful.com/services/training.asp
|