> It will be very easy to create a SAGE package.  All you do is create a 
> directory
> with sympy in it and a setup.py, just like you have already.  Then, if the
> directory is called sympy-0.4 you do
>     sage -pkg sympy-0.4
> from the directory that contains the sympy-0.4 directory.  This will result
> in a SAGE package sympy-0.4.spkg, which can be installed by typing
>     sage -i sympy-0.4.spkg
> Probably nothing else will be required.

I'll try it, thanks. But I meant some better interface, so that SAGE
could call SymPy as it currently calls Maxima. Which means to convert
the SAGE expression to SymPy, and back.

> I had in mind the following iterative approach:
>
>   (1) Implement the basic limit formulas for products, sums, quotients, etc.,
>         in Python.
>   (2) This reduces computing limits of symbolic expressions to computing
>         the limits of the leaves in the tree, i.e., symbolic
> variables, constants, and
>         primitive functions (like sinh, exp, log, erf).
>  (3)  Limits of symbolic variables and constants are trivial.
>  (4) For some special functions one writes an optional method _limit_
>        that computes the limit of that special function at a point from a 
> given
>        direction.  The default _limit_ method in the base class computes the
>        limit using maxima.  So for each function for which you want better
>        speed or a different behavior from maxima, you just fill in the
> _limit_ method.
>
> Exactly the steps above would also work for symbolic differentiation.
> (Integration is a completely different story.)

I don't think that would work for limits (it should work for
differentiation though) except some simple cases. As an example, let's
take this limit, that Maxima cannot do:

limit((5**x+3**x)**(1/x), x, infty)

(if you type this in SymPy, you will get 5, because we use the Gruntz
algorithm, as described here:
http://sympy.googlecode.com/svn/trunk/doc/gruntz.pdf). The only thing
that occurs to me how to fix maxima is to match the expression and
return 5 immediatelly, or implement the whole algorithm from scratch,
but then you will just write the same code as we did for SymPy.

Integration is quite easy - just match the expression and return a
table integral. The general Risch algorithm is difficult, but I think
Axiom can do it.

I also had another idea - wouldn't it be useful to be able to read
Mathematica/Maple's notebooks in SAGE? Of course not to implement an
interpreter for the Maple/Mathematica language, but just to convert
some simple things. I don't know if its worth the work, as I don't use
Maple/Mathematica, but many people do, and that could help them switch
to SAGE. Maybe some ideas/code can be taken from [1].

Ondrej


[1]  http://dkbza.org/pythonika.html

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to