On Nov. 20, 2012, Raymond Toy wrote:
----------------------------------------------
>> Edwin> I am getting a Lisp error message when I use your version:
>>
> Oops. I've uploaded a new version that fixes this.
>
>Unfortunately, it still takes a very long time. My original test used
>the default parameters and it converged very quickly. With your new
>parameters, I gave up after a minute or so.
>
>But I think the problem is with the integrand, 1/(1+sqrt(x)). I'm
>guessing the infinite slope at 0 is going to give lots of trouble.
>bromberg(g, 1/2, 1) returns instantly. bromberg(g,1/100,1) takes a
>little bit longer.
>
>Don't know if this will help or not, but it might be worthwhile to
>implement tanh-sinh quadrature
>(http://en.wikipedia.org/wiki/Tanh-sinh_quadrature). (I think Richard
>has mentioned this before.)
------------------------------------------------
I haven't tried your newest version of bromberg.lisp yet.
However in reference to your last remarks, I would like to emphasize
that the famous tanh-sinh quadrature method has been
available to Maxima users for a "long time".
I posted the Ch.9, Maxima by Example, mbe9bfloat.pdf (see pp. 21-26),
in April, 2009, (with a long message to the mailing list) which is
titled: "Bigfloats and Arbitrary Precision Quadrature", and section 9.3.3
has a detailed discussion of the ideas behind the tanh-sinh method,
and the Mmaxima implementation, with the Ch.9 file quad_ts.mac
allowing Maxima users to try out this method with their integrals.
When posting recently the latest version of Ch. 8 and its new software
files (as used below), I should have mentioned that the arbitrary precision
functions apnint and apquad make use of the tanh-sinh method for
a finite domain, and the double exponential method (also available in
Ch. 9 since 2009) for a non-finite domain.
Both of these methods (the tanh-sinh method seems more powerful and faster
than the Gauss-Legendre bigfloat method also available and discussed in ch.
9)
make use of your excellent bigfloat package.
Here is apnint at work (loading the new apnint.mac file from ch. 8):
--------------------------------------
(%i1) (load(nint),load(apnint));
_kmax% = 8 _epsfac% = 2
(%o1) "c:/work2/apnint.mac"
(%i2) method:true$
(%i3) tval : bfloat(2 - log(4)),fpprec:50;
(%o3) 6.1370563888010938116553575708364686384899973127949b-1
(%i4) apval : apnint(1/(1+sqrt(x)),x,0,1,20,30);
construct _yw%[kk,fpprec] array for kk =
8 and fpprec = 30 ...working...
tsquad
(%o4) 6.13705638880109381165535757084b-1
(%i5) time(%);
(%o5) [3.06]
(%i6) abs(apval - tval),fpprec:50;
(%o6) 3.8940901847614999031707591170620170928280850060151b-31
------------------------------------------------------------
Ted
http://www.csulb.edu/~woollett/