[Maxima] New piecewise package in development
rvh2007 at comcast.net
Sat Nov 1 14:46:37 CDT 2008
Okay, the bad news is that diff cannot be trusted. The answer may look right to some users but it is not, especially
for complicated expressions. The good news is that integrate works fine and I have discovered nothing at all wrong with
The diff function cannot be fixed easily but it can be fixed, it is a mathematical reasoning error on my part and the
fix requires writing a lot of currently non-existent code. But it will get done sometime over the next week or so I
hope. I don't expect any problems. Patience is a good thing. I have to introduce the diracdelta functional in order
to make this work, currently I have been trying to avoid that, but it can't be done any other way that I know of (or
want to). The solution is to define and make use of a new pw.mac function diracdelta(x). That will work.
The problem can be shown to exist easily by considering the the following two identities.
integrate(diff(expr,x),x) == expr + C
diff(integrate(expr,x),x) == expr
They don't both work. Try it on a complex expression like this one. I have suppresed the output.
(%i4) f:[-10, -(x^2-25)/15, -5, -15/3*sin(3*x), 0, x^2/6, 5, -(8*x-65)/6, 10];
/*the next output line is seriously incorrect
More information about the Maxima