Integration bug
- Subject: Integration bug
- From: Valery Pipin
- Date: Wed, 11 Jun 2003 01:18:54 +0900
I'm sorry
Integrand is t^2/sqrt(1-t^2)/(1+b^2*t^2)
and result given by mathematica is %pi/b^2*(1-1/sqrt(1+b^2));
For Integrand: t^2*sqrt(1-t^2)/(1+b^2*t^2 the maxima result is wrong as well
Result is pi/2 in this case
rgds,
v
On Wednesday 11 June 2003 00:20, Stavros Macrakis wrote:
>Valery,
>
>Though defint's result is not correct, I don't think your formula is
>correct, either. (I am using prebuilt 5.9.0, not CVS.)
>
>Consider:
>
> integrand: t^2*sqrt(1-t^2)/(1+b^2*t^2);
> vp_int: %pi/b^2*(1-1/sqrt(1+b^2));
> defint: integrate(integrand,t,-1,1);
>
> table:
>makelist(float([romberg(''integrand,t,-1,1),''vp_int,''defint]),
> b,[0.001,0.234,0.753,1.0])$
> fpprec:6$
> apply(matrix,cons(["b","Romberg","vp_int","Defint"],table));
>
> [ b Romberg vp_int Defint ]
> [ ]
> [ 0.001 0.3927 1.5708 3.14159E+12 ]
> [ ]
> [ 0.234 0.3823 1.5091 1076.51 ]
> [ ]
> [ 0.753 0.3098 1.11451 12.542 ]
> [ ]
> [ 1.0 0.2695 0.9202 4.71239 ]
> [ ]
> [ 100.0 1.53968E-4 3.11018E-4 1.57111E-4 ]
>
>For that matter, look at the case b=0 analytically:
>
> integrandb0: subst(0,b,integrand) => t^2 sqrt(1-t^2)
> indefintb0: integrate(integrandb0,t)
> Verify: ratsimp(diff(indefintb0,t)) == integrandb0
> subst(1,t,indefintb0)-subst(-1,t,indefintb0) => %pi/8
> integrate(integrandb0,t,-1,1) => %pi/8
>
>and numerically:
>
> romberg(''integrandb0,t,-1,1) => 0.392693 ~~ %pi/8
>
>But
>
> limit(vp_int,b,0) => %pi/2
>
>Maxima's indefinite integral is not correct, either:
>
> subst([t=0,b=1],integrand) => 0
> subst([t=0,b=1],diff(integrate(integrand,t),t)) => 2
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima