Second order DE problem. Solve :

$$x(x-1)y''-(2x-1)y'+2y=x^2(2x-3)$$

I have tried solving the DE by using the following three methods:


*

*Solution in terms of part of CF (was unable to find a standard CF)

*Normal form ($R_1$ and $Q_1$ look very complex)

*Change of independent variable ($Q_1$ is very complex)


The question seems simple but I have not been able to determine a solution. I appreciate any ideas on how to solve the DE.
Thanks
 A: First notice that for $t>0$
$$
y = c_1 t+ c_2 t^2\quad \text{solves}\quad t^2 y'' -2ty' + 2y=0.
$$
This can be done by letting $y = t^{r}$ and we can get the characteristic equation $(r-1)(r-2)t^r = 0$.

Now we want to reduce the homogeneous part of your equation
$$x(x-1)y''-(2x-1)y'+2y=0\tag{1}$$
to something like above. A reasonable guess is that since the derivative of a polynomial contains linear combination of its factors, we make substitution: 
$$
t = x-1,
$$
and (1) becomes:
$$
t(t+1)y'' -(2t+1)y' + 2y=0.
$$
Let $y = t^{r}$, then $y' = rt^{r-1}$ and $y'' = r(r-1)t^{r-2}$, plugging above equation yields
$$
(r-2)\Big[(r-1)t^r + rt^{r-1}\Big] = 0,
$$
so $r=2$ will make everthing vanish no matter what $t$, this gives us the first solution to (1): 
$$y_1 = t^2 = (x-1)^2.$$
Second solution to (1) can be found in a similar way:
$$y_2 = (2x-1).$$
We can check the Wronskian of $y_1$ and $y_2$ does not vanish so they form a fundamental set of solutions for (1), and second order equation has only two elements in its fundamental set of solutions, we found all solution to (1):
$$
y_c = c_1 (x-1)^2 + c_2 (2x-1).\tag{2}
$$

Now we turn to the inhomogeneous equation
$$
x(x-1)y''-(2x-1)y'+2y=x^2(2x-3),\tag{3}
$$
so that we wanna find a particular solution for (3) that does not contain any terms in the homogeneous solution $y_c$ (for any terms being sent into the differential operator of left hand side will just vanish). The standard way of doing this is by Variations of Parameters: let
$$
y = u_1(x)(x-1)^2 + u_2(x)(2x-1).\tag{$\star$}
$$
This implies
$$
y' = u_1'(x-1)^2 + 2u_1(x-1) + u_2'(2x-1) + 2u_2.
$$
Setting 
$$
u_1'(x-1)^2 + u_2'(2x-1) = 0\tag{4}
$$
we get the first equation that is needed to get $u_1$ and $u_2$. Now that 
$$
y' =   2u_1(x-1)  + 2u_2,
$$
taking derivative again 
$$
y'' = 2u_1'(x-1) + 2u_1 + 2u_2'.
$$
Plugging $y,y',y''$ into (3):
$$
2x(x-1)^2u_1' + 2x(x-1)u_1 + 2x(x-1)u_2'
\\
-2(2x-1)(x-1)u_1 - 2(2x-1)u_2 
\\
+ 2(x-1)^2u_1 + 2(2x-1)u_2 = x^2(2x-3).
$$
You will find most terms get canceled and what is left is the second equation:
$$
2x(x-1)^2u_1'  + 2x(x-1)u_2' = x^2(2x-3).\tag{5}
$$
Solving (4) and (5) gives:
$$\begin{aligned}u_1' &= \frac{(2x-1)(2x-3)}{2(x-1)^2}
\\
u_2' &= - \frac{2x-3}{2}\end{aligned} \implies 
\begin{aligned}u_1  &= 2 x + \frac{1}{2(x-1)} + c_1
\\
u_2  &= - \frac{x(x-3)}{2}+c_2\end{aligned} $$
Now back to equation $(\star)$:
$$
y = \underbrace{c_1 (x-1)^2 + c_2 (2x-1)}_{\text{solution for the homogeneous equation}} + \underbrace{x^3 - \frac12 x^2 +x -\frac12}_{\text{particular solution}}.
$$
This is the presentation I will give in an undergrad ODE class.
A: Notice how the degree of the polynomial coefficients in your equation is equal to the order of differentiation of each term. That calls for a polynomial solution. Let $P(x)=ux^n+...$, with $u\not=0$. We want $P$ to be a solution of the DE. Since the right hand side of the equation is a polynomial of degree 3, we must have $\deg(P)=n\ge3$. 
Next, let us look at the coefficient in front of the monomial of highest degree in
$$
    x(x-1)P''(x)-(2x-1)P'(x)+2P(x).
$$
It is equal to
$$
    n(n-1)u-2nu+2u=u(n(n-3)+2)\not=0
$$
because $n\geq3$.
$$
    x(x-1)P''(x)-(2x-1)P'(x)+2P(x)=x^2(2x-3)
$$
implies $n=3$ and $u=1$. Therefore, we are looking for solutions of the DE with the form $P(x)=x^3+ax^2+bx+c$. Plugging this into the equation yields only one simple condition
$$
    b+2c=0,
$$
meaning that any polynomial with the form $P(x)=x^3+ax^2-2cx+c$ is a solution of the DE. Notice that this represents an affine space of dimension 2, which means it is the complete solution.
A: If you use power series to solve this DE, it is much easier. Since $x=0$ is a normal point of the DE, $y$ can be represented as a power series at $x=0$. Let 
$$ y=\sum_{n=0}^\infty a_nx^n. $$
Then
$$ y'=\sum_{n=1}^\infty na_nx^{n-1}, y''=\sum_{n=2}^\infty n(n-1)a_nx^{n-2}. $$
So the DE becomes
\begin{eqnarray*}
(x^2-x)\sum_{n=2}^\infty n(n-1)a_nx^{n-2}-(2x-1)\sum_{n=1}^\infty na_nx^{n-1}+2\sum_{n=0}^\infty a_nx^n=2x^3-3x^2
\end{eqnarray*}
or
\begin{eqnarray*}
\sum_{n=2}^\infty n(n-1)a_{n}x^{n}-\sum_{n=1}^\infty[(n+1)na_{n+1}+2 na_{n}]x^{n}+\sum_{n=0}^\infty [(n+1)a_{n+1}+2a_n]x^n=2x^3-3x^2.
\end{eqnarray*}
Comparing the coefficients of $x^n, n=0,1,2,3,\cdots$ in both sides respectively, we have
\begin{eqnarray*}
a_1+2a_0=0,-3a_3=-3,a_3=a_4=\cdots=0.
\end{eqnarray*}
So the solution of the DE is
$$ y=a_0+a_1x+a_2x^2+a_3x^3=a_0-2a_0x+a_2x^2+x^3=a_0(1-2x)+a_2x^2+x^3. $$
