4.13.22 \((y(x)+x)^2 y'(x)=x^2-2 x y(x)+5 y(x)^2\)

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

[[_homogeneous, `class A`], _rational, _dAlembert]

Book solution method
Equation linear in the variables, \(y'(x)=f\left ( \frac {X_1}{X_2} \right ) \)

Mathematica
cpu = 0.252843 (sec), leaf count = 35

\[\text {Solve}\left [\frac {2 x (x-2 y(x))}{(x-y(x))^2}+\log \left (\frac {y(x)}{x}-1\right )+\log (x)=c_1,y(x)\right ]\]

Maple
cpu = 0.02 (sec), leaf count = 68

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

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

Mathematica raw output

Solve[Log[x] + Log[-1 + y[x]/x] + (2*x*(x - 2*y[x]))/(x - y[x])^2 == C[1], y[x]]

Maple raw input

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

Maple raw output

((x-y(x))^2*ln((y(x)-x)/x)+(-_C1+ln(x))*y(x)^2+2*x*(_C1-ln(x)-2)*y(x)-x^2*(_C1-l
n(x)-2))/(x-y(x))^2 = 0