How does one prove the given series? $$\sum_{n=0}^\infty\left(\frac{(-1)^n}{4n-a+2}+\frac{(-1)^n}{4n+a+2}\right)=\frac{\pi}{4}\sec\left(\frac{a\pi}{4}\right)$$
This series came up in xpaul's calculation during the process of answering my homework problem. I really appreciate his help for me but I am looking a method to prove the above series using a real analysis method because the link he cited (Ron G's answer) to help me to prove it is using the residue theorem. I worked for a while on this today but was unsuccessful. $$\begin{align}\sum_{n=0}^\infty\left(\frac{(-1)^n}{4n-a+2}+\frac{(-1)^n}{4n+a+2}\right)&=4\sum_{n=0}^\infty(-1)^n\frac{2n+1}{(4n+2)^2-a^2}\\&=\sum_{n=0}^\infty(-1)^n\frac{2n+1}{(2n+1)^2-\left(\frac{a}{2}\right)^2}\end{align}$$ Comparing with Taylor series for secant, hyperbolic secant, or any other well known series forms but I could not get any of them to work, perhaps someone else can? I would like a nice proof and avoiding residue method in order to complete my homework's answer. Would you help me? Any help would be appreciated. Thanks in advance.