Solution:
$\left(D^{2}-6 D+9\right) y=\frac{e^{3 x}}{x^{2}}$
For complementary solution,
$f(D)=0$
$\therefore\left(D^{2}-6 D+9\right)=0$
Roots are: $D=3,3 \quad$ Real roots but repeatative.
The complementary solution of given diff. eqn is,
$\quad \therefore y_{c}=\left(c_{1}+x c_{2}\right) e^{3 x}$
For particular solution,
By method of variation of parameters,
$y_{p}=y_{1} p_{1}+y_{2} p_{2}$
$\begin{aligned} \text { where } \boldsymbol{p}_{1}=& \int \frac{-y_{2} X}{w} d x \\ p_{2} &=\int \frac{y_{1} X}{w} d x \\ w &=\left| \begin{array}{cc}{y_{1}} & {y_{2}} \\ {y_{1}^{\prime}} & {y_{2}^{\prime}}\end{array}\right| \end{aligned}$
$\begin{aligned} w &=\left| \begin{array}{cc}{e^{3 x}} & {x e^{3 x}} \\ {3 e^{3 x}} & {e^{3 x}+3 x e^{3 x}}\end{array}\right|=e^{6 x} \\ p_{1} &=\int \frac{-y_{2} X}{w} d x=\int \frac{x e^{3 x}}{e^{6 x}} \cdot \frac{e^{3 x}}{x^{2}} d x=\int \frac{-1}{x} d x=-\log x \end{aligned}$
$p_{2}=\int \frac{y_{1} X}{w} d x=\int \frac{e^{3 x}}{e^{6 x}} \cdot \frac{e^{3 x}}{x^{2}} d x=\int \frac{1}{x^{2}} d x=\frac{-1}{x}$
The particular integral of given diff. eqn is given by,
$\quad \therefore y_{p}=-e^{3 x} \log x-e^{3 x}=-e^{3 x}(\log x+1)$
The general solution of given diff. eqn is given by,
$y_{g}=y_{c}+y_{p}=\left(c_{1}+x c_{2}\right) e^{3 x}-e^{3 x}(\log x+1)$