Proble : maxima finds a primitive, but not a defnite integral.
Subject: Proble : maxima finds a primitive, but not a defnite integral.
From: Raymond Toy
Date: Tue, 20 Nov 2012 19:40:45 -0800
>>>>> "Emmanuel" == Emmanuel Charpentier <emm.charpentier at free.fr> writes:
Emmanuel> Dear list,
Emmanuel> Could some kind soul explain to me why maxima
[snip]
Emmanuel> can easly find this primitive :
Emmanuel> (%i1) integrate(1/(1+sqrt(x)), x);
Emmanuel> (%o1) 2 (sqrt(x) + 1) - 2 log(sqrt(x) + 1)
Emmanuel> but does not appy it to this definite integral :
Emmanuel> (%i2) integrate(1/(1+sqrt(x)), x, 0, 1);
[snip]
Emmanuel> In other words, WTF ???
If you can, please file a bug report about this. For this particular
integral, it turns out that poles-in-interval returns unknown, so
maxima gives up. I guess that means solve couldn't find the zeroes of
1+sqrt(x). If you set intanalysis:false, then the definite integral
is returned correctly.
Emmanuel> PS : an, oh, by the way quad_qags
Emmanuel> (%i5) quad_qags(1/(1+sqrt(x)), x, 0, 1);
Emmanuel> (%o5) [0.61370563888011, 2.5191337904573174E-10, 231, 0]
Emmanuel> seems preferable to quad_qag
Emmanuel> (%i6) quad_qag(1/(1+sqrt(x)), x, 0, 1, 6);
Emmanuel> (%o6) [0.6137056388632, 3.5930198130608816E-9, 1159, 0]
Emmanuel> In this example. Again, why ?
Why do you think quad_qag should do better than quad_qags for this
integrand?
I'm not 100% sure, but I think quad_qags does better because it
handles the case of the infinite slope at zero better. But I don't
have the quadpack book to understand which cases should perform
better.
Ray