I have a dependent variable Y(t) which depends on an independent variable X(t) in the following way:

Y(t) = p_0*X(t)+p_1*X(t-1)+p_2*X(t-2)+...+p_n*X(t-n) where p_i=cosnt, 0<=p_i<=1 and sum(p_0+...+p_n)=1. So, given a history of n consecutive variables X(t), I can always calculate the "current" Y(t).

I want to do the opposite as well, given Y(t), Y(t-1),...., Y(t-n), calculate directly X(t). I could do it with brute force or maybe even with a pen and paper by writing out some monstrous algebraic equation but is there a neat way to invert this thing and solve for X(t)? Thanks a lot for any ideas!