How to find asymptotic expansion of $\frac{1}{\cos(z)}$ 
Find the asymptotic expantion of coefficients of the exponential generating function $f(z)=\frac{1}{\cos(z)}$ using all of its poles.

My work:
I know that:
$$
\frac{1}{\cos \left( z \right)}=\sum_{n\ge 0}{E_{2n}}\frac{z^{2n}}{\left( 2n \right) !}
$$
To find the poles we solve $\cos(z)=0$ where z is a complex number. Getting, $\chi_k=\pi/2+\pi k$
where $k \in Z$.
Now wrie $\frac{1}{\cos(z)} \sim  \frac{1}{z-\chi_k}= \frac{-1}{\chi_k} \frac{1}{1-z/\chi_k}$.(I'm not sure if this what I am supposed to do).
Then
$$
E_{2n}=-\left( 2n \right) !\sum_{k\in Z}{\frac{1}{\chi _k}}\frac{1}{\chi _{k}^{n}} \\ 
E_{2n}=-\left( 2n \right) !\left( \frac{1}{\left( \frac{\pi}{2} \right) ^{n+1}}+\sum_{k\ge 1}{\left( \frac{1}{\chi _{k}^{n+1}}+\frac{1}{\chi _{k_-}^{n+1}} \right)} \right) 
$$
Then I can look at the internal sum in the last equation and try to simplify it.
Edited:
$f(z)=\frac{1}{cos(z)} \sim \frac{Res(f(z),\chi_k)}{z-\chi_k}$ where $\chi_k=\frac{\pi}{2}+2\pi k$ the
poles of $f(z)$ and  $Res(f(z),\chi_k)= lim_{z\to \chi_k} (z-\chi_k) f(z)$.
After calculations we get that:
$\chi_0= \pi /2$ with Res= -1, $\chi_{-1} = -\pi / 2$ with Res = 1 , $\chi_1=3\pi /2$ with Res = 1, $\chi_{-2}= -3\pi /2$ with Res = -1 etc.
So, $f(z)=\frac{1}{cos(z)} \sim \frac{Res(f(z),\chi_k)}{z-\chi_k} \sim \frac{-1}{z-1/2 \pi}  +\frac{1}{z+1/2 \pi} +\frac{1}{z-3/2 \pi} + \frac{-1}{z+3/2 \pi}+....$
Then if we expand these geometric coulomns and look at their coefficients we get:
$\frac{E_{2n}}{n!} \sim (2/ \pi)^{n+1} + (-2/ \pi)^{n+1} - (2/ 3\pi)^{n+1} +(2/ 3\pi)^{n+1} - (2/ 5\pi)^{n+1} -(-2/ 5\pi)^{n+1}-(2/ 7\pi)^{n+1} +(-2/7\pi)^{n+1}...)$
Thus, $E_{2n} \sim (2n)! (  (2/ \pi)^{n+1} + (-2/ \pi)^{n+1}  - (2/ 5\pi)^{n+1} -(-2/ 5\pi)^{n+1}-(2/ 7\pi)^{n+1} +(-2/7\pi)^{n+1}...)$
Thus $E_{2n} \sim (2n)! (  (2/ \pi)^{n+1} + (-2/ \pi)^{n+1} +O(2/ 5\pi)^{n})$
What do you think.
Any guide will be so appreciated.
 A: Here are the two facts you need to solve the problem:

*

*If $f(z)=\sum_{n\ge 0} a_nz^n$ is analytic at the origin with radius of convergence $R$, then $a_n\in O\big((1/R+\epsilon )^{n}\big)$ for all $\epsilon>0$. When $f$ is meromorphic, recall that $R$ is the infimum of the magnitudes of the poles of $f$.


*If $f(z)$ has a pole of order $1$ at $a$, then $f(z)-\frac{\text{Res}(f,a)}{z-a}$ has a removable singularity at $a$, and the same poles as $f$ elsewhere. Here, $\text{Res}(f,a)=\lim_{z\to a}(z-a)f(z)$.
This means that if $f$ only has simple poles, then by subtracting out $\frac{\text{Res}(f,a)}{z-a}$ as $a$ ranges over the poles of $f$, then coefficients of what remains will go to zero at an arbitrarily fast rate.
For example, $\frac1{\cos z}$ has a pole at $\chi_0=\pi/2$, and the residue at that pole is $\text{Res}(f,\pi/2)=\lim_{z\to\pi/2}\frac{z-\pi/2}{\cos z}=-1$. Therefore, $f-\frac{-1}{z-\pi/2}$ has one fewer pole. This is akin to what you attempted, but you forgot to compute the residue.
Similarly, you can subtract the pole at $\chi_{-1}=-\pi/2$, whose residue is $1$. When you do this, the current state of affairs is
$$
\frac{1}{\cos z}+\frac1{z-\pi/2}-\frac1{z-(-\pi/2)}
$$
and the poles of what remains are only at $3\pi/2,5\pi/2,\dots$ and $-3\pi/2,-5\pi/2,\dots$. The infimum the magnitude of these values is $3\pi/2$, which proves that
$$
{E_{n}}/{n!}-(2/\pi)^{n+1}+(-2/\pi)^{n+1}\in O\big((2/3\pi+\epsilon)^n)
$$
You can then keep subtracting out poles, accumulating more terms on the left hand side, and decreasing the error on the right hand side.

In general, this method does not give an equality for the coefficients of $f(z)$ in terms of an infinite series of the subtracted poles. It happens to work for $f(z)=1/\cos z$. However, in general, even after subtracting out all the poles of $f$, there may still be an entire function left over which contributes to the coefficents of $f$.
A: You found that
$$
\frac{1}{{\cos z}} = \sum\limits_{k = 0}^\infty  {\left( {\frac{{( - 1)^k }}{{z + \left( {k + \frac{1}{2}} \right)\pi }} - \frac{{( - 1)^k }}{{z - \left( {k + \frac{1}{2}} \right)\pi }}} \right)}  = \sum\limits_{k = 0}^\infty  {( - 1)^k \frac{{(2k + 1)\pi }}{{\left( {k + \frac{1}{2}} \right)^2 \pi ^2  - z^2 }}} .
$$
This expansion is actually convergent for all $z \neq (k+1/2)\pi$, $k \in \mathbb{Z}$. If $|z|<\frac{\pi}{2}$, then, by the geometric series,
$$
\frac{1}{{\left( {k + \frac{1}{2}} \right)^2 \pi ^2  - z^2 }} = \frac{1}{{\left( {k + \frac{1}{2}} \right)^2 \pi ^2 }}\frac{1}{{1 - \left( {z/\left( {k + \frac{1}{2}} \right)\pi } \right)^2 }} = \sum\limits_{n = 0}^\infty  {\frac{{z^{2n} }}{{\left( {k + \frac{1}{2}} \right)^{2n + 2} \pi ^{2n + 2} }}} .
$$
Thus
\begin{align*}
\frac{1}{{\cos z}} & = \sum\limits_{k = 0}^\infty  {( - 1)^k (2k + 1)\pi \sum\limits_{n = 0}^\infty  {\frac{{z^{2n} }}{{\left( {k + \frac{1}{2}} \right)^{2n + 2} \pi ^{2n + 2} }}} } 
\\ &
 = \sum\limits_{n = 0}^\infty  {( - 1)^n \left[ {( - 1)^n \left( {\frac{2}{\pi }} \right)^{2n + 1} 2(2n)!\sum\limits_{k = 0}^\infty  {\frac{{( - 1)^k }}{{(2k + 1)^{2n + 1} }}} } \right]\frac{{z^{2n} }}{{(2n)!}}} ,
\end{align*}
provided $|z|<\frac{\pi}{2}$. Consequently,
$$
E_{2n} = ( - 1)^n \left( {\frac{2}{\pi }} \right)^{2n + 1} 2(2n)!\sum\limits_{k = 0}^\infty  {\frac{{( - 1)^k }}{{(2k + 1)^{2n + 1} }}}
$$
for all $n\geq 0$.
