I need to numerically solve an integral of the form $$\int_0^1\int_0^1|f|.$$ You may assume that $f$ has a first derivative, if it matters.
How should I solve this problem? The scheme should be easy to implement and it does not need to be super sophisticated. However, I've started with $$\frac1{n^2}\sum_{i=1}^n\sum_{j=1}^n\left|f\left(\frac{i-1}n,\frac{j-1}n\right)\right|$$ and that gave me unsatisfactory results.
My first thought was to try Simpson's rule in both dimensions (I couldn't find a reference for the formula in 2d; the one described in this question seems wrong, since no midpoint is evaluated ...).