How does one compute the reciprocal of $\cos(z)=\sum_{n=0}^{\infty}(-1)^n\frac{z^{2n}}{2n!}$ I've been going through some past exam papers and came across  a question which asks you to compute the Taylor expansion of $\sec(z)$ given that $$\sec(z)=\frac{1}{\cos(z)},$$ and $$\cos(z)=\sum_{n=0}^{\infty}(-1)^n\frac{z^{2n}}{(2n)!}.$$ 
The problem is I dont know how to compute the reciprocal, and I have found it difficult to find how to do so online. Could someone point me in the direction of some webpage that goes through such problems( I can't afford a book), or perhaps explain a general method for computing the reciprocal in such cases ?
 A: If$$\sec z=a_0+a_1z+a_2z^2+\cdots,$$then, since $\sec$ is an even function, $a_k=0$ when $k$ is odd. So, in fact,$$\sec z=a_0+a_2z^2+a_4z^4+\cdots$$On the other hand$$\cos(z)\sec(z)=1\iff\left(1-\frac{z^2}{2!}+\frac{z^4}{4!}+\cdots\right)\left(a_0+a_2z^2+a_4z^4+\cdots\right)=1$$and therefore$$\left\{\begin{array}{l}a_0=1\\a_2-\frac{a_0}{2!}=0\\a_4-\frac{a_2}{2!}+\frac{a_0}{4!}=0\\\vdots\end{array}\right.$$From these equalities, you can abtain te first coefficients of the Taylor series of $\sec$.
A: Hint. One may recall the generating function of the Bernoulli numbers,
$$
\frac{u}{e^u-1}=\sum_{n=1}^{\infty} B_n \frac{u^n}{n!}, \quad |u|<2\pi,\tag1
$$ then one may apply it by writing
$$
\begin{align}
\frac{1}{\cos z}&=\frac{2}{e^{iz}+e^{-iz}}
\\\\&=\frac{2e^{iz}}{e^{2iz}+1}
\\\\&=\frac{2e^{iz}}{e^{2iz}-1}-\frac{4e^{iz}}{e^{4iz}-1}
\\\\&=\frac{1}{iz}\left(\frac{2iz}{e^{2iz}-1}-\frac{4iz}{e^{4iz}-1}\right)e^{iz}
\end{align}
$$ and by recalling that
$$
e^{iz}=\sum_{n=0}^\infty\frac{(iz)^n}{n!}.
$$
A: Hint:
Just perform the division of $1$ by the expansion of $\cos z$ by increasing powers, up to the order you want.
You should find in a few lines that it begins with
$$\sec z=1+\frac{z^2}2+\frac{5z^4}{24}+\frac{61z^6}{720}+\dotsm,$$
if I'm not mistaken.
