Thanks for the reply Stavros,
I've added the ssum as you suggested. Now I get queries about various
things being positive, negative or zero (I answered positive to all).
In the end I get:
(%i40) ratsimp(a2-a3);
(%o40) (inf2 - inf4) phi (y) + (inf1 - inf3) phi (x) + inf4 + inf3 -
inf2
1
- inf1
I also tried answering negative to the queries and now I get inf->minf
in the test. The issue seems to be more related to sustitution of
arguments. The problem shows up before the sums are actually done, as
per my earlier post today.
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.).
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>