Thank you for your extensive reply Waldek. I have a few comments and
questions below.

On 2 July 2014 20:53, Waldek Hebisch <[email protected]> wrote:
> Bill Page wrote:
>>
>> This returns 0 in FriCAS but of course it not defined at x=0.  Other
>> systems, for example Maple, define
>>
>>   signum(x) == abs(x)/x
>>
>> and
>>
>>   signum(1,x) == D(signum(x),x)
>>
>> then
>>
>>   D(signum(1,x),x) = signum(1,x)
>>
>> with signum(1,x) begin a function that is 0 everywhere except undefined at 0.
>>
>> What would be required to support derivatives like this (and other
>> related functions such as Dirac delta and Heaviside step function)?
>> Is there something like this already hidden somewhere in FriCAS?
>
> If you mean support for derivatives of "jumpy" functions,

Yes.  I have been doing a bit of research.

http://en.wikipedia.org/wiki/Generalized_function

and in particular

http://en.wikisource.org/wiki/Algebra_of_generalized_functions_%28Shirokov%29

> this is reasonable easy.  Namely, we need to add 'signum'
> and 'diracDelta' to standard operators and define new
> functions (this is very much like current definition of 'abs').
> Then we need to define derivatives:
>
>   D(abs(x), x) = signum(x)
>   D(signum(x), x) = diracDelta(x)

I suppose that it should be

   D(signum(x), x) = 2*diracDelta(x)

>
> and derivatives of 'diracDelta' would remain in symbolic
> form.
>
> Such definitions are sound and cause no special
> trouble.   However, with such definitions we would
> have 'D(abs(x)/x) = (signum(x)*x - abs(x))/x^2)'.
> Adding relation 'signum(x) = abs(x)/x' from the formula
> above we would get 0.  Using this result we would then
> get diracDelta(x) = D(signum(x), x) = D(abs(x)/x) = 0.
>
> We could try to define:
>
>   D(abs(x), x) = signum(x) + x*diracDelta(x)
>
> Then the calculation above would return expected result.
> Analytically 'x*diracDelta(x)' is zero.  So it is acceptable
> definition.  OTOH it is troubling that we must add such
> terms to get wanted results.  Also, it is not clear how
> this would work for other formulas.
>

Certainly we want

   integrate(x*diracDelta(x),x)=0

It would be interesting to see how far we can go with this.

http://axiom-wiki.newsynthesis.org/SandBoxSignum

> Core problem is that multiplication of distributions is
> a partial, non-associative function.  So it is impossible
> to put distributions inside a ring.  Since our expression
> manipulation works inside a ring this is serious problem.

Apparently it is possible to define generalized functions in such a
way that multiplication is associative but then certain products are
not commutative.  See paper by Shirokov I referred to above.

 E.g.

diracDelta(x)*signum(x) + signum(x)*diracDelta(x) = 0

and other interesting consequences like

  diracDeltat(x)*diracDelta(x) = 0

and

  signum(x)*signum(x) = 1

Perhaps lack of commutativity is a lesser evil than non-associativity?

In Shirokov's approach derivatives are also more complicated, c.f.
equation (40).

For example I tried the following

  diff(f,x) == D(f,x) +
(limit(f,x=0,"right")-limit(f,x=0,"left"))::EXPR(INT)*diracDelta(x)

but of course this is limited to distributions with singular support
at 0.  I am not sure how to generalize this.

> What can be done is building bigger ring, such that
> distributions may be considered image of subset of this
> ring by appropriate equvalence relation.

Is this related to so called: Colombeau algebra?

> To be more
> concrete, AFAICS other system for algebraic computations
> treat 'diracDelta(x)' as a transcendetal element, that
> is treat it as a new variable.  This completely ignores
> relation 'x*diracDelta(x) = 0'.  Only expressions linear
> in 'diracDelta' may be considered as distributions and
> to equality as distributions we need the relation
> 'x*diracDelta(x) = 0'.
>
> Anyway, hacky partial support for 'diracDelta' is easy
> to add.  But to make it realy useful without producing
> contradictory results is more tricky.  Note that
> 'without contradictory results' means that we allow
> things which are nonsense from point of view of theory
> of distributions, as long as this nonsense does not
> lead to contradiction.  For example integrator should
> handle linear combinations of 'diracDelta', but
> reject nonlinear expressions.  Relations like
> 'abs(x) = signum(x)*x' are likely to cause trouble.
>

Maybe Shirokov's approach provides a way.

BTW, my initial description of signum in Maple was wrong. It turns out
that Maple does not define

signum(x) = abs(x)/x

rather we have

diff(abs(x),x) = signum(x)

and

diff(Heaviside(x),x) = Dirac(x)

while derivatives of both signum and Dirac remain symbolic.  Maple's
implementation seems to be quite conservative. It is quite weak but
does not lead to obvious contradictions.  For example

  Dirac(x)*Dirac(x)

is not simplified to 0, etc.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to