11
$\begingroup$

Bug introduced in 3.0 or earlier and persisting through 12.0.


I encountered this when trying to solve this problem with DSolve:

eqn = With[{p = p[x, y, t]}, D[p, t] == x D[p, x] + (1 - y) D[p, y] + 2 p]; 
DSolve[eqn, p, {t, x, y}]

DSolve::deqx: Supplied equations are not differential equations of the given functions.

(* Input returned *)

It's not surprising to see DSolve fails in solving PDEs… but why this warning? Even more shocking:

DSolve[eqn, p, {x, y, t}]
{{p -> Function[{x, y, t}, C[1][x (-1 + y), t + Log[x]]/x^2]}}

The result changed just because I reordered the independent variables (from {t, x, y} to {x, y, t}). Is this a bug?

$\endgroup$
19
  • $\begingroup$ Very odd indeed; on mathematica 10 the first request is returned unevaluated. $\endgroup$
    – chris
    Jul 22 '14 at 7:29
  • 2
    $\begingroup$ With Mathematica 5.2 I get exactly the same result (screenshot) as with versions 8.0.4 and 10.4 (OS Windows 7 x64). So the bug seems to be quite old... $\endgroup$ Apr 17 '16 at 15:52
  • 1
    $\begingroup$ @AlexeyPopkov The bug has already been introduced in v3: i.stack.imgur.com/Zx2uD.png Version 2.1 isn't influenced, because DSolve can't seem to solve PDE at that time: i.stack.imgur.com/V1Se1.png $\endgroup$
    – xzczd
    Dec 12 '19 at 4:34
  • 1
    $\begingroup$ Yes, the order matter but as you noticed, it is not all the time. There are cases where order does not matter. That is why I try to keep same order all the time. Please see why-dsolve-gives-different-answer-depending-on-order-of-variables-ux-t-vs where I said at the top and ordering the variables the same elsewhere $\endgroup$
    – Nasser
    Mar 19 '20 at 5:03
  • 1
    $\begingroup$ There was also a bug in NDSolve posted recently where the order made mattered mathematica.stackexchange.com/questions/215945/… $\endgroup$
    – Nasser
    Mar 19 '20 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.