4.1.44 \(y'(x)=(x-y(x))^2\)

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

[[_homogeneous, `class C`], _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.00864402 (sec), leaf count = 22

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

Maple
cpu = 0.027 (sec), leaf count = 28

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

-ln(y(x)-x-1)+ln(y(x)-x+1)+2*x-_C1 = 0