Working on SAGE's integration capabilities

1 view
Skip to first unread message

Jack O'Connor

unread,
Nov 18, 2007, 4:07:36 AM11/18/07
to sage-newbie
I read this blog post from a fellow named Ondřej Čertík:

"The only little problem is that currently SAGE developers are all
mathematicians and as is well-known, mathematicians looks at
mathematic from a very different prospective than physicists. :) And
so I need calculus, advanced calculus and only when this is working,
and working well, I can build on it some more advanced features."

I just picked up SAGE this week looking for a free replacement for
Mathematica, because I get a lot of annoying integrals for physics
problem sets. If there's anything a mere undergraduate can do to
improve these features, please let me know by email.

David Joyner

unread,
Nov 18, 2007, 11:13:21 AM11/18/07
to sage-...@googlegroups.com
There was a tread on this recently in sage-devel:
http://groups.google.com/group/sage-devel/browse_thread/thread/9274a13df263dec7/55b51c21c436906f?lnk=gst&q=contributing#55b51c21c436906f
If this long link does not work, search for "contributing" in
http://groups.google.com/group/sage-devel

Thanks for asking and if you have comments, please post them.

++++++++++++++++++++++++++++++++++++++++

William Stein

unread,
Nov 18, 2007, 11:23:06 PM11/18/07
to sage-...@googlegroups.com
On Nov 18, 2007 1:07 AM, Jack O'Connor <oconn...@gmail.com> wrote:
> I just picked up SAGE this week looking for a free replacement for
> Mathematica, because I get a lot of annoying integrals for physics
> problem sets. If there's anything a mere undergraduate can do to
> improve these features, please let me know by email.

A substantial number of the sage developers are "mere undergraduates".
For example, almost all of the calculus functionality in Sage (sans the
Maxima engine under the hood) was written by Bobby Moretti who
is a "mere undergraduate", and much of the Sage Notebook was written
by Alex Clemesha and Tom Boothby who are both undergrads. DSage
(the distributed computation framework for sage) was also completely
written by an undergraduate (Yi Qiang). The graph theory database
in Sage and families of graph constructors (graph.[tab]) was also written
by an undergraduate (Emily Kirkman).

-- William

Ondrej Certik

unread,
Nov 19, 2007, 6:13:43 AM11/19/07
to sage-newbie
Hi Jack,

> problem sets. If there's anything a mere undergraduate can do to
> improve these features, please let me know by email.

On Nov 18, 5:13 pm, "David Joyner" <wdjoy...@gmail.com> wrote:
> There was a tread on this recently in sage-devel:http://groups.google.com/group/sage-devel/browse_thread/thread/9274a1...
> If this long link does not work, search for "contributing" inhttp://groups.google.com/group/sage-devel
>
> Thanks for asking and if you have comments, please post them.

See also this thread for improving calculus in SAGE:

http://groups.google.com/group/sage-devel/browse_thread/thread/2308561f175a0674

The best way how to get involved (imho) is to read the sources of the
maxima wrappers and try to improve them. Here are some ideas for
improvement:

1)

sage: var("y")
y
sage: (exp(x)+1).subs(x=0)
2
sage: (exp(x)+1).subs(x=y)
e^y + 1
sage: (exp(x)+1).subs(exp(x),y)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call
last)

/home/ondra/ext/sage-2.8.12-debian32-i686-Linux/<ipython console> in
<module>()

/home/ondra/ext/sage-2.8.12-debian32-i686-Linux/local/lib/python2.5/
site-packages/sage/calculus/calculus.py in subs(self, *args, **kwds)
2498
2499 def subs(self, *args, **kwds):
-> 2500 return self.substitute(*args, **kwds)
2501
2502 def _recursive_sub(self, kwds):

<type 'exceptions.TypeError'>: substitute() takes at most 2 arguments
(3 given)


The last line should work. There is of course a question of syntax (I
personally don't like the subs(x=y) syntax, because it's not general
enough to work for substituting anything else than symbols and also
it's unpythonic, so I prefer subs(x, y), but some SAGE developers
disagree with me on this).

2) integrals, that you mention. SAGE should be able to solve a lot of
them through maxima. To implement the rest (gaussian integrals, etc.),
my own idea is to improve sympy to do that (because I think this is
the way to do things in the long run), but to have something now, it
should probably be implemented by improving the maxima wrappers,
probably the method integral in:

devel/sage/sage/calculus/calculus.py:3524

Ondrej
Reply all
Reply to author
Forward
0 new messages