Perhaps this is somehow related to the post: Numerical solution to PDE seems to contradict initial values
but still it may be useful.
Consider this code (I am using Mathematica 10.4):
sol := NDSolve[{
D[e[x, t], x] == I u[x, t],
D[u[x, t], t] == -u[x, t] + I e[x, t] + I s[x, t],
D[s[x, t], t] == I u[x, t],
s[x, 0] == 0, u[x, 0] == 0, e[0, t] == 1
}, {e, u, s}, {x, 0, 1}, {t, 0, 1}] // Flatten
psol[x_, t_] = u[x, t] /. sol;
ssol[x_, t_] = s[x, t] /. sol;
esol[x_, t_] = e[x, t] /. sol;
Plot[Abs[psol[x, 0]], {x, 0, 1}]
Plot[Abs[ssol[t, 1]], {t, 0, 1}]
Plot[Abs[esol[t, 1]], {t, 0, 1}]
If you only rename the variables, e.g. replace u[x, t] by p[x, t], the result of the execution changes.
u
top
and found what you describe. But if I renameu
toz
(which maintains the lexicographical order of the variables), the result is not changed. $\endgroup$ – Jens Sep 2 '16 at 17:32s
alphabetically. $\endgroup$ – Szabolcs Sep 2 '16 at 17:34Simplify
; this is a know issue documented here and in this (duplicate) question. The problem is that I do not have a reliable way to detect this and warn about it. Once I come up with something it will be implemented. $\endgroup$ – user21 Sep 2 '16 at 17:54