Using undetermined coefficients to solve the ODE $y'' + 6y = −294x^2e^{6x}$ Solve the given differential equation by the undetermined coefficients method:
$$y'' + 6y = −294x^2e^{6x}.$$
For this problem I got the answer as: 
c
$$C_2 \sin (\sqrt{6x}) + C_1\cos(\sqrt{6x}) + e^{6x}(-7x^2 + 4x -17/21)$$
but I still didn't get the right answer for it. I'm Not sure what's going wrong. Thanks. 
 A: Check by plugging the solution in the equation. The homogeneous part certainly fits (after fixing the square root typo). Then for the non-homogeneous part,
$$y''+6y=36e^{6x}(-7x^2 + 4x -17/21)+12e^{6x}(-7x^2 + 4x -17/21)(-14x+4)+e^{6x}(-14)+e^{6x}(-7x^2 + 4x -17/21)\\
=-294x^2e^{6x}.$$
Well done.
A: For the complementary solution, you need to solve $y"+6y=0$. Use the substitution $y=e^{\lambda x},~\lambda >0$ and some manipulation to get $\lambda=i\sqrt{6}$ or $\lambda=-i\sqrt{6}$ which imply $y_1=C_1e^{i\sqrt{6}x},~y_2=C_2e^{-i\sqrt{6}x}$. Applying Euler's identity and regrouping terms gives us
\begin{equation*}
y=c_3\cos(\sqrt{6}x)+C_3\sin(\sqrt{6}x).
\end{equation*}
The particular solution will be of the form
\begin{equation*}
y_p=A_1e^{6x}+A_2e^{6x}x+A_3e^{6x}x^2.
\end{equation*}
Differentiate this twice and insert into the differential equation. Simplify and equate the coefficients. You should get the particular solution to be
\begin{equation*}
y_p=-\frac{17e^{6x}}{21}-7e^{6x}x^2+4e^{6x}x.
\end{equation*}
Try it again and let me know if you are still having problems. 
