# Incorrect result of DSolve

Let us dsolve that Cauchy problem with 12.3 on Windows 10 Pro:

ClearAll[w, z]; sol = DSolve[{w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w == -1}, w[z], z]


{{w[z] -> 1/12 (-2 ProductLog[-((1 - Sqrt) E^(2 + Sqrt - 3 z))] - ProductLog[-((1 - Sqrt) E^(2 + Sqrt - 3 z))]^2)}, {w[ z] -> 1/12 (-2 ProductLog[(-1 + Sqrt) E^( 2 + Sqrt - 3 z)] - ProductLog[(-1 + Sqrt) E^(2 + Sqrt - 3 z)]^2)}}

and a warning "Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information". Both results are not correct as

Plot[w[z] /. sol[], {z, 1, 2}]
Plot[w[z] /. sol[], {z, 1, 2}] show: w'[-1]==-1/2-Sqrt[13/4], making use of {w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w == -1}, is negative, whereas we see a positive slope at x==1 in the plots. What is the reason of that incorrect result and how to fix it?

• I have got the result w'[-1] -> -1 - 1/2 ProductLog[(-1 + Sqrt) E^(5 + Sqrt)]. Nevertheless, from the first glance, it is not clear what reason brought you to the conclusion that the result w'[-1]==-1/2-Sqrt[13/4] is wrong? Explain please. Jun 15, 2021 at 8:17
• @AlexeiBoulbitch: 1. Which version of Mathemaica do you use? 2. The results of DSolve[{w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w == -1}, w[z], z] are wrong since their plots have a positive slop at x==1. Jun 15, 2021 at 10:07
• @AlexeiBoulbitch: : I make use of {w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w == -1} to obtain w'[-1]==-1/2-Sqrt[13/4]. Jun 15, 2021 at 10:19
• This question is the top of the iceberg. It originates from DSolve[w'[z]^2+w'[z]+3*w[z]==0,w,z] Jun 15, 2021 at 12:39
• Certainly a bug that should be reported to Wolfram, Inc. Jun 15, 2021 at 17:40

Too long for a comment--not an answer.

Note that clearing w, doesn't clear w'[z].

DSolve does appear to be giving an invalid solution here. Perhaps, it is picking an incorrect branch.

sol = DSolve[{w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w == -1}, w[z],
z]


Gives identical solutions: -(1/12) ProductLog[(-1 + Sqrt) E^(2 + Sqrt -3 z)] (2 + ProductLog[(-1 + Sqrt) E^(2 + Sqrt - 3 z)]

solutions = Simplify[w[z] /. sol]


Check ODE

Simplify[D[solutions[], z] - (-1/2 - Sqrt[1/4 - 3*solutions[]]),
Assumptions -> z \[Element] Reals] (*not zero*)


I think this qualifies as a bug and should be reported.

• CraigCarter (@ does not work.) :Thank you. You could split it in two comments. Jun 15, 2021 at 11:55