36.1.14 problem 14

Internal problem ID [6269]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.2, Separable Equations. Exercises. page 46
Problem number : 14
Date solved : Sunday, March 30, 2025 at 10:47:52 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(x(t),t)-x(t)^3 = x(t); 
dsolve(ode,x(t), singsol=all);
 
\begin{align*} x &= \frac {1}{\sqrt {{\mathrm e}^{-2 t} c_1 -1}} \\ x &= -\frac {1}{\sqrt {{\mathrm e}^{-2 t} c_1 -1}} \\ \end{align*}
Mathematica. Time used: 60.065 (sec). Leaf size: 57
ode=D[x[t],t]-x[t]^3==x[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -\frac {i e^{t+c_1}}{\sqrt {-1+e^{2 (t+c_1)}}} \\ x(t)\to \frac {i e^{t+c_1}}{\sqrt {-1+e^{2 (t+c_1)}}} \\ \end{align*}
Sympy. Time used: 0.820 (sec). Leaf size: 36
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t)**3 - x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = - \sqrt {\frac {e^{2 t}}{C_{1} - e^{2 t}}}, \ x{\left (t \right )} = \sqrt {\frac {e^{2 t}}{C_{1} - e^{2 t}}}\right ] \]