##### 4.2.12 $$y'(x)=a (x-y(x)) y(x)+1$$

ODE
$y'(x)=a (x-y(x)) y(x)+1$ ODE Classiﬁcation

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.425302 (sec), leaf count = 88

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

Maple
cpu = 0.249 (sec), leaf count = 71

$\left [y \left (x \right ) = \frac {\sqrt {2}\, \sqrt {\pi }\, \erf \left (\frac {\sqrt {2}\, \sqrt {a}\, x}{2}\right ) a x +2 a^{\frac {3}{2}} \textit {\_C1} x +2 \sqrt {a}\, {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {2}\, \sqrt {\pi }\, \erf \left (\frac {\sqrt {2}\, \sqrt {a}\, x}{2}\right ) a +2 a^{\frac {3}{2}} \textit {\_C1}}\right ]$ Mathematica raw input

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

Mathematica raw output

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

Maple raw input

dsolve(diff(y(x),x) = 1+a*(x-y(x))*y(x), y(x))

Maple raw output

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