Unlike derivatives, not all integrals are solvable using simple algorithmic methods. Instead, there are a number of ways to estimate insoluble integrals. One way is to attempt to find the average value of the function over a certain interval by plotting points.
This model uses random numbers to find the integral (area) of a unit circle, which is known to be equal to Pi. The first algorithm does this by choosing random numbers between 0 and 1, finding their value on the unit circle and then taking the average. The result is then multiplied by four, since the model is only estimating the area of a quarter circle. In theory, as the number of samples increases, the estimated area should get closer to Pi.
The second algorithm uses the "darts" method, in which it chooses random points within the square [0, 1]x[0, 1] and determines if these points are inside the circle or not. Then, it takes a ratio to find the percentage of points inside the circle, and thus the approximate area of a quarter circle. This algorithm also estimates the value of Pi, and should be more accurate for higher numbers of samples.
This model is very simple. Push [Ctrl] [=] every time you want to get a new random sample of couples. There are no places to input new values.
As the number of samples taken increases, the estimated area of the circle should get closer and closer to its true value of Pi, or about 3.14159.