Question about the particular part in the following non homogeneous recurrence :
$$a_n - 6a_{n-1} + 9a_{n-2} = n * 3^n $$
I have the following particual part : $$ a_n = n * 3^n$$
Now the solution of the homogenous part is $$x_1 = 3, x_2 = 3$$ and is of the form $$a_n = (An * B)* 3^n$$
What im struggling with is understanding how this helps me solve for the particual part. The solution to the particual part is: $$ a_n = (Cn^3 + Dn^2) * 3^n$$ how i got to it was $$n^2 * (Cn + D) * 3^n$$ now the part i dont understand is why is there $$(Cn + D)$$ and not just $ Cn * 3^n$
Edited