\[ y'(x)^n-f(x)^n (y(x)-a)^{n+1} (y(x)-b)^{n-1}=0 \] ✓ Mathematica : cpu = 2.24509 (sec), leaf count = 84
\[\left \{\left \{y(x)\to \frac {-a (a-b)^n \left (\int _1^x (-1)^{\frac {1}{n}+1} f(K[1]) \, dK[1]+c_1\right ){}^n-b n^n}{-(a-b)^n \left (\int _1^x (-1)^{\frac {1}{n}+1} f(K[1]) \, dK[1]+c_1\right ){}^n-n^n}\right \}\right \}\]
✓ Maple : cpu = 0.395 (sec), leaf count = 127
\[ \left \{ y \left ( x \right ) =-{a \left ( {\frac {n}{-{\it \_C1}\,a+{\it \_C1}\,b-a\int \!f \left ( x \right ) \,{\rm d}x+b\int \!f \left ( x \right ) \,{\rm d}x}} \right ) ^{n} \left ( -1+ \left ( {\frac {n}{-{\it \_C1}\,a+{\it \_C1}\,b-a\int \!f \left ( x \right ) \,{\rm d}x+b\int \!f \left ( x \right ) \,{\rm d}x}} \right ) ^{n} \right ) ^{-1}}+{b \left ( {\frac {n}{-{\it \_C1}\,a+{\it \_C1}\,b-a\int \!f \left ( x \right ) \,{\rm d}x+b\int \!f \left ( x \right ) \,{\rm d}x}} \right ) ^{n} \left ( -1+ \left ( {\frac {n}{-{\it \_C1}\,a+{\it \_C1}\,b-a\int \!f \left ( x \right ) \,{\rm d}x+b\int \!f \left ( x \right ) \,{\rm d}x}} \right ) ^{n} \right ) ^{-1}}+a \right \} \]