##### 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 Classiﬁcation

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.317298 (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.058 (sec), leaf count = 83

$\left [y \left (x \right ) = -\frac {2}{\sqrt {{\mathrm e}^{2 x^{2}} a \sqrt {\pi }\, \sqrt {2}\, \erf \left (\sqrt {2}\, x \right )+4 \,{\mathrm e}^{2 x^{2}} \textit {\_C1} -4 a x}}, y \left (x \right ) = \frac {2}{\sqrt {{\mathrm e}^{2 x^{2}} a \sqrt {\pi }\, \sqrt {2}\, \erf \left (\sqrt {2}\, x \right )+4 \,{\mathrm e}^{2 x^{2}} \textit {\_C1} -4 a x}}\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))

Maple raw output

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