> > > 1) Expose as much Maxima functionality as possible (one example is
> > > substitution of other things besides symbols).
>
> We've definitely laid the foundations for that step very very well.

Yes, nice work.

> > > 2) It's important to allow users to create their own functions and the
> > > calculus package should be able to work with them. Maybe it will by
> > > possible to hack the Maxima interface even more to allow this somehow.
> >
> > Yep, that sounds good to me.
>
> Actually, what exactly do you mean by "users to create their own functions"?
> Could you give a concrete example of what you mean by this?

Yes, let's discuss some particular examples:

1)  so let's say I want to extend the current default SAGE calculus
with the Order symbol. In the soon to be released SAGE, you will be
able to do:

sage: e = sin(x)
sage: taylor(e, x, 0, 6)
x - x^3/6 + x^5/120


sage: import sympy
sage: e = sympy.sin(x)
sage: e.series(x, 6)
x - 1/6*x**3 + (1/120)*x**5 + O(x**6)
sage: sympy.O(x**4)-sympy.O(x**3)
O(x**3)
sage: f = sympy.cos(x**2)
sage: print f.series(x, 2)
sage: print e.series(x, 6) * f.series(x, 2)
sage: print (e.series(x, 6) * f.series(x, 2)).expand()
1 + O(x**2)
(1 + O(x**2))*(x - 1/6*x**3 + (1/120)*x**5 + O(x**6))
x + O(x**3)


This works in SymPy, but I would like this to be working in SAGE by
default. How could I do that?

2) let's say I want to define my super new function like this:

class my_function(SingleValuedFunction):
    nofargs = 1

    def fdiff(self, argindex = 1):
        return cos(self[0])

    @classmethod
    def canonize(cls, arg):
        arg = sympify(arg)
        if arg == 0:
            return sympify(0)


and then I want to call

my_function.series(x, 6)

and it will return the same series as for sin, because you notice that
my_function is a disguised sin (the same derivative, the same function
value at x=0).

Then let's say I would like to know the limit

limit(my_function(x) / x, x=0)

and it should just work. This is possible in SymPy (ok, technically
right now, it's a little more complex in SymPy, but we are going to
simplify it), but how could I do this
with the maxima interface?

After talking at SD6, maybe it could be possible to do it by creating
some maxima code behind the scene, so that maxima is able to calculate
with my new function.

>
> > > However, I think that in the long run, the main engine of calculus
> > > should be in Python + Cython (maybe also in C/C++), not in LISP.
> > > Because that will allow SAGE to extend it with new features and make
> > > it play nicely with the rest of SAGE.
>
> Personally I would prefer Python + Cython more than C/C++ just for
> ease of reading.

Yes, me too, Cython is awesome. If together with Cython, we could
speed SymPy up to the speed of Maxima, that's the way to go.
If not, we would have to thing harder.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
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