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