70.1.14 problem 2.4 (i)

Internal problem ID [14233]
Book : Nonlinear Ordinary Differential Equations by D.W.Jordna and P.Smith. 4th edition 1999. Oxford Univ. Press. NY
Section : Chapter 2. Plane autonomous systems and linearization. Problems page 79
Problem number : 2.4 (i)
Date solved : Monday, March 31, 2025 at 12:13:23 PM
CAS classification : [[_2nd_order, _missing_x], _Duffing, [_2nd_order, _reducible, _mu_x_y1]]

\begin{align*} x^{\prime \prime }+x-x^{3}&=0 \end{align*}

Maple. Time used: 0.017 (sec). Leaf size: 43
ode:=diff(diff(x(t),t),t)+x(t)-x(t)^3 = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x = c_2 \sqrt {2}\, \sqrt {\frac {1}{c_2^{2}+1}}\, \operatorname {JacobiSN}\left (\frac {\left (\sqrt {2}\, t +2 c_1 \right ) \sqrt {2}\, \sqrt {\frac {1}{c_2^{2}+1}}}{2}, c_2\right ) \]
Mathematica. Time used: 60.161 (sec). Leaf size: 171
ode=D[x[t],{t,2}]+x[t]-x[t]^3==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -\frac {i \text {sn}\left (\frac {\sqrt {\left (\sqrt {1-2 c_1}+1\right ) (t+c_2){}^2}}{\sqrt {2}}|\frac {1-\sqrt {1-2 c_1}}{\sqrt {1-2 c_1}+1}\right )}{\sqrt {\frac {1}{-1+\sqrt {1-2 c_1}}}} \\ x(t)\to \frac {i \text {sn}\left (\frac {\sqrt {\left (\sqrt {1-2 c_1}+1\right ) (t+c_2){}^2}}{\sqrt {2}}|\frac {1-\sqrt {1-2 c_1}}{\sqrt {1-2 c_1}+1}\right )}{\sqrt {\frac {1}{-1+\sqrt {1-2 c_1}}}} \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t)**3 + x(t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
Timed Out