Ühel kenal päeval, K, 2009-07-08 kell 19:04, kirjutas David Joyner: > On Wed, Jul 8, 2009 at 4:31 PM, Priit Laes<plaes...@gmail.com> wrote: > > > > Hey, > > > > For the past week I have been trying to figure out how to implement > > solver for most basic types of PDEs and now it is finally time to show > > something: > > > > In [1]: from sympy import * > > In [2]: from sympy.solvers.solvers import * > > In [3]: from sympy import Derivative as D > > In [4]: t,x,y,z = symbols('txyz') > > In [5]: a = Symbol('a', Real=True) > > In [6]: u = Function('u') > > In [7]: eq = Eq(D(u(x, t), t) + a*D(u(x, t), x)) > > In [8]: eq > > Out[8]: > > d d > > a⋅──(u(x, t)) + ──(u(x, t)) = 0 > > dx dt > > In [9]: pdesolve(eq, u(x, t)) > > Out[9]: [x - a⋅t] > > > I don't understand this notation. Does [x-at] mean f(x-at) for some > differentiable function f? Yes. I couldn't figure out a better way to express it... And [...] is a list ;)
In future we might use dictionary for results (or maybe there's even better way...): { 'u(x, t)': [result1, result2], 'fun(y, z)': [result1]} Of course, I am open to all kind of improvements. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---