Hey!

While trying to implement method of characteristics, I ran into a
following problem:

I get (choose) following system of characteristic equations as a
solution for PDE [ D(u(x, t), t) + a*D(u(x, t), x) == 0 ]:

dx/ds = a ; dt/ds = 1 ; dz/ds = 0

Now, after solving these equations I have a system of three equations,
from where I have to eliminate the parameter s:
x(s) = a*z+C1 ; t(s) = s + C2 ; z(s) = C3
C1, C2, C3 are arbitrary constants...

And finally present the solution as z(x, t) = ...

How can I achieve this using only sympy? :P


PS. In case you want to see WIP code, you can pull from my 'pde-wip'
branch from git://github.com/plaes/sympy.git


Helper script that demonstrates this problem:
#!/usr/bin/python
from sympy import *
from sympy.solvers.solvers import *
from sympy import Derivative as D
t, x,y,z = symbols('txyz')
a = Symbol('a', Real=True)
f, u = map(Function, 'fu')
# Transport Eq...
eq = Eq(D(u(x, t), t) + a*D(u(x, t), x))
#eq = Eq(t*D(u(x, t), t) + x*D(u(x, t), x), u(x, t))
pprint(eq)
print pdesolve(eq, u(x, t))



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to