You need to select the form of the function from the graph. There are many possibilities: polynomial fit, B-splines fit, sum of weighted exponentials, etc. In order to help you we would need to know more about the function you want to estimate.
The Monte Carlo simulation is used to compare the performance of all estimates, and the embodiment of what has been have been presented in the theoretical side and according to the objectivity, it was necessary to examine a number of different cases of which sample sizes, to represent small, moderate and large sample sizes,
If you are looking for practical help for implementing Monte Carlo integration, take a look at the following link where you can find the description of routines for multidimensional Monte Carlo integration from the GNU Scientific Library: