4.12.28 \(2 x^2 y(x) y'(x)=x^2 (2 x+1)-y(x)^2\)

ODE
\[ 2 x^2 y(x) y'(x)=x^2 (2 x+1)-y(x)^2 \] ODE Classification

[[_homogeneous, `class D`], _rational, _Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.0110721 (sec), leaf count = 43

\[\left \{\left \{y(x)\to -\sqrt {c_1 e^{\frac {1}{x}}+x^2}\right \},\left \{y(x)\to \sqrt {c_1 e^{\frac {1}{x}}+x^2}\right \}\right \}\]

Maple
cpu = 0.008 (sec), leaf count = 20

\[ \left \{ -{x}^{2}-{{\rm e}^{{x}^{-1}}}{\it \_C1}+ \left ( y \left ( x \right ) \right ) ^{2}=0 \right \} \] Mathematica raw input

DSolve[2*x^2*y[x]*y'[x] == x^2*(1 + 2*x) - y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> -Sqrt[x^2 + E^x^(-1)*C[1]]}, {y[x] -> Sqrt[x^2 + E^x^(-1)*C[1]]}}

Maple raw input

dsolve(2*x^2*y(x)*diff(y(x),x) = x^2*(1+2*x)-y(x)^2, y(x),'implicit')

Maple raw output

-x^2-exp(1/x)*_C1+y(x)^2 = 0