59.3.12 problem 8.8

Internal problem ID [15011]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 8, Separable equations. Exercises page 72
Problem number : 8.8
Date solved : Thursday, October 02, 2025 at 09:58:37 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=-x \left (k^{2}+x^{2}\right ) \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=x_{0} \\ \end{align*}
Maple
ode:=diff(x(t),t) = -x(t)*(k^2+x(t)^2); 
ic:=[x(0) = x__0]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.605 (sec). Leaf size: 62
ode=D[x[t],t]==-x[t]*(k^2+x[t]^2); 
ic={x[0]==x0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\frac {k}{\sqrt {e^{2 k^2 t} \left (\frac {k^2}{\text {x0}^2}+1\right )-1}}\\ x(t)&\to \frac {k}{\sqrt {e^{2 k^2 t} \left (\frac {k^2}{\text {x0}^2}+1\right )-1}} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
k = symbols("k") 
x = Function("x") 
ode = Eq((k**2 + x(t)**2)*x(t) + Derivative(x(t), t),0) 
ics = {x(0): x__0} 
dsolve(ode,func=x(t),ics=ics)
 
NotImplementedError : Initial conditions produced too many solutions for constants