- #36
EngWiPy
- 1,368
- 61
The problem was that ux was not reset to x_prev_lim for each uy value, and there was a mistake in the MC simulation. Now it works perfectly, and agrees with the MC simulation. Thanks for your responses @andrewkirk.
For the integration over Xs, dx is constant, and thus applying Simpson's rule for some optimization is straightforward. We simply compute dx = (uy*z - x_prev_lim)/L, where L is an even number (say 600) that represents the number of points in the numerical integration.
However, for Ys the step size is changing within the same integral. How can we deal with the Simpson's rule here, to make sure that the number of points is even?
For the integration over Xs, dx is constant, and thus applying Simpson's rule for some optimization is straightforward. We simply compute dx = (uy*z - x_prev_lim)/L, where L is an even number (say 600) that represents the number of points in the numerical integration.
However, for Ys the step size is changing within the same integral. How can we deal with the Simpson's rule here, to make sure that the number of points is even?