\[ y''(x)=-\frac {y(x) \left (\left (g(x)^2-1\right ) \left (f'(x) \left (2 f'(x) g'(x)+f(x) g''(x)\right )-f(x) f''(x) g'(x)\right )-f(x) g'(x)^2 \left (2 g(x) f'(x)+v (v+1) f(x) g'(x)\right )\right )}{f(x)^2 \left (g(x)^2-1\right ) g'(x)}-\frac {y'(x) \left (2 f(x) g(x) g'(x)^2-\left (g(x)^2-1\right ) \left (2 f'(x) g'(x)+f(x) g''(x)\right )\right )}{f(x) \left (g(x)^2-1\right ) g'(x)} \] ✓ Mathematica : cpu = 0.143837 (sec), leaf count = 24
\[\{\{y(x)\to c_1 f(x) P_v(g(x))+c_2 f(x) Q_v(g(x))\}\}\] ✓ Maple : cpu = 0.448 (sec), leaf count = 20
\[ \left \{ y \left ( x \right ) =f \left ( x \right ) \left ( {\it LegendreQ} \left ( v,g \left ( x \right ) \right ) {\it \_C2}+{\it LegendreP} \left ( v,g \left ( x \right ) \right ) {\it \_C1} \right ) \right \} \]