57.5.30 problem 15(e)

Internal problem ID [14385]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 15(e)
Date solved : Thursday, October 02, 2025 at 09:36:02 AM
CAS classification : [_quadrature]

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