How to define a New Maxima Function



On Feb 19, 2008 6:12 AM, Alexander Ray <riccio at gmx.at> wrote:

> just in order to understand the logic: what happens in the following naive
> example?
>
> integrate(unit_step(x-a), x, 0, 1) should give us:
> min(1, max(1-a, 0))

I dunno. What happens?

> which would mean:
> diff(integrate(unit_step(x-a), x, 0, 1), a) should give us:
> -a, if a in ]0,1[
> and 0 if a is elsewhere except {0,1}.
>
> do we achieve this within the rules approach?

I wouldn't expect it; I don't think diff knows what to do with min and max,
and the integrate rule I posted knows only about products like
f(x)*unit_step(h(x)) and not unit_step by itself (since a rule is associated
with the so-called main operator, which is different in those 2 cases).

In summary I think it's fair to say additional rules are needed.
Maybe one way to go about this is to enumerate, in non-Maxima
form, the rules which are desired. Then we can figure out how
to implement those in Maxima.

best

Robert Dodier