# Another solution to a simple DE given by DSolve: not the one I expected

Consider a simple 2nd-order differential equation with a parameter $$a$$, which can be solved with DSolve:

soly=DSolve[y''[x] + a/y[x]^3 == 0, y[x], x, Assumptions -> a > 0]

(*{{y[x] -> -(Sqrt[-a + x^2 C[1]^2 + 2 x C[1]^2 C[2] + C[1]^2 C[2]^2]/Sqrt[C[1]])},
{y[x] -> Sqrt[-a + x^2 C[1]^2 + 2 x C[1]^2 C[2] + C[1]^2 C[2]^2]/Sqrt[C[1]]}}*)


I am interested in the one without the negative sign. It may be convenient to assign some simple values to the undetermined constants to observe the structure of the solution:

soly[[2, 1, 2]] /. {C[1] -> 1, C[2] -> 1}
(*Sqrt[1 - a + 2 x + x^2]*)


That seems okay, but if one tries y=a^1/4 * Sqrt[2 x], it also satisfies the equation.

y2[x] = a^(1/4)*Sqrt[2 x];
D[y2[x], {x, 2}]
(*-(a^(1/4)/(2 Sqrt[2] x^(3/2)))*)

a/y2[x]^3
(*a^(1/4)/(2 Sqrt[2] x^(3/2))*)


I am wondering how can I choose the different solutions, or if the solutions are basically equivalent to each other. In particular, the $$a^{1/4}$$ prefactor in the latter solution is very different (in the sense of structure) from the parameter $$a$$ under the square root in the DSolve solution. Can someone help me to understand the difference? Thank you very much!

• @MichaelE2 thank you! i have tried to make the problem more clearly, please see my update. Commented Mar 15, 2023 at 3:34
• Sorry about that. I had a typo in the code I tested. I get the same thing you do. Commented Mar 15, 2023 at 17:29
• @MichaelE2 hi, never mind, just hope someone can give a hint. Commented Mar 16, 2023 at 0:45
• I can give a hint (I just haven't figured out the exact answer): Your answer seems to be a limiting case. Something like let $c_2 = \phi(c_1)$, for an appropriate function $\phi$ and take the limit as $c_1\rightarrow\infty$ or probably as $c_1 \rightarrow 0$. Or maybe yours is a singular solution, but my first inclination is not. I just haven't had time to work on it. Commented Mar 16, 2023 at 2:45
• @MichaelE2 Specifically, replace C[2] -> Sqrt[a]/C[1], and take the limit as C[1] -> 0. Commented Mar 16, 2023 at 3:06

To elaborate on my earlier comments on the question, a first integral of the ODE can be obtained by

eq = y''[x] + a/y[x]^3;
s1 = Simplify[2 Integrate[eq y'[x], x]] == C[1]
(* -(a/y[x]^2) + y'[x]^2 == C[1] *)


DSolve applied to the equation then yields the two general solutions given in the question, plus two equivalent solutions. And, setting C[1] to zero yields

DSolve[s1 /. C[1] -> 0, y[x], x] /. C[1] -> C[2]
(* {{y[x] -> -Sqrt[2] Sqrt[-Sqrt[a] x + C[2]]},
{y[x] -> Sqrt[2] Sqrt[-Sqrt[a] x + C[2]]},
{y[x] -> -Sqrt[2] Sqrt[Sqrt[a] x + C[2]]},
{y[x] -> Sqrt[2] Sqrt[Sqrt[a] x + C[2]]}} *)


the last of which is an obvious generalization of the special solution given in the question. It follows that the special solution is related to the general solution by taking the limit C[1] -> 0.

Next, use Integrate again to obtain

MultiplySides[Last@Last@Solve[s1, y'[x]] /. Rule -> Equal,
y[x]/Sqrt[a + C[1] y[x]^2], Assumptions -> y[x] != 0]
(* (y[x] y'[x])/Sqrt[a + C[1] y[x]^2] == 1 *)
Integrate[Subtract @@ %, x] - C[2]
(* -x - C[2] + Sqrt[a + C[1] y[x]^2]/C[1] *)


which can be solved for y[x] to obtain the general solutions given above and in the question. Instead, expand this expression about C[1] = 0

Series[%, {C[1], 0, 0}] // Normal
(* -x + Sqrt[a]/C[1] - C[2] + y[x]^2/(2 Sqrt[a]) *)


and redefine C[2] (an arbitray constant) to explicitly eliminate Sqrt[a]/C[1], i.e., C[2] -> C[2] + Sqrt[a]/C[1].

Simplify[y[x] /. soly[[2]] /. C[2] -> C[2] + Sqrt[a]/C[1]]
(* Sqrt[C[1] (x + C[2]) (2 Sqrt[a] + C[1] (x + C[2]))]/Sqrt[C[1]] *)


where soly is defined in the question. Finally, taking the limit, C[1] -> 0, yields the desired outcome.

Series[%, {C[1], 0, 0}] // Normal
(* Sqrt[2] Sqrt[Sqrt[a] (x + C[2])] *)

• in your answer you have explained clearly why we should take the limit C[1] -> 0 by finding the general sol from an equivalent DE, which is obtained by Integrate once. Then, you used Solve to obtain y'[x] and Integrate once to find an implicit expression for y. Next, you expand the implicit expression at C[1]=0, as required. From here, we can find a value of C[2] to eliminate Sqrt[a]/C[1] at the leading order. But, there seems some errors in the next 2 steps ... Commented Mar 17, 2023 at 7:34
• @Enter What are those errors? Commented Mar 17, 2023 at 15:23
• should we use soly[[4]] in the 2nd code-line from the bottom? Commented Mar 17, 2023 at 16:25
• @Enter. Actually, neither one. I meant the soly` that you defined in your question. I have made a few changes to my answer to eliminate this ambiguity. Thanks for pointing it out. Commented Mar 17, 2023 at 17:23