40.4.10 problem 19 (k)

Internal problem ID [6650]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (k)
Date solved : Sunday, March 30, 2025 at 11:13:37 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} y \left (1+y^{2}\right )&=2 \left (1-2 x y^{2}\right ) y^{\prime } \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 32
ode:=y(x)*(1+y(x)^2) = 2*(1-2*x*y(x)^2)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (-{\mathrm e}^{4 \textit {\_Z}} x -2 \,{\mathrm e}^{2 \textit {\_Z}} x +{\mathrm e}^{2 \textit {\_Z}}+c_1 +2 \textit {\_Z} -x \right )} \]
Mathematica. Time used: 0.185 (sec). Leaf size: 36
ode=y[x]*(1+y[x]^2)==2*(1-2*x*y[x]^2)*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {y(x)^2+2 \log (y(x))}{\left (y(x)^2+1\right )^2}+\frac {c_1}{\left (y(x)^2+1\right )^2},y(x)\right ] \]
Sympy. Time used: 1.057 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((4*x*y(x)**2 - 2)*Derivative(y(x), x) + (y(x)**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x \left (y^{4}{\left (x \right )} + 2 y^{2}{\left (x \right )} + 1\right ) - y^{2}{\left (x \right )} - 2 \log {\left (y{\left (x \right )} \right )} = 0 \]