Numerically solving differential equations of the form
{x''[t] == f[x[t], x'[t]], x[0] == x0, x'[tm] == 0}
where tm
is large, typically is quite difficult, if the linearization of f[x[tm], 0] about the solution of f[x[tm], 0] == 0
is a x[tm]
with a > 0
; i. e., if the solution coincides with the separatrix of the ODE at large tm
. This is because even infinitesimal numerical errors grow exponentially there.
Section 2.2 of the Handbook of Exact Solutions for Ordinary Differential Equations uses the transformation x'[t] == w[x]
to reduce the order of the ODE by one,
w'[x] w[x] == f[x, w[x]]
Then, true to its name, the book solves several particular cases of f
analytically. I wish to know whether solving this equation numerically for autonomous second-order ODEs without analytical solutions and then inverting the transform would be easier than numerically solving the original ODE.
As a test case, consider the equation
eq = x''[t] == x[t] (1 - x[t]^2) + x'[t] + x'[t]^2
which is compact but nonetheless nonlinear in both x[t]
and x'[t]
. The separatrix lies at x == 0
. It can, in fact, be solved directly by
tm = 10; 1/2 (1 - Sqrt[5]);
NDSolve[{eq, x[0] == 1/2, x'[tm] == c x[tm]}, x, {t, 0, tm},
Method -> {"Shooting", "StartingInitialConditions" -> {x[0] == 1/2,
x'[0] == -30724/100000}}, WorkingPrecision -> 30];
Plot[x[t] /. %, {t, 0, tm}, PlotRange -> All, AxesLabel -> {x, w}]
but only with an excellent initial guess. Even then, increasing tm
much beyond ten causes NDSolve
to fail.
My question, then, is, can this ODE be solved numerically by means of the transformation above with larger tm
and without an excellent initial guess.