Question: Problem with Simpson method

I think Simpson's rule for integration is very simple and it is just function evaluation over a few points on the interval of integration. So we expect it to be fast.

When I use it as a summation command (using Simpson's formula) it is really fast but when I use the command ApproximateInt with Simpson method it is sometimes really slow. For example


f := unapply(x^2/(sin(x)+x+1), x);


evalf(ApproximateInt(f(x), x = 1 .. 2, method = simpson, partition = 20));

or even with partition=10 you must wait for a long time.

Please help.

Thank you

Please Wait...