# how to solve second order nonlinear coupled differential equations using NDSolve with hyperbolic function

i have to solve some solitons scattering through this coupled equations. i need to get two different graph, but still the graph did not come out. and also the equations quite complicated containing hyperbolic trigo . (maybe just for me). i dont know whether the problems come from the hyperbolic equations that i used, or becoz of initial condition.the coding as below:

u = 0.05;
g = 0.2;
s = NDSolve[{x''[t] == 4/(\[Pi]^2 x[t]^3) - 10/(\[Pi]^2 x[t]^2) - (80 g)/(3
\[Pi]^2 x[t]^3) - ((6 u)/(\[Pi]^2 x[t]^2))[1/Cosh[y[t]/x[t]]^2 - (2
y[t])/x[t] Sinh[y[t]/x[t]]/Cosh[y[t]/x[t]]^3],
y''[t] == u (y[t]/(x[t]^3))[Sinh[y[t]/x[t]]/Cosh[y[t]/x[t]]^3],
x == -3, x' == 0, y == 1, y' == 3}, {x, y}, {t, 0,100}]
Plot[Evaluate[{x[t], y[t]} /. %], {t, 0, 100}, PlotRange -> All, PlotPoints -> 200]

• There's a bigger problem at the moment NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.. You should review your equations. – Sektor Jun 18 '14 at 10:47
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Oct 16 '14 at 14:54

First, your code contains simple mistake, you should distinguish [] from (), then your equations still can't be solved, it's a common problem for the boundary value problem (BVP) of nonlinear ODE(s), and the almost only solution as far as I know is "shooting method":

u = 5/100;
g = 2/10;
s = NDSolve[{x''[t] == 4/(π^2 x[t]^3) - 10/(π^2 x[t]^2) -
(80 g)/(3 π^2 x[t]^3) - ((6 u)/(π^2 x[t]^2))(1/Cosh[y[t]/x[t]]^2 -
(2 y[t])/x[t] Sinh[y[t]/x[t]]/Cosh[y[t]/x[t]]^3),
y''[t] == u (y[t]/(x[t]^3))(Sinh[y[t]/x[t]]/Cosh[y[t]/x[t]]^3),
x == -3, x' == 0, y == 1, y' == 3}, {x, y}, {t, 0, 100},
Method -> {"Shooting", "StartingInitialConditions" ->
{x == -3, x' == 0, y == 1, y' == 3}}]

Plot[{x[t], y[t]} /. s, {t, 0, 100}, PlotRange -> All, Evaluated -> True] • at first, the initial condition used were x == -3, x' == 0, y == 1, y' == 3 then why at the shooting command, we must change t value to 0 for both x and x'? "Shooting", "StartingInitialConditions" -> {x == -3, x' == 0, y == 1, y' == 3} – ameera Jun 23 '14 at 4:31
• @ameera "StartingInitialConditions" is just a guess, here I just choose it casually. For your equations there're many available "StartingInitialConditions", for example {x == -1, x' == -1, y == 0, y' == 0}, but it's also worth to mention that it can be really hard to choose proper initial conditions for some equations, for example this one. – xzczd Jun 25 '14 at 3:03