80.3.15 problem 15

Internal problem ID [21179]
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 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 15
Date solved : Thursday, October 02, 2025 at 07:15:51 PM
CAS classification : [_separable]

\begin{align*} x^{\prime }&=-\left (1+p \right ) t^{p} x^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(x(t),t) = -(p+1)*t^p*x(t)^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {1}{t^{p +1}+c_1} \]
Mathematica. Time used: 0.146 (sec). Leaf size: 22
ode=D[x[t],t]==-(p+1)*t^p*x[t]^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{t^{p+1}-c_1}\\ x(t)&\to 0 \end{align*}
Sympy. Time used: 0.201 (sec). Leaf size: 29
from sympy import * 
t = symbols("t") 
p = symbols("p") 
x = Function("x") 
ode = Eq(t**p*(p + 1)*x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \begin {cases} - \frac {1}{C_{1} - t^{p + 1}} & \text {for}\: p > -1 \vee p < -1 \\\frac {1}{- C_{1} + p \log {\left (t \right )} + \log {\left (t \right )}} & \text {otherwise} \end {cases} \]