35.4.15 problem 25 part (b)

Internal problem ID [6133]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 4. OTHER METHODS FOR FIRST-ORDER EQUATIONS. page 406
Problem number : 25 part (b)
Date solved : Monday, January 27, 2025 at 01:38:00 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

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

Solution by Maple

Time used: 0.006 (sec). Leaf size: 15

dsolve(diff(y(x),x)= 2/x*y(x)^2+1/x*y(x)-2*x,y(x), singsol=all)
 
\[ y = -\tanh \left (2 x +2 c_1 \right ) x \]

Solution by Mathematica

Time used: 1.005 (sec). Leaf size: 47

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