How does Maxima best do numerical integration? I tried romberg and I failed. Attached is an example. Maxima 5.9.3 http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. This is a development version of Maxima. The function bug_report() provides bug reporting information. (%i1) batching #pC:/dfw5/MATH/testrf.mac (%i2) load(c:\dfw5\math\elliptbf2.mac) (%i3) mrf : bfloat([[1, 2, 0, 1.3110287771461], [%i, - %i, 0, 1.8540746773014], [0.5, 1, 0, 1.8540746773014], [%i - 1, %i, 0, 0.79612586584234 - %i 1.2138566698365], [2, 3, 4, 0.58408284167715], [%i, - %i, 2, 1.0441445654064], [%i - 1, %i, 1 - %i, 0.93912050218619 - %i 0.53296252018635]]) Warning: Float to bigfloat conversion of 1.3110287771461 Warning: Float to bigfloat conversion of 1.8540746773014001 Warning: Float to bigfloat conversion of 0.5 Warning: Float to bigfloat conversion of 1.8540746773014001 Warning: Float to bigfloat conversion of 0.79612586584234002 Warning: Float to bigfloat conversion of -1.2138566698365001 Warning: Float to bigfloat conversion of 0.58408284167714997 Warning: Float to bigfloat conversion of 1.0441445654064001 Warning: Float to bigfloat conversion of 0.93912050218618992 Warning: Float to bigfloat conversion of -0.53296252018635004 (%o3) [[1.0b0, 2.0b0, 0.0b0, 1.3110287771461b0], [%i, - 1.0b0 %i, 0.0b0, 1.8540746773014b0], [5.0b-1, 1.0b0, 0.0b0, 1.8540746773014b0], [%i - 1.0b0, %i, 0.0b0, 7.9612586584234b-1 - 1.2138566698365b0 %i], [2.0b0, 3.0b0, 4.0b0, 5.840828416771499b-1], [%i, - 1.0b0 %i, 2.0b0, 1.0441445654064b0], [%i - 1.0b0, %i, 1.0b0 - 1.0b0 %i, 9.391205021861899b-1 - 5.3296252018635b-1 %i]] (%i4) fpprec : 20 (%o4) 20 (%i5) bferrtol : 1.0b-6 (%o5) 1.0b-6 (%i6) maxn : 16 (%o6) 16 (%i7) bfrf((mrf ) , (mrf ) , (mrf ) ) - (mrf ) 5 1 5 2 5 3 5 4 (%o7) 1.7679644369588548569b-15 2 (%i8) rf(x, y, z) := romberg(u/SQRT((x - 2 u x + u (1 + x)) 2 2 (y - 2 u y + u (1 + y)) (z - 2 u z + u (1 + z))), u, 0, 1) 2 (%o8) rf(x, y, z) := romberg(u/SQRT((x - 2 u x + u (1 + x)) 2 2 (y - 2 u y + u (1 + y)) (z - 2 u z + u (1 + z))), u, 0, 1) (%i9) bfloat(rf((mrf ) , (mrf ) , (mrf ) ) - (mrf ) ) 5 1 5 2 5 3 5 4 Warning: Float to bigfloat conversion of 1.0 Warning: Float to bigfloat conversion of 2.0 Warning: Float to bigfloat conversion of 1.0 Warning: Float to bigfloat conversion of 2.0 Warning: Float to bigfloat conversion of 1.0 Warning: Float to bigfloat conversion of 2.0 Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]: ((MTIMES SIMP) 1.0 ((MEXPT SIMP) ((|$sqrt| SIMP (9 "C:/dfw5/MATH/testrf.mac" SRC $RF 9)) ((BIGFLOAT SIMP 69) 295147905179352825856 1)) -1)) is not of type (OR RATIONAL LISP:FLOAT). Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil. Regards, Jim FitzSimons
Attached file: elliptbf2.mac
Attached file: testrf.mac