Stavros Macrakis wrote:
> On Mon, Mar 10, 2008 at 7:24 AM, Alexios Tamparopoulos
> <alexis.maxima at gmail.com> wrote:
>
>> f2(x):=x/(1-cos(x)+x^2);
>> integrate(f2(x),x,0,2*%pi);
>> not result was presented (should be 8*%pi/3 if calculation I did by hand
>> was right).
>> Seems like Maxima can't handle this integral.
>>
>
> I'm afraid your hand calculation is incorrect -- this integral is
> divergent. You can see this as follows:
>
> f2: x/(1-cos(x)+x^2)$
> f2t: taylor(f2,x,0,0) => 2/(3*x)
> since integrate(1/x,x,0,a) is divergent, this is divergent
>
> Now let's use Maxima to study the behavior of this integral when the
> lower limit is near 0. Let's separate the pole part and the rest:
>
> pole_part: integrate(f2t,x,a,2*%pi) => 2*(log(2*%pi)-log(a))/3
>
> nonpole_part: quad_qag( f2 - ratsimp(f2t), x, 0, 2*%pi, 1)[1] => - 0.094188
> (The ratsimp prevents Maxima from truncating f2 by contagion.)
>
> So the whole thing looks like expand(float(pole_part+nonpole_part)) =>
> 1.131063 - 0.666667 * log(a) or 1.131063 - 2/3*log(a)
>
> I have no idea if there is a closed form.
>
> -s
>
>
About the last integral I wrote, it was an obvious mistake of me, I
guess I got tired from calculations... Sorry about that!
About the first issue, I noticed that [assume] does not take away
useless questions, and that's what I would like to know about. Here's
another example:
assume(a>0,a<1);
f8(x):=%e^(a*x)/(1+%e^x);
integrate(f8(x),x,minf,inf);
I get the questions:
Is %e^a - %e positive, negative, or zero?
Is a an integer ?
Again, [assume] can cut 2 out of the 4 questions, but these printed 2
still remain trivial to answer. What I don't really get is: Maxima is
making so sophisticated calculations but is not able answer to these
questions it asks?