How to find the particular solution to this second degree differential equation $y'' - 6y' + 9y = 2xe^{2x}$? I have this solution:
$$y'' - 6y' + 9y = 2xe^{2x}$$
The general solution to it is
$$y(x) = C_1e^{3x} + C_2xe^{3x}$$
But I cannot figure out how to find the particular solution.
This is what I did. I imposed this as particular solution:
$$y_0(x) = e^{2x}.(ax+b)$$
and now I have to find $a$ and $b$. So I take the first and second derivative of $y_0(x)$ and I replace it in original equation and now what I have is
$$x(a-2)+b-2a=0$$
and even now I can not find the solution to $a$ and $b$.
Could someone kindly help me find the solution to this problem?
 A: HINT
You can alternatively find the general solution to this ODE as follows:
\begin{align*}
y'' - 6y' + 9y = 2xe^{2x} & \Longleftrightarrow (y'' - 3y') - (3y' - 9y) = 2xe^{2x}\\\\
& \Longleftrightarrow (y' - 3y)' - 3(y' - 3y) = 2xe^{2x}\\\\
& \Longleftrightarrow w' - 3w = 2xe^{2x}\\\\
& \Longleftrightarrow (e^{-3x}w)' = 2xe^{-x}\\\\
& \Longleftrightarrow e^{-3x}w = -2xe^{-x} + 2e^{-x} + c\\\\
& \Longleftrightarrow y' - 3y = -2xe^{2x} + 2e^{2x} + ce^{3x}
\end{align*}
Can you take it from here?
A: $$y'' - 6y' + 9y = 2xe^{2x}$$
$$(ye^{-3x})''= 2xe^{-x}$$
Integrate twice.
A: You found correctly the solution for the homogeneous case. Since the rhs is given by $2xe^{2x}$ we can assume a particular solution of the form $y_p= e^{2x}(ax+b)$ as you said. Then, finding $y_p',y_p''$ and substituting in the DE we have $(b-2a)e^{2x}+axe^{2x}=0e^{2x}+2xe^{2x}$ which is equal when $\begin{cases}-2a+b=0,\\a+0b=2 \end{cases}$ with solution $\boxed{(a,b)=(2,4)}$. Therefore, by superposition the general solution is given by $$\boxed{y(x)=C_{1}e^{3x}+C_{2}e^{3x}+e^{2x}(2x+4)}$$ with $C_1,C_2$ arbitrary constants.
