The example:
(1) x''(t) + y(t) = cos(t)
(2) x(t) = cos(t)
is trivially solvable by differentiating (2) twice and substituting into (1) to give: -cos(t) + y(t) = cos(t)
or y(t) = 2 cos(t)
Together with (2) that gives the solution; there is no need to use advanced techniques to solve this particular example.