# Why do we multiply repeated terms by x in the method of undetermined coefficients ?

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).

• If any part of your guess for $y_p$ appears in $y_c$, then when you substitute it into the ODE that part of $y_p$ will end up equalling $0$. That explains why you need to guess something different than anything that appears in $y_p$, it doesn't explain why multiplying by $x$ is the best thing to do. – James Nov 6 '17 at 20:12
• You should solve the equation with variation of parameters or Laplace transformation. That is where the form for undetermined coefficients comes from. – Oscar Lanzi Nov 6 '17 at 20:59