Solve second order linear ODE if particular solution of the homogenous part is known Here's this ODE: $$x(x-1)y'' -(2x-1)y' + 2y = 2x^3 -3x^2$$
and $$y_1 =x^2$$
I know that I have to consider the homogenous part of the ODE first, which is $$x(x-1)y'' -(2x-1)y' + 2y = 0$$
If one solution is already known, then the second one can be calculated as:
$$y_2(x) = y_1(x)\int \frac{e^{-\int P(x)dx}}{y_1^2(x)}dx$$, after which the solution of the homogenous part is $$C_1y_1(x) + C_2y_2(x)$$
After I divided my equation by $x(x-1)$ I solved the first part and got $$C_1x^2 + C_2(-x+\frac{1}{2})$$
Now I need to find the rest of the solution (By the way, the full solution is: $$C_1x^2 + C_2(-x+\frac{1}{2}) +x^3 -\frac{x^2}{2}+x-\frac{1}{2}$$
I tried the variation of constants by forming the following system of equations:
$$C_1'(x)x^2 + C_2'(x)(-x+\frac{1}{2})=0$$
$$C_1'(x)2x - C_2'(x)=\frac{x(2x-3)}{x-1}$$
I used Cramer's method of solving the system and got that
$C_1' = \frac{-(2x-3)(-2x+1)}{2(x-1)^2}$ and
$C_2' = \frac{x^2(2x-3)}{(x-1)^2}$
Now if I integrate both I get:
$C_1 = 2x + \frac{1}{2(x-1)} -2$
and
$C_2 = \frac{x^3 -3x +3}{x-1}$
However, when I add these two $C_1$ and $C_2$ I don't get anything that resembles the $x^3 -\frac{x^2}{2}+x-\frac{1}{2}$ part of the solution.
Can anyone please help me with this? Have I correctly calculated $C_1$ and $C_2$? What do I do with them?

First, after considering $y_1 = c_1 x^2$ as a particular solution for the homogeneous
$$
x(x-1)y_h'' -(2x-1)y_h' + 2y_h = 0
$$
we have by constants variation (Lagrange)
$$
y_h = \left(\frac{c_2 (2 x-1)}{2 x^2}+c_3\right)x^2 = \frac{c_2}{2}(2x-1)+c_3 x^2
$$
now, using the Lagrange method again we propose for the complete ODE a particular solution with the structure
$$
y_p = \frac{c_2(x)}{2}(2x-1)+c_3(x) x^2
$$
and after substitution into
$$
x(x-1)y_p'' -(2x-1)y_p' + 2y_p = 2x^3 -3x^2
$$
we obtain
$$
\frac{1}{2} x (x (2 x-3)+1) c_2''(x)-\frac{c_2'(x)}{2}+(x-1) x^3 c_3''(x)+(2 x-3) x^2 c_3'(x)+(3-2 x) x^2 = 0
$$
as long as $c_2(x), c_3(x)$ are independent functions we can establish
$$
\cases{
\frac{1}{2} x (x (2 x-3)+1) c_2''(x)-\frac{c_2'(x)}{2}=0\\
(x-1) x^3 c_3''(x)+(2 x-3) x^2 c_3'(x)+(3-2 x) x^2 = 0
}
$$
We are looking for a particular solution then $c_2(x) = 0$ satisfies this condition. Regarding $c_3(x)$ we find
$$
c_3(x) = -\frac{3}{2 x^2}+x+\frac{3}{x}
$$
and finally
$$
y = y_h+y_p = \frac{c_2}{2}(2x-1)+c_3 x^2 + x^3+3 x-\frac{3}{2}
$$
The constants are $c_2, c_3$
