On Aug 21, 2008, at 8:52 PM, Jason Merrill wrote:
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.
I'd recommend that the inputs be four lists. The first is the differential equations, the second are the boundary/initial conditionsand the third are the dependent variables, and the fourth the independent
variables. That way, the conditions are cleanly separated from the equations which may be useful in the solution process. Cheers, Tim.
smime.p7s
Description: S/MIME cryptographic signature