##### 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 Classiﬁcation

[[_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.288652 (sec), leaf count = 93

$\left \{\left \{y(x)\to b+(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 )\right \},\left \{y(x)\to b+(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 )\right \}\right \}$

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

$\left [\frac {2 \arctan \left (\frac {\sqrt {y \left (x \right )-b}}{\sqrt {b -a}}\right )}{\sqrt {b -a}}+\int _{}^{x}\frac {\sqrt {f \left (\textit {\_a} \right ) \left (b -y \left (x \right )\right )}}{\sqrt {y \left (x \right )-b}}d \textit {\_a} +\textit {\_C1} = 0, \frac {2 \arctan \left (\frac {\sqrt {y \left (x \right )-b}}{\sqrt {b -a}}\right )}{\sqrt {b -a}}+\int _{}^{x}-\frac {\sqrt {f \left (\textit {\_a} \right ) \left (b -y \left (x \right )\right )}}{\sqrt {y \left (x \right )-b}}d \textit {\_a} +\textit {\_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] + Inactive[Integrate][-Sqrt[f[K[1]
]], {K[1], 1, x}]))/2]^2}, {y[x] -> b + (-a + b)*Tan[(Sqrt[a - b]*(C[1] + Inacti
ve[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))

Maple raw output

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