Hi Maurizio,

On Tue, 14 Apr 2009 14:35:37 -0700 (PDT)
Maurizio <maurizio.gran...@gmail.com> wrote:

> 
> Hi all.
> 
> I'm willing to invest some of my time to understand if I can be able
> to do a step ahead with symbolic functions.

Great to hear that.

> How are special symbolic functions supposed to be defined?

They will be defined based on the SFunction class in
sage/symbolics/function.pyx. There is no real documentation in that
file, just some examples to test if the wrapper is working as intended.

There is some more documentation in the GiNaC tutorial here:

http://www.ginac.de/tutorial/Symbolic-functions.html

You can do (almost) all that you see in the tutorial, without using any
C++. I say almost, because I still did not set up an equivalent
of .hold(). That should come soon given the current interest in pynac.

Mike Hansen is working on switching Sage's symbolics over to pynac
completely. We talked about changing the design of SFunction on IRC, he
might have some code for you to build on. 

Even if you start now, rebasing your code to the new design should be
trivial. You'll just have to put the various functions you define in a
class, which subclasses SFunction.

> I am
> willing to experiment with delta of dirac function. This has some
> special properties (see
> http://en.wikipedia.org/wiki/Dirac_delta_function ), some of them are
> really useful but I don't know how to define them in a CAS like
> maxima or SAGE.
> 
> I'm aware that it is already present in maxima, even though I don't
> think it is recognized by SAGE. I am wondering whether a viable
> approach could be to add to calculus.py a section similar to the one
> of Function_gamma, so that SAGE simply interfaces to maxima. I don't
> know if this is useful or not.

With more and more people getting interested in the switch, I think it
has a real chance of happening very soon. I refrained from saying this
before, but at this moment, I don't think it's wise to invest more time
in the old symbolics code.

> Otherwise, I would be interested in knowing if this could be done with
> the new symbolic package. Burcin proved to be very helpful in showing
> me a simple way to define delta function by means of its values and he
> assigned it as being the derivative of heaviside function (defined in
> a sort of piecewise function):
> 
> sage: heaviside(x).diff(x)
> dirac(x)
> 
> is there a way to implement the other properties? I am willing to know
> if is there any documentation about that, because I am not able to
> find that!

For reference, the code I sent Maurizio with an example containing
heaviside and dirac functions is here:

http://sage.math.washington.edu/home/burcin/pynac/dirac.py

Implementing heaviside is #2452 on trac.

> I am willing to learn something about pynac, but please feel free to
> discourage me if you think it is too far away from being ready. Is
> there any integration or derivation capability ready? Is it possible
> to start testing it using maxima's integration capabilities? (I don't
> think so...)

Derivation is easy, and it's already done by pynac. We will be using
maxima for integration for a while now, though I plan to start
submitting native integration (and summation) code to Sage once the
switch is complete.


For people interested in helping out, a few words about integration is
in order. As we discussed on this list before, many problems in
integration can be handled with heuristics before calling more advanced
algorithms. The heuristics also give more user friendly answers in most
cases.

Integration code in Sage should run through some preprocessing before
calling anything else, be it maxima, or a native implementation of the
Risch algorithm.

There are some links to descriptions of heuristics used by maxima and maple at 
this page:

http://wiki.sagemath.org/symbolics

Pattern matching and rewriting capabilities of the new symbolics will
be very useful for this. Anybody interested in improving the
integration capabilities of Sage can help, no high level mathematical
knowledge is necessary.

> I was browsing the todo page
> ( http://wiki.sagemath.org/symbolics/pynac_todo ) but it seems that
> many action items went away... are they already accomplished?

The items in the todo list didn't go away, they were copied to the
"done" section, with a link to the trac ticket containing the changes. 

There are two pynac packages waiting for review on trac. Since they
both contain substantial changes, it would be good if somebody other
than the developer took them for a ride. :)

I only know two people who tried to use pynac for anything real until
now, Alex Raichev and Nick Alexander. Their comments have been really
helpful and motivating.

> (what
> about the TODO showed in http://wiki.sagemath.org/symbolics ?)


This is a more long term todo list, both to remember what still needs
to be done and for reference if anybody is interested in helping out.
Most tasks on this list are highly nontrivial, and need substantial
work to be complete.

Feel free to edit the list and add items you think are important. For
example, you can add z-transforms and laplace transforms as we
discussed before.


Problems related to special functions used to be classified under the
component calculus on trac. I am not sure if I should add special
functions stuff to that page, or start a new one. We have quite a few
special functions related bugs on trac. There was also some effort to
get Sage on the list of software in the DLMF, but the wiki page for
this seems to be deleted. (mabshoff?)

> I have to say I find the actual SAGE documentation seems pretty hard
> to browse, but could be my fault. Yesterday I lost half an hour
> looking for a "numerical solve" or something like that, before finding
> the "find_roots" function. Today, I spent half an hour looking for
> "differential equation solve" with no success. I am sure I could do
> some DE solution in the past (something with maxima, something with
> SymPy, I think, all through SAGE), but I think that I found the way to
> do it pretty easily browsing the old reference manual...

sage: deso<tab>
desolve          desolve_laplace  desolve_system   desolvers

Especially "desolvers?" seems helpful.

> Thanks a lot

Thank you.


Cheers,
Burcin

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to