In method of undetermined coefficients to solve ODEs , why do we multiply repeated terms by x till no repetition exists ? Is there a proof ?
For example for a second order non-homogeneous linear ODE with constant coefficients, if the solution to the corresponding homogeneous ODE is
$$y_c(x)=c_1 x\sin(x)+c_2 x\cos(x)$$ and the function in the non-homogeneous part is $$f(x)=x\sin(x)$$ then the particular solution is assumed to be $$y_p=Ax\sin(x)+Bx\cos(x)+C\sin(x)+D\cos(x)$$ But since the particular solution contains the homogeneous solution , we have to multiply by x twice in this example so that the particular solution is different than the homogeneous solution. $$y_p=Ax^3\sin(x)+Bx^3\cos(x)+Cx^2\sin(x)+Dx^2\cos(x)$$
Does this idea come from the following idea : if a second order homogeneous linear ODE with constant coefficients has 2 real repeated roots , we take one root to constitute the first solution , while the second solution is the first one multiplied by x ( proved by Reduction of order).