3
$\begingroup$

I'm trying to solve this differential equation (depending on the K0 parameter):

F[z_] := Sinh[z];
DSolve[{Q''[t] + Sinh[Q[t]] == 0, Q'[0] == 0, Q[0] == Exp[K0 I Pi]}, Q, t];

with no positive results...

DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.

Now, if I remove the initial conditions, everything works fine, and I get the double result

{{Q -> Function[{t}, -2 I JacobiAmplitude[1/2 Sqrt[-(-2 + C[1]) (t + C[2])^2],
                                          -(4/(-2 + C[1]))]]},
 {Q -> Function[{t}, 2 I JacobiAmplitude[1/2 Sqrt[-(-2 + C[1]) (t + C[2])^2],
                                         -(4/(-2 + C[1]))]]}}

How can I proceed in order to get the two coefficient C[1], C[2] determined with the two initial conditions

Q'[0] == 0, Q[0] == Exp[K0 I Pi]

I tried with Solve and Reduce:

Q[t_] = Q[t] /. First @ EY
Out[507]: -2 I JacobiAmplitude[1/2 Sqrt[-(-2 + C[1]) (t + C[2])^2], -(4/(-2 + C[1]))]
Reduce[Q[0] == E^(I K0 Pi), C[1]]
   Reduce::nsmet: This system cannot be solved with the methods available to Reduce.
Out[508]:Reduce[-2 I JacobiAmplitude[1/2 Sqrt[-(-2 + C[1]) C[2]^2], -(4/(-2 + C[1]))] ==
                E^(I K0 Pi), C[1]]

but they're not working as well... Any ideas?

$\endgroup$
2
  • 1
    $\begingroup$ What F[z] has to do with anything here? $\endgroup$
    – zhk
    Sep 9, 2017 at 11:44
  • $\begingroup$ Is I the sqrt(-1)? $\endgroup$
    – Diogo
    Sep 9, 2017 at 22:01

3 Answers 3

3
$\begingroup$

Once again, Mathematica is not very good at handling elliptic integrals and elliptic functions.

Here is the solution sought, starting from Mathematica's generic solution given in the OP, and helping Mathematica a fair bit in inverting what it couldn't invert:

qfun[t_, K0_] := 2 I JacobiAmplitude[I Sinh[Exp[I K0 π]/2]
                                     (t - EllipticK[-Sinh[Exp[I K0 π]/2]^2]),
                                     -Csch[Exp[I K0 π]/2]^2]

This corresponds to setting C[2] -> -EllipticK[(2 - C[1])/4] and C[1] -> 2 Cosh[Exp[I K0 π]] in the generic solution.

Plot it:

{Plot3D[Re[qfun[t, K0]], {t, 0, 10}, {K0, 0, 2}, AxesLabel -> {"t", "K0", "Re(Q)"}], 
 Plot3D[Im[qfun[t, K0]], {t, 0, 10}, {K0, 0, 2}, AxesLabel -> {"t", "K0", "Im(Q)"}]}
 // GraphicsRow

real and imaginary parts of solution

$\endgroup$
4
  • 1
    $\begingroup$ Was Mathematica any help figuring that out, or did you do the inversion by hand? $\endgroup$ Sep 11, 2017 at 7:53
  • 1
    $\begingroup$ The tricks were mine, but the algebra was Mathematica's since I don't like writing those out by hand. $\endgroup$ Sep 11, 2017 at 8:04
  • 1
    $\begingroup$ Disorder at WRI gets bigger, they haven't included WeierstrassP to MathematicalFunctionData[], neither to EntityList["MathematicalFunction"], Entity["MathematicalFunction", "WeierstrassP"] doesn't work either, though e.g Entity["MathematicalFunction", "JacobiSN"] does. This is the state of art in version 11.1. I don't know if in 11.2 it is the same. $\endgroup$
    – Artes
    Sep 11, 2017 at 8:34
  • 2
    $\begingroup$ @Artes, sounds like that ought to be reported to support. On the brighter side, they finally split up the invariants and half-periods in 11.2, based on my testing of the cloud version. $\endgroup$ Sep 11, 2017 at 8:41
1
$\begingroup$

I realise this isn't really what you're asking for, but a numerical answer is as close as I've been able to get so far. I'm not convinced there is a closed-form solution for all the non-integer initial conditions Exp[K0 I Pi] (which might explain DSolve's failure). But I'm not convinced there isn't, either.

You could get a numerical solution by building K0 into Q explicitly. That is, make Q = Q[t, K0], and using NDSolveValue (because, as you've discovered, DSolve doesn't seem to be able to do non-integer values of K0).

qfun = NDSolveValue[{D[Q[t, K0], {t, 2}] + Sinh[Q[t, K0]] == 0, 
  (D[Q[t, K0], t] /. t -> 0) == 0, Q[0, K0] == Exp[K0 I Pi]}, 
  Q, {t, 0, 10}, {K0, 0, 2}]

which gives you an InterpolatingFunction in t and K0.

Plotting the real part:

Plot3D[Re[qfun[t, K0]], {t, 0, 10}, {K0, 0, 2}, AxesLabel -> {"t", "K0", "Q"}]

enter image description here

$\endgroup$
3
  • $\begingroup$ Do you think that is not possible to get an analytic solution, only a numerical one? Because I found the plot of the trajectories here on Wolfram (with initial conditions the same as mine) so I guess that there should be some way... Thank you anyway for the help! $\endgroup$ Sep 10, 2017 at 12:43
  • $\begingroup$ Also because the lines of the differential equation solution are slightly different from the one I found online. $\endgroup$ Sep 10, 2017 at 12:45
  • 1
    $\begingroup$ I would guess the trajectories you found on Wolfram are numerical, though I couldn't swear to it. Complex initial conditions seemed to go absolutely nowhere, analytically, whichever way I tried. Initial conditions +- 1 were no problem. I'm still not completely convinced it's impossible to build an analytic solution, but if it is possible, I think Mathematica will need a lot of help to get there. $\endgroup$ Sep 10, 2017 at 13:14
1
$\begingroup$

Another option of numerical solution is to make a module and call it for each t and k

f[t0_?NumericQ,k_?NumericQ]:=Module[{sol,t,Q},
   sol=Q/.First@NDSolve[{Q''[t]+Sinh[Q[t]]==0,
                    Q'[0]==0,Q[0]==Exp[k I Pi]},Q,{t,t0,t0+.1}];
   sol[t0]
];

Plot3D[Re[Evaluate[f[t, k]]], {t, 0, 10}, {k, 0, 2}, 
                AxesLabel -> {"t", "K0", "Q"}]

Mathematica graphics

I tried series solution by Maple, but for some reason, the solution it gives does not match the above, no time to find out why. But here it is any way:

restart;
Order:=6:
sol:=dsolve({diff(q(t),t$2) + sinh(q(t)) = 0, 
       D(q)(0)=0, q(0) = exp(k*I*Pi)}, q(t),'series'):

sol:=convert(sol,polynom):
f:=unapply(rhs(sol),t,k);

Mathematica graphics

plot3d(Re(f(t,k)),t=0..10,k=0..2);

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ I think Mathematica's solution is wrong... perhaps Maple provides the right one, but I cannot say why... $\endgroup$ Sep 11, 2017 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.