Integration has problems with sums



On 6/25/07, Robert Dodier <robert.dodier at gmail.com> wrote:
>
> By default, Maxima does not treat integrate as linear,
> probably because there are infinite series which cannot
> be integrated term by term. However, for any finite sum,
> the integral of the sum is the sum of the integrals, right?


Mathematically true.  However, the integral of the sum may be expressible in
closed form, while the integrals of the individual summands are not -- and
this is not a rare and obscure case given what the derivative of a product
looks like.  If integrals were expanded out as linear before integrate saw
them, integrate would not be able to integrate such cases.

So this is at least a pretty significant missed opportunity
> on Maxima's part. Maxima developers: Yes/no?


No.  The integrate routine should do these right.  This is simply (well,
"simply") a limitation (verging on a bug) in integrate.  I have no idea how
easy or hard this would be to fix.  Obviously the trivial approach -- have
integrate try integrating term by term if integrating the whole thing
doesn't work -- would be very easy to implement, but in the vast majority of
cases, this would simply perform redundant work and not change the result.
And what do you do with int(a+b+c) where a+c is integrable in closed form?
Try all partitions of sums?   As I say, all this sort of thing should be
handled within integrate, not by the general simplifier trying to outguess
it.

As for "the linearity was applied too late" in your example, this is working
exactly as it is supposed to.  Remember that integrate is a verb/noun
symbol, so the routine integrate is called on the arguments.  Only after it
has done its thing does it return a noun -- a.k.a. a simplifying function.
Since it has already done its work, it is only supposed to return noun forms
which it cannot integrate.  All this is basic to the Maxima architecture of
routines vs. simplifying functions, that is, the relationship of the
evaluator and the simplifier. If the "try integrating term by term" method
should be tried, it should be tried by the integrate routine itself -- the
simplifier (which is responsible for the linear property) shouldn't get
involved in things like that.  Re-calling the integrate routine after
simplifying the integrate noun, in this architecture, is incorrect.  Of
course, it is possible to imagine other architectures, and I think some of
the other CASs use other architectures.  But this is not a trivial change.

             -s