How to solve the ODE: $(x-1)^2y'' -2y = (x-1)^2-\frac{1}{x-1}$? How to solve the ODE: $(x-1)^2y'' -2y = (x-1)^2-\frac{1}{x-1}$ for $x \ne 1$
I can multiply the equation by $(x-1)$ but I still don't see how that helps. This is clearly not an Euler equation and otherwise I only know to solve such equation with constant coefficients.
What I've tried is guessing that there is a solution of the form of a polynomial, which I can later use to reduce the order. However I am struggling to find such a polynom.
Help will be appreciated. 
 A: Hint.
Calling $\xi = x-1$
$$
\xi^2y''-2y=\xi^2-\frac{1}{\xi}
$$
This is a linear DE so
$$
y = y_h+y_p
$$
here
$$
y_h = C_1 \xi^2+\frac{C_2}{\xi}
$$
after proposing $y_h =C_0 \xi^{\alpha}$
and
$$
y_p = \frac{3 \left(\xi^3+1\right) \ln (\xi)-\xi^3+1}{9 \xi}
$$
so this way we obtain $y$
NOTE
The particular $y_p$ can be computed with the constant's variation technique (Lagrange) so substituting 
$$
y_p = C_1(\xi)\xi^2+\frac{C_2(\xi)}{\xi}
$$
into the particular solution expression, we get
$$
\xi C_2''(\xi)-2C_2'(\xi)+\xi^4C_1''(\xi)+4\xi^3 C_1'(\xi)-\xi^2+\frac{1}{\xi} = 0
$$
Assuming now the independence of $C_1(\xi)$ and $C_2(\xi)$ we can establish
$$
\xi C_2''(\xi)-2C_2'(\xi)= 0\\
\xi^4C_1''(\xi)+4\xi^3 C_1'(\xi)-\xi^2+\frac{1}{\xi} = 0
$$
and after making $Z_1 = C_1', Z_2 = C_2'$ we can proceed with
$$
\xi Z_2'(\xi)-2Z_2(\xi)= 0\\
\xi^4Z_1'(\xi)+4\xi^3 Z_1(\xi)-\xi^2+\frac{1}{\xi} = 0
$$
etc.
A: Let $x>1$. After change $x-1=e^t$ we get
$$y''-y'-2y=e^{2t}-e^t$$
$$y=y_h+y_p$$
$$y_h=C_1e^{2t}+C_2e^{-t}$$
$$y_p=Ate^{2t}+Bte^{-t}$$
We find $$A=B=\frac13$$
After inverse change $t=\ln(x-1)$ we get final answer for $x>1$
$$y=C_1(x-1)^2+\frac{C_2}{x-1}+\frac13(x-1)^2\ln(x-1)+\frac{\ln(x-1)}{3(x-1)}$$
If $x<1$ we need make change $1-x=e^t$.
