89.5.33 problem 33

Internal problem ID [24383]
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 43
Problem number : 33
Date solved : Thursday, October 02, 2025 at 10:22:47 PM
CAS classification : [_linear]

\begin{align*} \left (t^{2}+1\right ) s^{\prime }+2 t \left (s t^{2}-3 \left (t^{2}+1\right )^{2}\right )&=0 \end{align*}

With initial conditions

\begin{align*} s \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 20
ode:=(t^2+1)*diff(s(t),t)+2*t*(s(t)*t^2-3*(t^2+1)^2) = 0; 
ic:=[s(0) = 2]; 
dsolve([ode,op(ic)],s(t), singsol=all);
 
\[ s = \left (t^{2}+1\right ) \left (-{\mathrm e}^{-t^{2}}+3\right ) \]
Mathematica. Time used: 0.035 (sec). Leaf size: 27
ode=(1+t^2)*D[s[t],t]+ 2*t*(s[t]*t^2 - 3*(1+t^2)^2)== 0; 
ic={s[0]==2}; 
DSolve[{ode,ic},s[t],t,IncludeSingularSolutions->True]
 
\begin{align*} s(t)&\to e^{-t^2} \left (3 e^{t^2}-1\right ) \left (t^2+1\right ) \end{align*}
Sympy. Time used: 0.239 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
s = Function("s") 
ode = Eq(2*t*(t**2*s(t) - 3*(t**2 + 1)**2) + (t**2 + 1)*Derivative(s(t), t),0) 
ics = {s(0): 2} 
dsolve(ode,func=s(t),ics=ics)
 
\[ s{\left (t \right )} = 3 t^{2} - t^{2} e^{- t^{2}} + 3 - e^{- t^{2}} \]