# Spurious DSolve Solution

Bug introduced in 8.0.4 or earlier, persisting through 12.0.

DSolve quickly returns solutions to the following PDE (which is the homogeneous portion of the PDE in question 130755).

s = Flatten@DSolve[D[l[w1, w2], w1] a w2 - D[l[w1, w2], w2] a w1 - l[w1, w2] == 0,
l[w1, w2], {w1, w2}]
(* {l[w1, w2] -> E^(-(ArcTan[w1/Sqrt[w2^2]]/a)) C[1][1/2 (w1^2 + w2^2)],
l[w1, w2] -> E^(ArcTan[w1/Sqrt[w2^2]]/a) C[1][1/2 (w1^2 + w2^2)]} *)


However, an attempt to verify this result indicates that one of the two solutions is spurious.

FullSimplify[Unevaluated[D[l[w1, w2], w1] a w2 - D[l[w1, w2], w2] a w1 - l[w1, w2]] /. #] &
/@ s
(* {-((E^(-(ArcTan[w1/Sqrt[w2^2]]/a)) (w2 + Sqrt[w2^2]) C[1][1/2 (w1^2 + w2^2)])/w2),
(E^(ArcTan[w1/Sqrt[w2^2]]/a) (-w2 + Sqrt[w2^2]) C[1][1/2 (w1^2 + w2^2)])/w2} *)


The first term fails to vanish for w2 > 0, and the second term for w2 < 0. Executing SetOptions[Solve, Method -> Reduce] prior to DSolve in the hope of obtaining conditional answers produces the same result. Also, using the DSolve Assumptions option does not help. For instance,

sp = Flatten@DSolve[D[l[w1, w2], w1] a w2 - D[l[w1, w2], w2] a w1 - l[w1, w2] == 0,
l[w1, w2], {w1, w2}, Assumptions -> w2 > 0]
(* {l[w1, w2] -> E^(-(ArcTan[w1/w2]/a)) C[1][1/2 (w1^2 + w2^2)],
l[w1, w2] -> E^(ArcTan[w1/w2]/a) C[1][1/2 (w1^2 + w2^2)]} *)

FullSimplify[Unevaluated[D[l[w1, w2], w1] a w2 - D[l[w1, w2], w2] a w1 - l[w1, w2]] /. #] &
/@ sp
(* {-2 E^(-(ArcTan[w1/w2]/a)) C[1][1/2 (w1^2 + w2^2)], 0} *)


Once again, one solution is spurious. In fact, the correct solution is

l[w1, w2] -> E^(-(ArcTan[w1, w2]/a)) C[1][1/2 (w1^2 + w2^2)]];
FullSimplify[Unevaluated[D[l[w1, w2], w1] a w2 - D[l[w1, w2], w2] a w1 - l[w1, w2]] /. %
(* 0 *)


My questions are, (1) is this a bug (as it appears to be)?, and (2) does a work-around exist (apart from changing independent variables to obtain an ODE instead)?

• @xzczd Thanks for the update. It would not be the first time that a DSolve bug was "fixed" in this way! – bbgodfrey Dec 9 '20 at 15:39