anonymous 5 years ago How do I know when to use the method of undetermined coefficients vs. the variation of parameters?

eq: $4y \prime \prime-4y \prime-3y = \cos(2x)$ and i am told to use undetermined coefficients. in the next equation im told to use variation of parameters:$y \prime \prime+y=\sin(x)$ these seem like very similar eq why are there two seperate methods? how do i know when to use which?