Enhanced Laplace transforms and desolve for Maxima
Subject: Enhanced Laplace transforms and desolve for Maxima
From: Mark H Weaver
Date: Mon, 24 Jan 2011 13:18:36 -0500
Hi Barton, thanks for looking at my code.
Barton Willis <willisb at unk.edu> writes:
> In unit_step_mult_simp, your code replaces xreduce('max, ...) with
> code that duplicates the logic in max, I think. Is this a workaround
> for a limitation in max?
No, the new version is more powerful. First of all, the new
unit_step_mult_simp can do partial simplifications in cases where
minimum cannot be found. For example:
(%i3) unit_step_mult_simp(unit_step(x-1)*unit_step(x-2)*unit_step(y-1)*unit_step(y-2));
(%o3) unit_step(x-2)*unit_step(y-2)
where the old code will give up and do no simplification at all if
unable to find min(x,y). The new version also simplifies unit_step(x)^p
when p>0, where the old code does not.
However, my primary motivation is that the rule:
hstep(x)*hstep(y) = hstep(min(x,y))
is not valid if x=y. For example, hstep(x)^2 has value 1/4 at x=0.
Without this added logic, integrate(hstep(hstep(x))^2, x,-1,0) would
evaluate to 1/2 instead of 1/4.
> Do you have examples of integrands that do not involve hstep that your
> code can handle that the current code cannot?
No, but I haven't searched very hard.
> My preference would be to *delete* the function unit_step_mult_simp
> from abs_integrate.
Agreed. I will rewrite the new version in lisp, and make it part of the
new step function code I'm working on.
> You didn't explain if your proposed changes to abs_integrate were
> needed by the other patches.
No, they are not needed by the other patches. However, some people
prefer to work with hstep(x) instead of unit_step(x), and I would like
Maxima to be able to integrate piecewise functions defined in terms of
hstep(x).
> If you need just derivative divides integration for hstep, you can
> take care of that by giving hstep an integrate property.
I'm not sure what you mean by "derivative divides integration for
hstep". Do you mean cases where you can change the variable of
integration, e.g. u=hstep(x)? If so, this would almost never be useful.
hstep(x) is typically used the same way that unit_step(x) is: to define
piecewise functions as sums where each term is typically of the form
f(x)*hstep(x-a).
BTW, I agree with you that ultimately it would be better to support
piecewise functions defined in terms of MCOND (aka if-then-else) or
something like it. However, some people prefer to use step functions,
and would like to see expressions displayed in terms of hstep(x). I'd
like to support this mode of usage.
I intend to provide routines to convert piecewise functions written in
terms of step functions into MCOND form and vice versa, as well as
various simplifiers and manipulators.
Thanks,
Mark