4.2.38 \(2 x y(x) \left (a x y(x)^2+1\right )+y'(x)=0\)

ODE
\[ 2 x y(x) \left (a x y(x)^2+1\right )+y'(x)=0 \] ODE Classification

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.033291 (sec), leaf count = 101

\[\left \{\left \{y(x)\to -\frac {2}{\sqrt {\sqrt {2 \pi } a e^{2 x^2} \text {erf}\left (\sqrt {2} x\right )-4 a x+4 c_1 e^{2 x^2}}}\right \},\left \{y(x)\to \frac {2}{\sqrt {\sqrt {2 \pi } a e^{2 x^2} \text {erf}\left (\sqrt {2} x\right )-4 a x+4 c_1 e^{2 x^2}}}\right \}\right \}\]

Maple
cpu = 0.044 (sec), leaf count = 41

\[ \left \{ \left ( y \left ( x \right ) \right ) ^{-2}+ax-{\frac {{{\rm e}^{2\,{x}^{2}}}a\sqrt {2}\sqrt {\pi }{\it Erf} \left ( \sqrt {2}x \right ) }{4}}-{{\rm e}^{2\,{x}^{2}}}{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -2/Sqrt[-4*a*x + 4*E^(2*x^2)*C[1] + a*E^(2*x^2)*Sqrt[2*Pi]*Erf[Sqrt[2]
*x]]}, {y[x] -> 2/Sqrt[-4*a*x + 4*E^(2*x^2)*C[1] + a*E^(2*x^2)*Sqrt[2*Pi]*Erf[Sq
rt[2]*x]]}}

Maple raw input

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

Maple raw output

1/y(x)^2+a*x-1/4*exp(2*x^2)*a*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*x)-exp(2*x^2)*_C1 = 0