DSolve gives no output

I have troubles finding a solution to a system of three coupled nonlinear ODEs. When I put it into Mathematica, I get back the input as an answer. Could anyone tell me what I'm doing wrong?

Here is the code

DSolve[{D[f[x], x] == I*Sqrt[2]*g[x],
D[g[x], x] == 2*Sqrt[2]*g[x]*h[x],
D[h[x], x] == I*(Sqrt[2]/2)*f[x]*h[x]/g[x]}, {f, g, h}, x]


Thank you for any help

P.S: I know that the closed form solution exists, I'm just trying to find it myself using Mathematica. The solution should be $f(x)=-A\cos x$, $g(x)=-\frac{1}{\sqrt{2}}iA\sin x$, $h(x)=\frac{1}{2\sqrt{2}}\cot x$, where $A$ is a const.

I can check that this is a true solution by direct inspection, but I want to know how to get it to start with.

• duplicate question? mathematica.stackexchange.com/questions/50758/… Sep 29 '15 at 7:40
• @m00nlight I don't think it's a duplicate since the question you linked is not about the coupled ODEs. There were questions similar to mine asked here (I checked) but none of them got the answer I'm afraid, apart form suggestions that there are no solutions in closed form Sep 29 '15 at 7:51
• @GregVoit If you know that it exists, may be you know something about these solutions and, thus, can help Mma somehow? Such as, say, by transforming your equations using your knowledge. Think about it. Sep 29 '15 at 8:32
• @AlexeiBoulbitch I already tried everything I could I'm afraid, before posting a question here. That's why I'd be grateful for any specific hints - everything I thought I could try I already tried Sep 29 '15 at 8:42
• Another solution is: h(x)=0, g(x)=C[1], f(x)= I*Sqrt(2)*C[1]*x+C[2]. Sep 29 '15 at 17:40

If you know that it exists, may be you know something about these solutions and, thus, can help Mma somehow? Such as, say, by transforming your equations using your knowledge.

You may operate as follows: you may introduce

G[x]=Log[g[x]]; H[x]=Log[h[x]]

then

G'=2Sqrt[2]*Exp[H]

H'=I*f*Exp[-G]/Sqrt[2]

and

f'=I*Sqrt[2]*Exp[G]

From here you easily get

H''=-1-2Sqrt[2]*H'*Exp[H]

Let us do all this using Mma. These are the equations:

eq1 = g'[x] == 2*Sqrt[2]*h[x]*g[x];
eq2 = h'[x] == (I*f[x]*h[x])/(Sqrt[2]*g[x]);
eq3 = f'[x] == I*Sqrt[2]*g[x];


Now, let us transform them as follows:

eq1A = eq1 /. {g -> (Exp[G[#]] &), h -> (Exp[H[#]] &)} //
Simplify[#, G[x] != 0] &
eq2A = eq2 /. {g -> (Exp[G[#]] &), h -> (Exp[H[#]] &)} //
Simplify[#, {G[x] != 0, H[x] != 0}] &
eq3A = eq3 /. {g -> (Exp[G[#]] &), h -> (Exp[H[#]] &)} //
Simplify[#, {G[x] != 0, H[x] != 0}] &


which gives

(*
2 Sqrt[2] E^H[x] == Derivative[1][G][x]

-I Sqrt[2] f[x] + 2 E^G[x] Derivative[1][H][x] == 0

Derivative[1][f][x] == I Sqrt[2] E^G[x]
*)


Then let us get the derivative of the both parts of eq2A:

eq2B = Map[D[#, x] &, eq2A]

(*  -I Sqrt[2] Derivative[1][f][x] +
2 E^G[x] Derivative[1][G][x] Derivative[1][H][x] +
2 E^G[x] (H^\[Prime]\[Prime])[x] == 0  *)


Now let us eliminate from this system f' and G':

Eliminate[{eq3A, eq2B, eq1A}, {f'[x], G'[x]}] //
Simplify[#, {G[x] != 0, H[x] != 0}] &


I show the result as a picture, to see it better:

Now one can solve it:

     eq1 = H''[x] == -1 - 2 Sqrt[2]*H'[x]*Exp[H[x]]
sol = DSolve[eq1, H[x], x]


returning

(* {{H[x] ->
1/2 (-x^2 - 2 x C[1] -
2 Log[2 Sqrt[
2] (-C[2] +
E^(C[1]^2/2) Sqrt[\[Pi]/2] Erf[(x + C[1])/Sqrt[2]])])}}  *)


To get h[x] you return to the definition:

 Exp[H[x]] /. sol // FullSimplify

(*  {E^(-(1/2) x (x + 2 C[1]))/(
Sqrt[2] (-2 C[2] +
E^(C[1]^2/2) Sqrt[2 \[Pi]] Erf[(x + C[1])/Sqrt[2]]))}  *)


And, finally, let us solve it numerically and build a plot out of the solution with arbitrarily chosen initial conditions:

 sol2 = NDSolve[{H''[x] == -1 - 2 Sqrt[2]*H'[x]*Exp[H[x]], H[0] == 3,
H'[0] == 1}, H, {x, 0, 3}];
Plot[Log[H[x]] /. sol2, {x, 0, 3}]


giving

Have fun!

• thank you, I think I can proceed from here now Sep 29 '15 at 12:30