I am working on and arbitrary constant type that would automatically
combine with other constants (such as 2*C1 => C1). Whenever I get
that in, we could see if it could be modified to do arbitrary
functions. For now, I would just do F1, F2 = map(Function, 'F1 F2')
as you said, just like arbitrary constants are now done as C1, C2 =
symbols('C1 C2').
Aaron Meurer
On Jul 9, 2009, at 1:57 PM, Priit Laes wrote:
>
> Ü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<[email protected]> 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]
>
>
> What would be the best way of naming/defining arbitrary functions?
> F1(), F2() and so on?
>
> And is it ok to just use F1, F2 = map(Function, 'F1 F2') ??
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---