80.2.3 problem 4

Internal problem ID [21146]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 2. Theory of first order differential equations. Excercise 2.6 at page 37
Problem number : 4
Date solved : Thursday, October 02, 2025 at 07:10:15 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} x \left (t_{0} \right )&=a \\ \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 18
ode:=diff(x(t),t) = x(t)^2; 
ic:=[x(t__0) = a]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = -\frac {a}{-1+\left (t -t_{0} \right ) a} \]
Mathematica. Time used: 0.066 (sec). Leaf size: 18
ode=D[x[t],t]==x[t]^2; 
ic={x[t0]==a}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {a}{a (\text {t0}-t)+1} \end{align*}
Sympy. Time used: 0.088 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
a = symbols("a") 
t0 = symbols("t0") 
x = Function("x") 
ode = Eq(-x(t)**2 + Derivative(x(t), t),0) 
ics = {x(t0): a} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = - \frac {1}{t + \frac {- a t_{0} - 1}{a}} \]