# First order differential equation with two conditions

I want to produce all possible solutions for this equation:

Clear["Global*"]

eqn = {(y'[x]/y[x])^2 + 1/y[x]^2 - b/y[x]^4 - f/3 == 0};

DSolve[eqn, y[x], x]


I know the solution are:

   y[x] = Sqrt[3/(2 f)] Sqrt[1 - Cosh[2 x/Sqrt[3/f]] +
Sqrt[f/Subscript[f, 0]] Sinh[2 x/Sqrt[3/f]]]   When f > Subscript[f, 0]

y[x] = Sqrt[3/Subscript[f, 0]] Sqrt[1 + Exp[2 x/Sqrt[3/Subscript[f, 0]]]]   When
f= Subscript[f, 0] , y > Subscript[y, 0]

y[x] = Sqrt[3/Subscript[f, 0]] Sqrt[1 - Exp[-2 x/Sqrt[3/Subscript[f, 0]]]]   When f = Subscript[f, 0], y < Subscript[y, 0]

y[x] = Sqrt[3/(2 f)] Sqrt[1 + Sqrt[1 - (f/Subscript[f, 0])^2] Cosh[2 x/Sqrt[3/f]]]
When 0 < f < Subscript[f, 0] for y large

y[x] = Sqrt[3/(2 f)] Sqrt[1 - Cosh[2 x/Sqrt[3/f]] + Sqrt[f/Subscript[f, 0]]Sinh[2 x/Sqrt[3/f]]]   When 0 < f < Subscript[f, 0] for y small

Where Sqrt[3/Subscript[f, 0]] = Sqrt[2] Subscript[y, 0] = 2 Sqrt[b]; all f, y and b are positive

• And your question is??? Nov 13, 2023 at 14:48
• How to get those solution in mathematica!! because the solution on mathematica are different!!! Nov 13, 2023 at 14:53
• Please provide the definitions of Subscript[f, 0] and Subscript[y, 0] Nov 13, 2023 at 14:58
• Sqrt[3/Subscript[f, 0]] = Sqrt[2] Subscript[y, 0] = 2 Sqrt[b] all f, y and b are positive Nov 13, 2023 at 17:39

## 1 Answer

To long for a comment!

You might check your expected solutions directly. Examplary for the first one

eqn /. y ->
Function[x,
Sqrt[3/(2 f)] Sqrt[
1 - Cosh[2 x/Sqrt[3/f]] +
Sqrt[f/Subscript[f, 0]] Sinh[2 x/Sqrt[3/f]]] ] //
Simplify[#, f > Subscript[f, 0]] &


Result {(f (-3 + 4 b Subscript[f, 0]))/((-1 +Cosh[(2 x)/(Sqrt[3] Sqrt[1/f])] -Sinh[(2 x)/(Sqrt[3] Sqrt[1/f])] Sqrt[f/Subscript[f,0]]) Subscript[f, 0]) == 0} isn't True .

Your proposed solution doesn't solve eqn`!