89.4.4 problem 4

Internal problem ID [24326]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 39
Problem number : 4
Date solved : Thursday, October 02, 2025 at 10:18:10 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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