65.2.5 problem 7.1 (v)

Internal problem ID [13639]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 7, Scalar autonomous ODEs. Exercises page 56
Problem number : 7.1 (v)
Date solved : Wednesday, March 05, 2025 at 10:06:02 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.166 (sec). Leaf size: 47
ode:=diff(x(t),t) = x(t)^2-x(t)^4; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = {\mathrm e}^{\operatorname {RootOf}\left (\ln \left ({\mathrm e}^{\textit {\_Z}}-2\right ) {\mathrm e}^{\textit {\_Z}}+2 c_{1} {\mathrm e}^{\textit {\_Z}}-\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}+2 t \,{\mathrm e}^{\textit {\_Z}}-\ln \left ({\mathrm e}^{\textit {\_Z}}-2\right )-2 c_{1} +\textit {\_Z} -2 t +2\right )}-1 \]
Mathematica. Time used: 0.206 (sec). Leaf size: 53
ode=D[x[t],t]==x[t]^2-x[t]^4; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) K[1]^2 (K[1]+1)}dK[1]\&\right ][-t+c_1] \\ x(t)\to -1 \\ x(t)\to 0 \\ x(t)\to 1 \\ \end{align*}
Sympy. Time used: 0.260 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)**4 - x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ t + \frac {\log {\left (x{\left (t \right )} - 1 \right )}}{2} - \frac {\log {\left (x{\left (t \right )} + 1 \right )}}{2} + \frac {1}{x{\left (t \right )}} = C_{1} \]