Performs Monte Carlo integration to calculate the values of various integrals and special functions.
y = montecarlo(intgeral_function,c1,c2,lo_limit,up_limit,N_itr,method)
output
constant which depends on the type of the integral.
lower and upper limit of the integral.
number of times the user wants to perform the Monte Carlo integration to calculate the value of integral. Larger the value of N_itr better will be the accuracy.
Different Monte Carlo integration algorithms namely Plain Monte Carlo, Miser Monte Carlo and Vegas Monte Carlo are available. The user can set the method to select the desired algorithm for Monte Carlo integration. For method =1, plain Monte Carlo algorithm will be used, method=2 miser Monte Carlo algorithm will be used and for all other values of the parameter method the function will use Vegas Monte Carlo algorithms. Out of these three algorithm, the vegas Monte Carlo algorithm is the most accurate while the plain Monte Carlo algorithm is the least accurate.
user would have to select the value from 1 to 8 for the function for which they want to perform the Monte Carlo Integration.
Evaluate Gamma function gamma(n), c1 represents n and can be only non-negative fraction or integer while c2=0, lo_limit=0, up_limit is infinite, can be set to a large integer e.g. 100
Evaluate Gaussian function G(mu,sig), c1 and c2 represent the mean mu and standard deviation sig ,lo_limit and up_limit are -infinite and +infinite respectively and can be set to a large integer e.g. 100
Evaluate Airy's Function Ai(x), c1 represents x, can take any value while c2 = 0,lo_limit =0 and up_limit is infinite and can be set to a large integer e.g. 100
Evaluate Airy's Function Bi(x), c1 represents x, can take any value while c2 = 0,lo_limit =0 and up_limit is infinite and can be set to a large integer e.g. 100
Evaluate Elliptic integral of first kind F(phai,k), c1 represents k and lies in [-1,1], c2 = 0,lo_limit =0 and up_limit lies in [0,pi/2]
Evaluate Elliptic integral of second kind E(phai,k), c1 represents k and lies in [-1,1], c2 = 0,lo_limit =0 and up_limit lies in [0,pi/2]
Evaluate Beta function beta(m,n), c1 and c2 represent m and n respectively and are positive integers, lo_limit=0, up_limit=1
Evaluate Bessel Function of first kind Jn(x), c1 represents n and will be an integer , c2 represents x and will be a real number,lo_limit = 0 and up_limit = pi
This function accepts choice, two numbers, lower limit, upper limit and number of calls to perform Monte Carlo integration