I am happy that I have a solution to a particular differential equation by hand:
eq = 2 * D[psi[x], {x,1}]^2 == (psi[x]^2 + f0^2)*(2(1-f0^2) - psi[x]^2) + (2*ju^2/f0^2)
We can write this as
eq = 2 * D[psi[x], {x,1}]^2 == (an^2 + psi[x]^2)(bn^2 - psi[x]^2)
where
an = Sqrt[- ( 1 - (3/2) f0^2) + Sqrt[(1 - (f0^2)/2)^2 + 2 ju^2/f0^2] ];
bn = Sqrt[+ ( 1 - (3/2) f0^2) + Sqrt[(1 - (f0^2)/2)^2 + 2 ju^2/f0^2] ];
mn = (bn^2) / (an^2 + bn^2);
m1n = 1 - mn //FullSimplify;
solpsi[x_] = Sqrt[an^2 * mn] * JacobiSD[x*Sqrt[(an^2 + bn^2)/2], mn ];
This solution can be verified:
JEFrules = {JacobiCD[x_,mn_] -> Sqrt[1 - (1-mn)*JacobiSD[x, mn]^2]
,JacobiND[x_,mn_] -> Sqrt[1 + mn*JacobiSD[x, mn]^2] }
lhs = 2 * D[solpsi[x], {x,1}]^2/.JEFrules;
rhs = (an^2 + solpsi[x]^2)(bn^2 -solpsi[x]^2);
lhs - rhs //Simplify
with output equal to zero as expected.
If I now pretend that I don't know the solution, I can't obtain this solution solpsi
using DSolve
. How can I solve my original differential equation, without needing to do the subsequent hand manipulations with MMA? Do I need to use something other than DSolve?
For ease: my attempt to solve directly using either
eq = 2 * D[psi[x], {x,1}]^2 == (psi[x]^2 + f0^2)*(2(1-f0^2) - psi[x]^2) + (2*ju^2/f0^2);
sol = DSolve[{eq, psi[0] == 0}, psi[x], x]
or
eq = 2 * D[psi[x], {x,1}]^2 == (an^2 + psi[x]^2)(bn^2 - psi[x]^2)
sol = DSolve[{eq, psi[0] == 0}, psi[x], x]
both provide very weird solutions, which certainly aren't as pleasant as the above solpsi
; I'm not even sure they are equivalent when they clearly should be!
A final example, with output included:
eq = Sqrt[2]*D[psi[x], {x,1}] == Sqrt[(an^2 + psi[x]^2)(bn^2 - psi[x]^2)]
sol = DSolve[{eq, psi[0] == 0}, psi[x], x]
Output:
{{psi[x] -> InverseFunction[(I*EllipticF[I*ArcSinh[Sqrt[2]*Sqrt[f0/(-2*f0 + 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2])]*#1], -((-2*f0 + 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2])/(2*f0 - 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2]))]*Sqrt[1 - (2*f0*#1^2)/(2*f0 - 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2])]*Sqrt[1 + (2*f0*#1^2)/(-2*f0 + 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2])])/(Sqrt[2]*Sqrt[f0/(-2*f0 + 3*f0^3 + Sqrt[4*f0^2 - 4*f0^4 + f0^6 + 8*ju^2])]*Sqrt[-2*f0^4 + (2*ju^2)/f0^2 + f0^2*(2 - 3*#1^2) - #1^2*(-2 + #1^2)]) & ][x/Sqrt[2]]}}
Clearly not solpsi
!
Any advice appreciated.
psi
/Psi
consistently? ;-) $\endgroup$bn JacobiSN[(an x)/Sqrt[2], -(bn^2/an^2)]
, which is certainly simple. I didn't check equivalence though. $\endgroup$an
orbn
expressions right? $\endgroup$eq = 2*D[psi[x], {x, 1}]^2 == (an^2 + psi[x]^2) (bn^2 - psi[x]^2); sol = DSolve[{eq, psi[0] == 0}, psi, x]
-- it was one of the codes you posted, but with the spelling fix. $\endgroup$