59.3.4 problem 8.1 (iv)

Internal problem ID [15003]
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.1 (iv)
Date solved : Thursday, October 02, 2025 at 09:58:23 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=-x^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 9
ode:=diff(x(t),t) = -x(t)^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {1}{t +c_1} \]
Mathematica. Time used: 0.071 (sec). Leaf size: 18
ode=D[x[t],t]==-x[t]^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{t-c_1}\\ x(t)&\to 0 \end{align*}
Sympy. Time used: 0.086 (sec). Leaf size: 7
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {1}{C_{1} + t} \]