Overdetermined systems of differential equations can have any solutions only if they satisfy certain compatibility conditions, therefore in general one shouldn't expect that any solutions necessarily exist. For differential equations of the first order one can impose initial conditions in the form of values of unknown functions (at certain points for ODEs) but on the other hand for certain initial conditions there are no solutions and this is the case we encounter here.
However we can solve the equation without any initial conditions:
DSolve[{g x - v[x]^2 - x v[x] v'[x] == 0}, v[x], x]
{{v[x] -> -(Sqrt[ 2 g x^3 + 3 C[1]]/(Sqrt[3] x))},
{v[x] -> Sqrt[ 2 g x^3 + 3 C[1]]/(Sqrt[3] x)}}
We can see two families of symbolic solutions which immediately show why we cannot impose the condition for x == 0
, e.g. v[0] == 0
, nonetheless we can impose e.g. v[1] == c
, and now treating c
and g
as variables determining different solutions we'll take a closer look:
dsol[c_, g_] = v[x] /. DSolve[{g x - v[x]^2 - x v[x] v'[x] == 0, v[1] == c}, v[x], x]
{ -(Sqrt[ 3 c^2 - 2 g + 2 g x^3]/(Sqrt[3] x)),
Sqrt[ 3 c^2 - 2 g + 2 g x^3]/(Sqrt[3] x)}
plotting them by choosing various arguments of c
and g
, e.g.
GraphicsColumn[
Plot[ #, {x, -4, 4}, Evaluated -> True, PlotStyle -> Thick, ImageSize -> 600,
AspectRatio -> Automatic, PlotLegends -> "Expressions",
PlotRange -> {{-4, 4}, {-4, 4}}] & /@ {
Table[ dsol[1, g], {g, {-2, 0, 2}}],
Table[ dsol[c, -1/2], {c, {-2, 0, 2}}] }]
We can see that some solutions can be continued in the complex plane after reaching appropriate values e.g. Sqrt[ 13 - x^3]/( Sqrt[3] x)
becomes complex when x
exceeds 13^(1/3)
.