4.21.2 \((a-b) y(x)^2 y'(x)^2-a b+a y(x)^2-b x^2-2 b x y(x) y'(x)=0\)

ODE
\[ (a-b) y(x)^2 y'(x)^2-a b+a y(x)^2-b x^2-2 b x y(x) y'(x)=0 \] ODE Classification

[_rational, [_1st_order, `_with_symmetry_[F(x),G(y)]`]]

Book solution method
Change of variable

Mathematica
cpu = 1.18568 (sec), leaf count = 86

\[\left \{\left \{y(x)\to -\frac {\sqrt {a \left (\left (x-c_1\right ){}^2-b\right )+b \left (b-x^2\right )}}{\sqrt {b-a}}\right \},\left \{y(x)\to \frac {\sqrt {a \left (\left (x-c_1\right ){}^2-b\right )+b \left (b-x^2\right )}}{\sqrt {b-a}}\right \}\right \}\]

Maple
cpu = 0.922 (sec), leaf count = 139

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

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

Mathematica raw output

{{y[x] -> -(Sqrt[b*(b - x^2) + a*(-b + (x - C[1])^2)]/Sqrt[-a + b])}, {y[x] -> S
qrt[b*(b - x^2) + a*(-b + (x - C[1])^2)]/Sqrt[-a + b]}}

Maple raw input

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

Maple raw output

(y(x)^2*(a-b)-b*(x^2+a-b))/(a-b) = 0, [x(_T) = (-_C1*b*_T+((_C1^2-b)*a*b)^(1/2)*
(_T^2+1)^(1/2))/(_T^2+1)^(1/2)/b, y(_T) = _C1/(_T^2+1)^(1/2)], [x(_T) = -(_C1*b*
_T+((_C1^2-b)*a*b)^(1/2)*(_T^2+1)^(1/2))/(_T^2+1)^(1/2)/b, y(_T) = _C1/(_T^2+1)^
(1/2)]