80.8.17 problem 23

Internal problem ID [21374]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 8. Qualitative analysis of 2 by 2 systems and nonlinear second order equations. Excercise 8.5 at page 184
Problem number : 23
Date solved : Thursday, October 02, 2025 at 07:29:59 PM
CAS classification : [[_2nd_order, _missing_x], [_2nd_order, _reducible, _mu_x_y1]]

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

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ x^{\prime }\left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.589 (sec). Leaf size: 86
ode:=diff(diff(x(t),t),t) = x(t)-x(t)^3; 
ic:=[x(0) = 0, D(x)(0) = 1]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = \frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1-i \sqrt {2}\, \textit {\_Z} \right ) \sqrt {2}\, \sqrt {4+2 i \sqrt {2}\, \operatorname {RootOf}\left (\textit {\_Z}^{2}+1-i \sqrt {2}\, \textit {\_Z} \right )}\, \operatorname {JacobiSN}\left (\frac {i t \sqrt {4+2 i \sqrt {2}\, \operatorname {RootOf}\left (\textit {\_Z}^{2}+1-i \sqrt {2}\, \textit {\_Z} \right )}}{2}, \operatorname {RootOf}\left (\textit {\_Z}^{2}+1-i \sqrt {2}\, \textit {\_Z} \right )\right )}{2} \]
Mathematica. Time used: 10.122 (sec). Leaf size: 48
ode=D[x[t],{t,2}]==x[t]-x[t]^3; 
ic={x[0]==0,Derivative[1][x][0] ==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -i \sqrt {\sqrt {3}-1} \text {sn}\left (i \sqrt {\frac {1}{2} \left (1+\sqrt {3}\right )} t|-2+\sqrt {3}\right ) \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 = {x(0): 0, Subs(Derivative(x(t), t), t, 0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
Timed Out