The series for cosine is found through putting y=cosx=a0+a1x+...+a[n]x^n
When x=0, 2(pi), 2k(pi), where k is an integer, cosx=1, so a0=1.
The derivative of y is y'=-sinx=a1+...+na[n]x^(n-1). When x=0, 2k(pi), sinx=0 and a1=0.
The second derivative of y is y"=-cosx=2a2+...+n(n-1)a[n]x^(n-2). When x=2k(pi), cosx=1, and 2a2=-1, a2=-1/2.
The third derivative and all odd derivatives are similarly zero when x=2k(pi), so a1, a3, a5, etc. =0.
The 4th derivative is cosx=n(n-1)(n-2)(n-3)a[n]x^(n-4). When x=2k(pi), cosx=1 and 24a4=1, so a4=1/24 or 1/4!.
The pattern continues indefinitely so cosx=1-x^2/2!+x^4/4!...+((-1)^p)x^2p/(2p)! where p is an integer.
cos(x-(pi)/2)=sinx=1-(x-(pi)/2)^2/2!+(x-(pi)/2)^4/4!...+((-1)^p)(x-(pi)/2)^2p/(2p)!