85.21.3 problem 1 (c)

Internal problem ID [22566]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 55
Problem number : 1 (c)
Date solved : Thursday, October 02, 2025 at 08:51:43 PM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

\begin{align*} y^{2}+x y y^{\prime }&=\left (1+2 y^{2}\right ) y^{\prime } \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 18
ode:=y(x)^2+x*y(x)*diff(y(x),x) = (2*y(x)^2+1)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{2 \textit {\_Z}}-x \,{\mathrm e}^{\textit {\_Z}}+\textit {\_Z} +c_1 \right )} \]
Mathematica. Time used: 0.094 (sec). Leaf size: 26
ode=y[x]^2+x*y[x]*D[y[x],x]== (2*y[x]^2+1)*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {y(x)^2+\log (y(x))}{y(x)}+\frac {c_1}{y(x)},y(x)\right ] \]
Sympy. Time used: 0.569 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) - (2*y(x)**2 + 1)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x y{\left (x \right )} - y^{2}{\left (x \right )} - \log {\left (y{\left (x \right )} \right )} = 0 \]