48.1.11 problem Example 3.11

Internal problem ID [7512]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.2 FIRST ORDER ODE. Page 114
Problem number : Example 3.11
Date solved : Monday, January 27, 2025 at 03:03:16 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=-\frac {2}{t}+\frac {y}{t}+\frac {y^{2}}{t} \end{align*}

Solution by Maple

Time used: 0.074 (sec). Leaf size: 22

dsolve(diff(y(t),t)=-2/t+1/t*y(t)+1/t*y(t)^2,y(t), singsol=all)
 
\[ y = \frac {-2 c_{1} t^{3}-1}{c_{1} t^{3}-1} \]

Solution by Mathematica

Time used: 1.482 (sec). Leaf size: 43

DSolve[D[y[t],t]==-2/t+1/t*y[t]+1/t*y[t]^2,y[t],t,IncludeSingularSolutions -> True]
 
\begin{align*} y(t)\to \frac {1-2 e^{3 c_1} t^3}{1+e^{3 c_1} t^3} \\ y(t)\to -2 \\ y(t)\to 1 \\ \end{align*}