I thought I would take my first shot at contributing to Sage by making desolve return a SymbolicExpression instead of a string. Doing so turned out to be pretty easy, but I got hung up trying to get the other methods in desolvers.py to do the same. Anyway, after getting my hands in this code a little bit, I think it needs big changes--so much so that incremental improvements don't seem so worthwhile.
In particular, I don't like that desolve_laplace is a different function from desolve is a different function from desolve_system, and I don't like the rather cryptic way of specifying boundary conditions. I guess Mathematica is the leader on solving differential equations symbolically, and pending other great ideas, I think their syntax is worth copying. Here's an example of the DSolve syntax in Mathematica: DSolve[{y''[x] + x^2 y[x] == 0 , y[0] == 0, y'[0] == 1}, y, x] The arguments are a list of equations, the dependent variable, which can also be a list if there is more than one dependant variable, and finally the independent variable (or variables for PDEs). What I really like about this is that boundary conditions are specified as equations, and not as a list of symbols separated from their meaning. I also like that there is only one function and one syntax, regardless of what order the equation is, or whether 0 or more boundary values are given, and whether the boundary values specify a Boundary Value Problem or an Initial Value Problem. This would make more work for Sage behind the scenes, since it has to pick the equation apart and figure out what routine to send it off to based on what kind of boundary values are given, and what the order of the equation is, etc. But the point of a CAS is to do the algebra so I don't have to! I mostly hope to provoke discussion about syntax, rather than implementation, but I'll mention that one (of several) stumbling blocks to implementing the above is that it's not easy in Sage to ask of a differential equation: "What order are you." This is in the same vein as W5 at http://wiki.sagemath.org/symbench, and I hope it will get easier soon with some more pattern matching type abilities. Regards, JM --~--~---------~--~----~------------~-------~--~----~ 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://www.sagemath.org -~----------~----~----~----~------~----~------~--~---