f(t) = cos[(t-1)*pi/2] + k sin[pi*(t+w)] + c , c,k,w are constants
First solve which is equivalent to [tex]f(t+2)= f(t). Try a solution of the form so that and the equation becomes so that and a= 1 or a= -1. The general solution to the "associated homogenous equation" is exactly as you have.
To find a specific solution to [tex]f(t)- f(t+2)= 2sin((\pi/2)t), try a solution of the form so that so the equation becomes f(t)- f(t+2)= 2A sin(\pi/2)t)= 2 sin((\pi/2)t) and is satisfied if A= 1.
The solution is .