63.5.30 problem 15(e)

Internal problem ID [13033]
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 : Monday, March 31, 2025 at 07:31:42 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: 0.217 (sec). Leaf size: 75
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 \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{K[1] \left (b K[1]^2+a\right )}dK[1]\&\right ][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: 6.383 (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 ] \]