Find the general solution of second linear differential equation, given that one solution is polynomial

Solution 1:

Hint.

Considering a polynomial solution such as $y_1 = a_0+a_1 x+a_2 x^2$ after substitution into the DE we obtain

$$ 2a_0-a_1-2a_2+a_1 x \equiv 0 $$

so following with $a_1 = 0, 2a_0-2a_2 = 0$ we arrive at

$$ y_1 = a_2(x^2+1) $$

Assuming now that the other independent solution has the structure $y_2 = a_2(x)(x^2+1)$ after substitution we arrive at

$$ a''_2(x) = \left(1+\frac{2}{x-1}-\frac{4x}{x^2+1}\right)a'_2(x) $$

so now we can solve for $a_2(x)$ and then obtain $y_2$