Concerning integration of functions defined piecewise,
Richard Fateman wrote:
> This is not to say that some hacked up heuristic cannot
> work. It will just fall apart sooner or later.
I guess I'm more optimistic. If we can get Maxima to understand
the algebraic properties of functions defined piecewise,
then all the integrals, derivatives, etc should fall out
by turning the crank. I don't see a need for hacking here.
It is clear that we can make more progress by writing
piecewise functions as algebraic expressions rather than
as programming constructs. Suppose piecewise functions are
constructed as sums or products involving a unit step function,
U(x) = 1 for x > 0 and 0 otherwise. The useful properties
include d/dx U(x) = unit impulse at 0, antiderivative U(x)
= x U(x), U^2(x) = U(x), and so on. It seems plausible that
if Maxima understood these properties, the algorithmic
definition of U might never be used, except to make plots
or otherwise evaluate an expression.
As a proof of concept, I've solved the conundrum which
bothered me before, to find the repeated convolution of
V(x) := U(x) - U(x-1). I used matchdeclare and defmatch to
replace a term of the form x^n U(x-a) U(b-x) with its
antiderivative. I had to do some work by hand, but the
point is that the whole process was purely algebraic.
In grind format, for V^4 = V*V*V*V I get
x^3*U(x)/6-2*x^3*U(x-1)/3+2*x^2*U(x-1)-2*x*U(x-1)+2*U(x-1)/3+x^3*U(x-2)
-6*x^2*U(x-2)+12*x*U(x-2)-8*U(x-2)-2*x^3*U(x-3)/3+6*x^2*U(x-3)
-18*x*U(x-3)+18*U(x-3)+x^3*U(x-4)/6-2*x^2*U(x-4)+8*x*U(x-4)
-32*U(x-4)/3$
I also computed V^8, and V^16 is in progress, but it looks
as though it will take a while.
For what it's worth,
Robert Dodier
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail