How to solve the ordinary differential equation $ x^2 y'' - 2 x y' + 2y = x^4 \mathrm{e}^x $ Please tell me how to solve this differential equation.
$$  x^2 y'' - 2 x y' + 2y = x^4 \mathrm{e}^x  $$
I tried to solve it but finally I stuck tell me how to go further more if anyone gives me a hint(I want to know how to find paticular integral?).I will appreciate about it.i posted my way below please tell me any hint. Here's my work:

 A: First Solve the homogeneous part:
$$x^2y''-2xy'+2y=0\,.~~~~(1)$$ To solve this Euler's
equation let $y=x^m$, then
$m(m-1)-2m+2=0 \implies m^2-3m+2=0 m=1,2.$
So $y_{1,2}=x, x^2$ are two linearly
independent solutions of (1).
Next the in-homogeneous ODE $$Y''-(2/x) Y'+(2/x^2)Y=x^2e^{x}f(x) ~~~~~(2)$$
can be solved by the method of variation of parameters $C_1,C_2$
where $$C_1=-\int \frac{y_2(x) f(x)}{W(x)} dx+D_1, ~~C_2=\int \frac{y_1(x) f(x)}{W(x)}+D_2\,.$$ Here, $W(x)=y_1y'_2-y'_1 y_2=-x^{2}$ and its solution is
$$Y(x)=C_1(x) y_1(x)+C_2(x) y_2(x)\,,~~~(3)$$
$$C_1=-\int x^2 e^{x} dx=e^{x}(-x^2+2x-2)\,.$$
Similarly, $$C_2=\int x e^{x} dx=e^{x}(x-1)\,.$$
Inserting $C_1,C_2,y_1,y_2$ in (3), the total solution of (2)
is $$Y(x)=D_1 x+ D_2 x^2+ e^x(x^2-2x)\,.$$
A: i think you can calculate $CF$ yourself .below procedure is for PI only 
$P.I.=\dfrac{e^{4z}\times e^{e^z}}{(D^2-3D+2)}=e^{4z}\dfrac{1}{D^2+5D+6}e^{e^z}=e^{4z}\left[\left(\dfrac{1}{D+3}e^{e^z}\right)-\left(\dfrac{1}{D+2}e^{e^z}\right)\right] $
now, 
let, $I_{1}=\dfrac{1}{D+3}e^{e^z}=e^{-3z}\displaystyle\int e^{3z+e^{e^z}}dz  = e^{-z}.e^{e^{z}}-2e^{-2z}.e^{e^{z}}+2e^{-3z}.e^{e^z}$ 
and $I_{2}=\dfrac{1}{D+2}e^{e^z}=e^{-2z}\displaystyle\int e^{2z+e^{e^z}}dz=e^{-z}.e^{e^z}-e^{-2z}.e^{e^z}$
put both of them in top equation to get the PI
note 
$\dfrac{\phi(x)}{D+a}=e^{-ax}\displaystyle\int e^{ax} \phi(x)dx$
A: Operators and first and second integrals are two methods to find a solution. This solution uses the series solution. 
Let 
$$y(x) = \sum_{n=0}^{\infty} a_{n} \, x^n$$
which easily leads to
\begin{align}
x^2 \, y'' - 2 x y' + 2 y &= x^4 \, e^{x} \\
\sum_{n=0}^{\infty} a_{n} \, (n(n-1) - 2n + 2) \, x^n &= \sum_{n=0}^{\infty} \frac{x^{n+4}}{n!} \\
\sum_{n=0}^{\infty} (n-1)(n-2) \, a_{n} \, x^n &= \sum_{n=4}^{\infty} \frac{x^n}{(n-4)!} \\
a_{1} \, x + a_{2} \, x^2 + \sum_{n=4}^{\infty} (n-1)(n-2) \, a_{n} \, x^n &= \sum_{n=4}^{\infty} \frac{x^n}{(n-4)!}
\end{align}
This leads to $a_{1}$ and $a_{2}$ along with $$a_{n} = \frac{n(n-3)}{n!} \hspace{5mm} \text{for} \hspace{5mm} n \geq 4.$$
Now,
\begin{align}
y(x) &= a_{1} \, x + a_{2} \, x^2 + \sum_{n=0}^{\infty} \frac{n(n-3) \, x^n}{n!} \\
&= a_{1} \, x + a_{2} \, x^2 + x \, \frac{d}{dx} \, \sum_{n=0}^{\infty} (n-3) \, \frac{x^n}{n!} \\
&= a_{1} \, x + a_{2} \, x^2 + x \, \frac{d}{dx} \left[ x \, \frac{d}{dx} e^x - 3 \, e^x \right] \\
&= a_{1} \, x + a_{2} \, x^2 + x \, \frac{d}{dx} \left( (x-3) \, e^x \right) \\
&= a_{1} \, x + a_{2} \, x^2 + x(x-2) \, e^x.
\end{align}
A: Another way to solve the DE:
$$x^2 y'' - 2 x y' + 2y = x^4 \mathrm{e}^x$$
$$ y'' - 2 \left ( \frac {y'}x -\dfrac y {x^2} \right ) = x^2\mathrm{e}^x$$
$$ y'' - 2  \left ( \frac y x \right )' = x^2\mathrm{e}^x$$
Integration:
$$ y' - 2  \frac y x = \int x^2e^x dx$$
$$ y' - 2  \frac y x   = x^2e^x -2xe^x+2e^x+c_1$$
$$ x^2y' - 2 x  y    = x^4e^x -2x^3e^x+2e^xx^2+c_1x^2$$
$$ \left ( \dfrac y {x^2}\right )'  = e^x -2e^x \left (\dfrac 1 x - \dfrac 1 {x^2} \right )+\dfrac {c_1}{x^2}$$
Integrate:
$$ \left ( \dfrac y {x^2}\right )  = e^x - \left (\dfrac 2 x  \right )e^x-\dfrac {c_1}x+c_2$$
Finally:
$$ \boxed { y(x)= e^xx(x-2)+{c_1}x+c_2x^2}$$
