\[ y''(x)=c-\frac {b y(x)}{x^2 (x-a)^2} \] ✓ Mathematica : cpu = 0.219583 (sec), leaf count = 589
DSolve[Derivative[2][y][x] == c - (b*y[x])/(x^2*(-a + x)^2),y[x],x]
\[\left \{\left \{y(x)\to -\frac {2 c x^2 (a-x) \left (1-\frac {x}{a}\right )^{-\frac {1}{2} \sqrt {\frac {a^2-4 b}{a^2}}} \left (\sqrt {\frac {a^2-4 b}{a^2}} \left (1-\frac {x}{a}\right )^{\sqrt {\frac {a^2-4 b}{a^2}}} \, _2F_1\left (\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}-\frac {1}{2},\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}+\frac {3}{2};\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}+\frac {5}{2};\frac {x}{a}\right )-3 \left (1-\frac {x}{a}\right )^{\sqrt {\frac {a^2-4 b}{a^2}}} \, _2F_1\left (\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}-\frac {1}{2},\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}+\frac {3}{2};\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}+\frac {5}{2};\frac {x}{a}\right )+\sqrt {\frac {a^2-4 b}{a^2}} \, _2F_1\left (-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}-\frac {1}{2},\frac {3}{2}-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}};\frac {5}{2}-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}};\frac {x}{a}\right )+3 \, _2F_1\left (-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}-\frac {1}{2},\frac {3}{2}-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}};\frac {5}{2}-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}};\frac {x}{a}\right )\right )}{a \left (\sqrt {\frac {a^2-4 b}{a^2}}-3\right ) \left (\sqrt {\frac {a^2-4 b}{a^2}}+3\right ) \sqrt {\frac {a^2-4 b}{a^2}} \sqrt {\frac {a-x}{a}}}+\frac {c_2 (x-a)^{\frac {1}{2} \sqrt {\frac {a^2-4 b}{a^2}}+\frac {1}{2}} x^{\frac {1}{2}-\frac {1}{2} \sqrt {\frac {a^2-4 b}{a^2}}}}{a \sqrt {\frac {a^2-4 b}{a^2}}}+c_1 (x-a)^{\frac {1}{2}-\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}} x^{\frac {1}{2} \sqrt {1-\frac {4 b}{a^2}}+\frac {1}{2}}\right \}\right \}\] ✓ Maple : cpu = 0.167 (sec), leaf count = 175
dsolve(diff(diff(y(x),x),x) = -b/x^2/(x-a)^2*y(x)+c,y(x))
\[y \left (x \right ) = \frac {\left (\left (c_{2} \sqrt {a^{2}-4 b}-\left (\int \sqrt {x \left (a -x \right )}\, \left (\frac {a -x}{x}\right )^{-\frac {\sqrt {a^{2}-4 b}}{2 a}}d x \right ) c \right ) \left (\frac {a -x}{x}\right )^{\frac {\sqrt {a^{2}-4 b}}{2 a}}+\left (\left (\int \sqrt {x \left (a -x \right )}\, \left (\frac {x}{a -x}\right )^{-\frac {\sqrt {a^{2}-4 b}}{2 a}}d x \right ) c +c_{1} \sqrt {a^{2}-4 b}\right ) \left (\frac {x}{a -x}\right )^{\frac {\sqrt {a^{2}-4 b}}{2 a}}\right ) \sqrt {x \left (a -x \right )}}{\sqrt {a^{2}-4 b}}\]