2.162 ODE No. 162
\[ k (-a+y(x)+x) (-b+y(x)+x)+(x-a) (x-b) y'(x)+y(x)^2=0 \]
✓ Mathematica : cpu = 0.291016 (sec), leaf count = 133
DSolve[y[x]^2 + k*(-a + x + y[x])*(-b + x + y[x]) + (-a + x)*(-b + x)*Derivative[1][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to -\frac {-a k-b k+2 k x}{2 (k+1)}+\frac {1}{2} \sqrt {\frac {-a^2 k^2+2 a b k^2-b^2 k^2}{(k+1)^2}} \tan \left (\frac {(k+1) \sqrt {\frac {-a^2 k^2+2 a b k^2-b^2 k^2}{(k+1)^2}} (\log (x-b)-\log (x-a))}{2 (a-b)}+c_1\right )\right \}\right \}\]
✓ Maple : cpu = 0.275 (sec), leaf count = 54
dsolve((x-a)*(x-b)*diff(y(x),x)+y(x)^2+k*(y(x)+x-a)*(y(x)+x-b) = 0,y(x))
\[y \left (x \right ) = \frac {\left (\left (b -x \right )^{k +1}+c_{1} \left (a -x \right )^{k} \left (a -x \right )\right ) k}{\left (k +1\right ) \left (c_{1} \left (a -x \right )^{k}+\left (b -x \right )^{k}\right )}\]