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

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

[[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

Book solution method
Binomial equation \((y')^m + F(x) G(y)=0\)

Mathematica
cpu = 0.265047 (sec), leaf count = 91

\[\left \{\left \{y(x)\to (b-a) \tan ^2\left (\frac {1}{2} \sqrt {a-b} \left (\int _1^x -\sqrt {f(K[1])} \, dK[1]+c_1\right )\right )+b\right \},\left \{y(x)\to (b-a) \tan ^2\left (\frac {1}{2} \sqrt {a-b} \left (\int _1^x \sqrt {f(K[2])} \, dK[2]+c_1\right )\right )+b\right \}\right \}\]

Maple
cpu = 0.149 (sec), leaf count = 110

\[ \left \{ 2\,{\frac {1}{\sqrt {-a+b}}\arctan \left ( {\frac {\sqrt {y \left ( x \right ) -b}}{\sqrt {-a+b}}} \right ) }+\int ^{x}\!{1\sqrt {f \left ( {\it \_a} \right ) \left ( b-y \left ( x \right ) \right ) }{\frac {1}{\sqrt {y \left ( x \right ) -b}}}}{d{\it \_a}}+{\it \_C1}=0,2\,{\frac {1}{\sqrt {-a+b}}\arctan \left ( {\frac {\sqrt {y \left ( x \right ) -b}}{\sqrt {-a+b}}} \right ) }+\int ^{x}\!-{1\sqrt {f \left ( {\it \_a} \right ) \left ( b-y \left ( x \right ) \right ) }{\frac {1}{\sqrt {y \left ( x \right ) -b}}}}{d{\it \_a}}+{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> b + (-a + b)*Tan[(Sqrt[a - b]*(C[1] + Integrate[-Sqrt[f[K[1]]], {K[1],
 1, x}]))/2]^2}, {y[x] -> b + (-a + b)*Tan[(Sqrt[a - b]*(C[1] + Integrate[Sqrt[f
[K[2]]], {K[2], 1, x}]))/2]^2}}

Maple raw input

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

Maple raw output

2/(-a+b)^(1/2)*arctan((y(x)-b)^(1/2)/(-a+b)^(1/2))+Intat((f(_a)*(b-y(x)))^(1/2)/
(y(x)-b)^(1/2),_a = x)+_C1 = 0, 2/(-a+b)^(1/2)*arctan((y(x)-b)^(1/2)/(-a+b)^(1/2
))+Intat(-(f(_a)*(b-y(x)))^(1/2)/(y(x)-b)^(1/2),_a = x)+_C1 = 0