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

ODE
\[ f(x) (y(x)-a) (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.239171 (sec), leaf count = 243

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

Maple
cpu = 0.396 (sec), leaf count = 212

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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