\[ y''(x) \left (-6 x (\text {a1}+\text {a2}+\text {a3})+3 \text {a1} \text {a2}+3 \text {a1} \text {a3}+3 \text {a2} \text {a3}+9 x^2\right )+2 (x-\text {a1}) (x-\text {a2}) (x-\text {a3}) y^{(3)}(x)-2 \left (b+\left (n^2+n-3\right ) x\right ) y'(x)-n (n+1) y(x)=0 \] ✓ Mathematica : cpu = 4.92295 (sec), leaf count = 534
\[\left \{\left \{y(x)\to c_1 \text {HeunG}\left [\frac {\text {a3}-\text {a1}}{\text {a2}-\text {a1}},\frac {\frac {1}{4} (\text {a1}+\text {a2}+\text {a3}-b)+\frac {1}{4} \text {a1} \left (-n^2-n\right )}{\text {a1}-\text {a2}},\frac {1}{2} \left (\frac {1}{2}-\sqrt {n^2+n+\frac {1}{4}}\right ),\frac {1}{2} \left (\sqrt {n^2+n+\frac {1}{4}}+\frac {1}{2}\right ),\frac {1}{2},\frac {1}{2},\frac {x-\text {a1}}{\text {a2}-\text {a1}}\right ]^2+c_2 \sqrt {\frac {x-\text {a1}}{\text {a2}-\text {a1}}} \text {HeunG}\left [\frac {\text {a3}-\text {a1}}{\text {a2}-\text {a1}},\frac {\frac {1}{4} (\text {a1}+\text {a2}+\text {a3}-b)+\frac {1}{4} \text {a1} \left (-n^2-n\right )}{\text {a1}-\text {a2}}+\frac {1}{2} \left (\frac {\text {a3}-\text {a1}}{2 (\text {a2}-\text {a1})}+\frac {1}{2}\right ),\frac {1}{2} \left (\sqrt {n^2+n+\frac {1}{4}}+\frac {3}{2}\right ),\frac {1}{2} \left (\frac {3}{2}-\sqrt {n^2+n+\frac {1}{4}}\right ),\frac {3}{2},\frac {1}{2},\frac {x-\text {a1}}{\text {a2}-\text {a1}}\right ] \text {HeunG}\left [\frac {\text {a3}-\text {a1}}{\text {a2}-\text {a1}},\frac {\frac {1}{4} (\text {a1}+\text {a2}+\text {a3}-b)+\frac {1}{4} \text {a1} \left (-n^2-n\right )}{\text {a1}-\text {a2}},\frac {1}{2} \left (\frac {1}{2}-\sqrt {n^2+n+\frac {1}{4}}\right ),\frac {1}{2} \left (\sqrt {n^2+n+\frac {1}{4}}+\frac {1}{2}\right ),\frac {1}{2},\frac {1}{2},\frac {x-\text {a1}}{\text {a2}-\text {a1}}\right ]+\frac {c_3 (x-\text {a1}) \text {HeunG}\left [\frac {\text {a3}-\text {a1}}{\text {a2}-\text {a1}},\frac {\frac {1}{4} (\text {a1}+\text {a2}+\text {a3}-b)+\frac {1}{4} \text {a1} \left (-n^2-n\right )}{\text {a1}-\text {a2}}+\frac {1}{2} \left (\frac {\text {a3}-\text {a1}}{2 (\text {a2}-\text {a1})}+\frac {1}{2}\right ),\frac {1}{2} \left (\sqrt {n^2+n+\frac {1}{4}}+\frac {3}{2}\right ),\frac {1}{2} \left (\frac {3}{2}-\sqrt {n^2+n+\frac {1}{4}}\right ),\frac {3}{2},\frac {1}{2},\frac {x-\text {a1}}{\text {a2}-\text {a1}}\right ]^2}{\text {a2}-\text {a1}}\right \}\right \}\] ✓ Maple : cpu = 0.424 (sec), leaf count = 288
\[\left \{y \left (x \right ) = c_{1} \mathit {HG}\left (\frac {\mathit {a1} -\mathit {a3}}{\mathit {a1} -\mathit {a2}}, \frac {\left (-n^{2}-n +1\right ) \mathit {a1} +\mathit {a2} +\mathit {a3} -b}{4 \mathit {a1} -4 \mathit {a2}}, -\frac {n}{2}, \frac {n}{2}+\frac {1}{2}, \frac {1}{2}, \frac {1}{2}, \frac {\mathit {a1} -x}{\mathit {a1} -\mathit {a2}}\right )^{2}-c_{2} \left (-\mathit {a1} +x \right ) \mathit {HG}\left (\frac {\mathit {a1} -\mathit {a3}}{\mathit {a1} -\mathit {a2}}, \frac {\left (-n^{2}-n +3\right ) \mathit {a1} -b}{4 \mathit {a1} -4 \mathit {a2}}, \frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}, \frac {3}{2}, \frac {1}{2}, \frac {\mathit {a1} -x}{\mathit {a1} -\mathit {a2}}\right )^{2}+c_{3} \sqrt {\mathit {a1} -x}\, \mathit {HG}\left (\frac {\mathit {a1} -\mathit {a3}}{\mathit {a1} -\mathit {a2}}, \frac {\left (-n^{2}-n +3\right ) \mathit {a1} -b}{4 \mathit {a1} -4 \mathit {a2}}, \frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}, \frac {3}{2}, \frac {1}{2}, \frac {\mathit {a1} -x}{\mathit {a1} -\mathit {a2}}\right ) \mathit {HG}\left (\frac {\mathit {a1} -\mathit {a3}}{\mathit {a1} -\mathit {a2}}, \frac {\left (-n^{2}-n +1\right ) \mathit {a1} +\mathit {a2} +\mathit {a3} -b}{4 \mathit {a1} -4 \mathit {a2}}, -\frac {n}{2}, \frac {n}{2}+\frac {1}{2}, \frac {1}{2}, \frac {1}{2}, \frac {\mathit {a1} -x}{\mathit {a1} -\mathit {a2}}\right )\right \}\]