Knowing me this is going to turn out to be a very silly question but I'm very confused.
I just had an exam and one of the questions was to find the particular solution to
$$ \frac {d^2y}{dx^2} + 4\frac {dy}{dx}+6y=6x $$ when $$ y(0)=0$$ $$y'(0)=0$$
So my working was: $$ m^2+4m+6=0 $$ $$ m=-2\pm \sqrt{2}i$$ So the complementary equation is $y=e^{-2x}(A\sin\sqrt{2}x+B\cos\sqrt{2}x)$
Since parts of the complementary equation do not appear in the RHS of the ODE, we expect an integral $y=Cx$
Then $$\frac {dy}{dx}= C$$$$\frac {d^2y}{dx^2}=0$$ $$0+4C+6Cx=6x$$
Now, this is where I got stuck since there is no C which satisfies that equation. Because it was an exam I just said C=1 so I could work out A and B and hopefully gain method marks.
The issue is that you have 2 equations to solve for constants, but only 1 constant. This is because of your choice of the particular solution's form. Instead, choose $y_p = Cx+D$, so $y_p' = C$ and $y_p'' = 0$ as before, but substitution yields $4C+6Cx+6D = 6x$ . Thus,
$$ 6C = 6 \\ 4C+6D = 0 $$
Which can be solved to get $C=1, D=-\frac{2}{3}$, so the particular solution is $y_p = x-\frac{2}{3}$. You can verify this by substitution.
Intuitively, you need that constant term because $Cx$ will have a non-zero constant first derivative, but zero second derivative and $Cx$ itself has no constant term. This means you will have a non-zero constant on the left but no constant on the right to balance it out.