[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-26 Thread Ondrej Certik
On Tue, Aug 26, 2008 at 9:53 AM, William Stein <[EMAIL PROTECTED]> wrote: > > On Tue, Aug 26, 2008 at 12:47 AM, mabshoff <[EMAIL PROTECTED]> wrote: >> >> On Aug 26, 12:34 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >>> > Well, Sage developers like Python, Cython and C while Maxima

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-26 Thread William Stein
On Tue, Aug 26, 2008 at 12:47 AM, mabshoff <[EMAIL PROTECTED]> wrote: > > On Aug 26, 12:34 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > > Hi, > >> > Well, Sage developers like Python, Cython and C while Maxima >> > developers like lisp (at least for the low level stuff) - so we are >> > having

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-26 Thread mabshoff
On Aug 26, 12:34 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: Hi, > > Well, Sage developers like Python, Cython and C while Maxima > > developers like lisp (at least for the low level stuff) - so we are > > having self selecting groups here. It is the best tool for the job, > > but also the de

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-26 Thread Ondrej Certik
> Well, Sage developers like Python, Cython and C while Maxima > developers like lisp (at least for the low level stuff) - so we are > having self selecting groups here. It is the best tool for the job, > but also the devil you know, so I don't see big changes here in the > future. Let me say tha

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread mabshoff
On Aug 25, 11:50 pm, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: Hi, > >>> I think it's just about getting people to fix it. There are many > >>> people around who can fix Python/Cython and a little less (I guess) > >>> who can fix C++ and C. But a lot less who can fix lisp. > > > As I mentioned

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Ondrej Certik
>>> I think it's just about getting people to fix it. There are many >>> people around who can fix Python/Cython and a little less (I guess) >>> who can fix C++ and C. But a lot less who can fix lisp. > > As I mentioned before, another big > problem is that lisp doesn't manipulate native Python ob

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 7:42 PM, William Stein <[EMAIL PROTECTED]> wrote: > On Mon, Aug 25, 2008 at 3:08 PM, David Philp <[EMAIL PROTECTED]> wrote: >> On 26/08/2008, at 2:50 AM, William Stein wrote: >> > Burcin -- I did actually mostly implement pattern matching in Pynac. >> >> Is there documentat

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread David Philp
On 26/08/2008, at 2:12 PM, William Stein wrote: >> I actually don't understand this. For both pynac and the existing >> maxima link, I think you must already have some method of >> transforming >> a python object to and from lisp-like expressions. > > Pynac works with objects that are simply

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 8:55 PM, David Philp <[EMAIL PROTECTED]> wrote: > On 26/08/2008, at 12:42 PM, William Stein wrote: > >> 1) Let me clarify -- I *wrapped* the pattern matching already in >> Pynac. > ... >> and you >> can read about Ginac at the Ginac website: http://www.ginac.de/ > > Thanks

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread David Philp
On 26/08/2008, at 12:42 PM, William Stein wrote: > 1) Let me clarify -- I *wrapped* the pattern matching already in > Pynac. ... > and you > can read about Ginac at the Ginac website: http://www.ginac.de/ Thanks for the clarification. Sorry I missed the post about pynac--- I'm fairly quick

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Robert Dodier
Jason Merrill wrote: > pbe = r^2 p''[r] + 2 r p'[r] == r^2 k^2 Sinh[p[r]] > diffEqOrder[eqn_, y_, x_] := > Max[Cases[pbe, Derivative[o_][y][x] -> o, Infinity]] > firstOrderForm[eqn_, y_, x_] := > Module[{rep, order = diffEqOrder[eqn, y, x]}, > rep = Solve[ > eqn /. {Derivative[o_][y][x]

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
> I'm afraid I'm straying off topic, but I thought I'd use the above > code as a jumping off point to say a few more things about pattern Given the topic which is "Mathematica pattern matching", this email is 100% on topic, and I *definitely* appreciate it! > matching and Mathematica, since ther

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 3:43 PM, David Philp <[EMAIL PROTECTED]> wrote: > > > On 26/08/2008, at 8:15 AM, Ondrej Certik wrote: > >>> Is "not extending of Maxima" a concrete policy? I understand that >>> maxima >>> sucks in some circumstances, but it seems quite the beast here. >>> I am quite confu

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 3:08 PM, David Philp <[EMAIL PROTECTED]> wrote: > On 26/08/2008, at 2:50 AM, William Stein wrote: > > Burcin -- I did actually mostly implement pattern matching in Pynac. > > Is there documentation? A bit of google turned up nothing. (1) Let me clarify -- I *wrapped* the

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Jason Merrill
On Aug 24, 6:55 pm, Jason Merrill <[EMAIL PROTECTED]> wrote: > In hopes that it may be a useful reference during the current work on > symbolics, I wrote a toy Mathematica program for transforming a single > higher order ODE into a system of first order ODEs.  Most of the free > numerical differen

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Jason Merrill
On Aug 25, 12:50 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Mon, Aug 25, 2008 at 4:47 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote: > > > On Sun, 24 Aug 2008 15:55:25 -0700 (PDT) > > Jason Merrill <[EMAIL PROTECTED]> wrote: > > >> In hopes that it may be a useful reference during the curre

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread David Philp
On 26/08/2008, at 8:15 AM, Ondrej Certik wrote: >> Is "not extending of Maxima" a concrete policy? I understand that >> maxima >> sucks in some circumstances, but it seems quite the beast here. >> I am quite confused about a lot of the pattern matching >> discussion. AFAICT, >> that is the

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Ondrej Certik
> Is "not extending of Maxima" a concrete policy? I understand that maxima > sucks in some circumstances, but it seems quite the beast here. > I am quite confused about a lot of the pattern matching discussion. AFAICT, > that is the problem for which lisp rocks, and the best way to do it is I t

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread David Philp
On 26/08/2008, at 2:50 AM, William Stein wrote: > Burcin -- I did actually mostly implement pattern matching in Pynac. Is there documentation? A bit of google turned up nothing. >sage: sin(1+sin(x)).subs(sin(w0)==cos(w0)) >cos(cos(x) + 1) In Mathematica, the result wou

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Ondrej Certik
> >sage: from sage.symbolic.function import function >sage: var('r,kappa', ns=1) >(r, kappa) >sage: psi = function('psi', 1)(r); psi >psi(r) >sage: g = 1/r^2*(2*r*psi.diff(r,1) + r^2*psi.diff(r,2)); g >(2*psi(1,r)*r + psi(2,r)*r^2)*r^(-2) >

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 5:56 AM, Jason Merrill <[EMAIL PROTECTED]> wrote: > > On Aug 25, 7:46 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: >> On Mon, Aug 25, 2008 at 12:55 AM, Jason Merrill <[EMAIL PROTECTED]> wrote: >> >> > In hopes that it may be a useful reference during the current work on >

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread William Stein
On Mon, Aug 25, 2008 at 4:47 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote: > > On Sun, 24 Aug 2008 15:55:25 -0700 (PDT) > Jason Merrill <[EMAIL PROTECTED]> wrote: > >> >> In hopes that it may be a useful reference during the current work on >> symbolics, I wrote a toy Mathematica program for transf

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Ondrej Certik
>> Thanks for doing this. It is indeed very useful, I always wondered how >> things like this are done in Mathematica. >> >> Any ideas how this could be nicely translated to Python? >> >> Ondrej > > I thought you were going to tell me that sympy already does this. I > believe I saw an example som

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Jason Merrill
On Aug 25, 7:46 am, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > On Mon, Aug 25, 2008 at 12:55 AM, Jason Merrill <[EMAIL PROTECTED]> wrote: > > > In hopes that it may be a useful reference during the current work on > > symbolics, I wrote a toy Mathematica program for transforming a single > > hig

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Burcin Erocal
On Sun, 24 Aug 2008 15:55:25 -0700 (PDT) Jason Merrill <[EMAIL PROTECTED]> wrote: > > In hopes that it may be a useful reference during the current work on > symbolics, I wrote a toy Mathematica program for transforming a single > higher order ODE into a system of first order ODEs. Most of the

[sage-devel] Re: Manipulating diff. eqs. in Mathematica using pattern matching

2008-08-25 Thread Ondrej Certik
On Mon, Aug 25, 2008 at 12:55 AM, Jason Merrill <[EMAIL PROTECTED]> wrote: > > In hopes that it may be a useful reference during the current work on > symbolics, I wrote a toy Mathematica program for transforming a single > higher order ODE into a system of first order ODEs. Most of the free > nu