Consider the integral
So that
There are a few restrictions on g. First it must be positive definite. Secondly, it must be integrable over an infinite range. A third feature is not necessary, but it would be nice if it were integrable in such a way that we can easily find the r(t) at the top of .
I start by looking for a function of x that is an exact derivative, because then I can integrate it. The function looks like r for small values of r and like 1 for large values of r. This seems like a “nice” set of features for the integral to have.
On substituting this into
Then the numerator in is
Note that the integral from 0 to
infinity is 1. So that the relation between x and t given by is
. Simply plugging into yields
Solving for r(t) yields
IMPLICIT REAL*8(A-H,O-Z)
PARAMETER (N=5000)
DATA PI/3.141592653589793D0/
C
*** MID-POINT
AINT=0
H=1D0/N
open(1,file='ftest.out')
DO I=1,N
T=H*(I-.5D0)
R=T/(1-T)
F=(1+R)**2*FTEST(R)
write(1,'(2g20.6)')t,f
AINT=AINT+F
ENDDO
AINT=AINT*H
ANAL=PI/2
PRINT*,' NUMERICAL FULL INTEGRAL ',AINT
PRINT*,' ANALYTIC FULL INTEGRAL ',ANAL
READ(*,'(A)')
END
Evaluate both to r and to infinity the integrals
a.
Dwight 856.08
b. Dwight 858.653
[1]
J.M. Hammersley and D.C. Handscomb, Monte Carlo Methods
(Methuen and Co.,