I have updated the PDE-separation branch again, it is now in 'pde-separate-v2'.
In case you have sympy's sources already checked out: $ git remote add plaes git://github.com/plaes/sympy.git $ git checkout -b pde origin/pde-separate-v2 About API: I have two higher-level functions called: pde_separate_add and pde_separate_mul. Both functions return list with two separated expression on success, and None on failure. _add substitutes F(x, y) = X(x) + Y(y) into equation and _mul case does F(x, y) = X(x)*Y(y). The main variable separation algorithm is in the _separate() function. This algorithm is still WIP (so I added a failing testcase too, feel free to fix it :) ) Two examples from doctest: >>> from sympy import * >>> x, t = symbols('xt') >>> u, X, T = map(Function, 'uXT') >>> eq = Eq(Derivative(u(x, t), x), E**(u(x, t))*Derivative(u(x, t), t)) >>> pde_separate_add(eq, u(x, t), [X(x), T(t)]) [D(X(x), x)*exp(-X(x)), D(T(t), t)*exp(T(t))] >>> from sympy import * >>> x, y = symbols('xy') >>> u, X, Y = map(Function, 'uXY') >>> eq = Eq(Derivative(u(x, y), x, 2), Derivative(u(x, y), y, 2)) >>> pde_separate_mul(eq, u(x, y), [X(x), Y(y)]) [D(X(x), x, x)/X(x), D(Y(y), y, y)/Y(y)] So, what do you think about API? Also, because both _add and _mul functions are fairly similar, would it make sense to add also, pde_separate(strategy='mul | add') ?? Cheers, Priit :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---