Hi Stavros,
Your suggestion gave me an idea; basically, I think that maxima doesn't
seem to be simplifying the summand in order to see that that terms
acutally go to zero as n->inf. I enclosed the summand inside ratsimp()
and the problem vanishes, at least for my case. Does maxima
effcectively treat
sum(a_n+b_n_+...) as sum(a_n) + sum(b_n) + ...
If so, I see lots of places for getting into trouble, but clearly maxima
shouldn't do this.
David
On Fri, 2008-04-18 at 11:43 -0400, Stavros Macrakis wrote:
> I don't know what the problem is in your calculation, but I wonder if
> it has to do with Maxima's treatment of inf and minf, which
> unfortunately are treated just like other symbolic constants (like
> %pi), so inf-inf = 0, which is of course incorrect.
>
> Normally this wouldn't matter, since Maxima doesn't generate inf and
> minf during expression manipulation, but with simpsum = true, it does,
> so you get things like
>
> sum(1,i,1,inf) - sum(2,i,1,inf) => 0
>
> which is of course nonsense.
>
> Try the following inf-safe sum definition and see what happens:
>
> infvar:0$
>
> ssum(a,b,c,d):=
> block([res: sum(a,b,c,d)],
> if member(res,[inf,minf])
> then concat(res,(infvar:infvar+1))
> else res);
>
> Let us know.
>
> -s
>
> PS I think there's a good argument to be made for having Maxima do
> something similar with inf/minf it generates, making each one
> distinct. I know that someone (Raymond?) is also working on having
> the simplifier not do inf-inf=>0, but there are lots of places other
> than the general simplifier which need to be changed (rat
> representation, compare, etc.).
>