Since the exact integral is exactly 0, and computations on reals are
inherently approximate, you should plan on getting a non-zero result, which
has an infinite relative error though a finite absolute error.
Both romberg and quad_qags allow you to specify how much relative or
absolute error you are willing to tolerate. If you specify a relative error
(the default) rather than an absolute error, the calculation is unlikely to
converge. So you need to specify a non-zero absolute tolerance.
See the documentation of romberg and quad_qags for how to do this.
-s
On Sat, Oct 11, 2008 at 4:01 PM, Robert Marik <marik at mendelu.cz> wrote:
> Dear Maxima users, the functions romberg and quad_qags have problems with
> integrating log(x)/(1+x^2) from 1/10 to 10.
>
> Replacing 1/10 by 10/99 or 10/101 we get some (probably correct) answer.
> Why integration from 1/10 to 10 fails? What is special in this case?
>
> Thank you. Robert Marik
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>