f(x) = sin(x^2)
a   b   Try with n = 10000, 20000, 40000, ...
n       a b f
output / notes

Increasing "n" improves the precision, but if "n" is too large the precision gets worse
(observing the outputs you can see when they no longer tend to converge)