Hi,
I am using Maple 11 and trying to solve numerically the following easy system of 1st order, linear PDEs:
> PDE := [diff(u(x, t), t) = v(x, t), diff(v(x, t), x) = u(x, t)];
[ d d ]
[--- u(x, t) = v(x, t), --- v(x, t) = u(x, t) ]
[ dt dx ]
> IBC := {u(x, 0) = exp(-x), v(0, t) = exp(t)}:
Indeed, when I try to solve it I get:
> pds := pdsolve(PDE, IBC, [u, v], numeric, time = t, range = -1 .. 0);
Error, (in pdsolve/numeric/match_PDEs_BCs) cannot handle systems with multiple PDE describing the time dependence of the same dependent variable, or having no time dependence
My final aim is to solve a more complicated system of PDEs, however I cannot surely go much further if I cannot even solve this one...
Any suggestions?
Thanks a lot for your attention,
Claude
Numerical PDE's
I don't think your system is the type that the numerical PDE solver can handle. One independent variable must be a "time" variable, and it must be possible to interpret the system as describing the evolution of the dependent variables in time. I'm not sure what the precise technical requirements are, but e.g. you have one equation that has no derivative wrt t and another that has no derivative wrt x.
The analytic solution works though
> pdsolve(PDE);
/ / t \
{ v(x, t) = _C1 exp(_c[1] x) _C2 exp|-----|,
\ \_c[1]/
/ t \\
u(x, t) = _C1 _c[1] exp(_c[1] x) _C2 exp|-----| }
\_c[1]//
From this solution I just plugged in the initial and boundary conditions that correspond to _C1=1 and _C2=1:
> IBC := {u(x, 0) = exp(x), v(0, t) = exp(t)}:
However Maple gives the error that I mentioned before. Yes, I guess this is not the standard PDEs that Maple expect as for the second equation there is no time evolution. . Unfortunately the problem that I have to solve (relativistic nonlinear optics) has a similar structure and gives the same error.
change of variables
If an analytic solution for the actual system of equations is not available, may be, for a relativistic problem, that a change to advanced and retarded variables may help. Eg:
with(PDETools,dchange): tr:={x=(U+V)/2,t=(U-V)/2}; PDE1:=dchange(tr,PDE);in your toy system gives you equations where you may take U or V as a "time" variable for the numeric routine.
PS: Actually this toy system is a single equation: diff(u(x, t), t,x) = u(x, t).
pdsolve
Actually that's not the same initial condition as you used before (u(x,0) = exp(x) instead of exp(-x)).
Note that the symbolic version of pdsolve doesn't find the most general solution, just some families of solutions that come from various methods (e.g. separation of variables).
Laplace transform is another method that can be used for this type of linear PDE.
A few more comments
Thanks to everybody for the comments.
What I am using as a "toy" system is just the simplest form of the equations that I came to from my original system.
As jacubi suggests, to overcome the problem I could simply change variables to make the system a "time evolving" one that maple will like. However, it is a rather complicated way of solving a problem that would require a very simple numerical discretization.
The current system that I have to solve is written in a moving frame where it is possible to apply the SVEA (slowly varying moving approximation) condition of nonlinear optics.
To answer to Robert's comment, you are quite right I changed the initial condition to "the right one" (u(x) = exp(x)) however the problem still remains.
Series approach
Another method for this PDE system would be power series. Assuming analyticity in a neighbourhood of the origin, we can write
and then the second PDE says
so that if m = min(i,j),
(that should say a[i,j] = a[i-m,j-m]*(i+j-2*m)!/i!/j! )
Summing over the diagonals
where
and thus