forum.alglib.net
http://forum.alglib.net/

Infinite loop in the integration
http://forum.alglib.net/viewtopic.php?f=2&t=514
Page 1 of 1

Author:  jambulat [ Wed Jan 11, 2012 1:28 am ]
Post subject:  Infinite loop in the integration

Hello, Sergey!

Recently I tried to use your library for calculation integrals like the following:

\int\limits_{-1}^1 g(x')G(x,x')dx'

where Green function G(x,x') is
Image

If one considers a simple case when g(x)=1, the integral can be calculated at the whole region x\in(-1..1), except of the boundary points x=-1 and x=1. But using the routines autogksingular/autogkiteration program is trapped into infinite loop even when x is quite close to -1/1, for example, for x=-0.97.

And my question:
Is there some way to make the library calculate the integrals with the stated Green function exactly on the region x\in(-1..1) ?

P.S. I use AlgLib v. 3.1.0
P.P.S. In the formula for G(x,x') one can put \xi,\xi'=x,x'

Author:  Sergey.Bochkanov [ Wed Jan 11, 2012 5:35 am ]
Post subject:  Re: Infinite loop in the integration

Can you try ALGLIB 3.4? Previous versions of ALGLIB had difficulties when integrating functions with numerical noise higher than some level. There was a fix made at 3.4, which solved this issue. I suppose that it should solve your problem.

Author:  jambulat [ Thu Jan 12, 2012 5:30 pm ]
Post subject:  Re: Infinite loop in the integration

Thank you! With 3.4.0 version my code works perfectly! Even better than Maple in some cases. Function G(x,x') has a logarithmic singularity when x=x', Maple code can fail under the certain data, but your recent code can calculate the integral in this cases.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/