<s>[INST] With the aid of series, show that if $f(z)=\frac{\operatorname{cos}z}{z^2-(\pi/2)^2}$, then $f$ is an entire function. Prove that if 
$$f(z)=
\begin{cases}
\frac{\operatorname{cos}z}{z^2-(\pi/2)^2}, & \text{when} \; z\neq \pm \pi/2, \\
-\frac{1}{\pi}, & \text{when} \; z=\pm \pi/2,
\end{cases}
$$
then $f$ is an entire function. 
The general method of proving such results from the book is by using the fact that if a function has a power series representation, then it is analytic in the circle of convergence. 
Hence, using this method, I first need to find the power series of $f$ when $z\neq \pm \pi/2$, and the proof is complete if I show that this series at $z=\pm \pi/2$, equals $-\frac{1}{\pi}$.
So I start with the Taylor series of the entire function $\operatorname{cos}z$, however, I'm having trouble dealing with the denominator $z^2-(\pi/2)^2$. How can I find the power series representation of this function?
I would greatly appreciate some help.
 [/INST] Taylor expanding $\cos z$ about $z=\frac{\pi}{2}$ one finds that:
\begin{equation}
\cos z=-\left(z-\frac{\pi}{2}\right)+\frac{1}{6}\left(z-\frac{\pi}{2}\right)^3+\ldots
\end{equation}
Similarly, Taylor expanding $\frac{1}{z+\frac{\pi}{2}}$ about $z=\frac{\pi}{2}$ one finds that:
\begin{equation}
\frac{1}{z+\frac{\pi}{2}}=\frac{1}{\pi}-\left(\frac{z-\frac{\pi}{2}}{\pi^2}\right)+\ldots
\end{equation}
We therefore find that the Laurent series expansion of $f\left(z\right)$ about $z=\frac{\pi}{2}$ is given by:
\begin{equation}
\begin{aligned}
f\left(z\right)&=\frac{\cos z}{z^2-\left(\frac{\pi}{2}\right)^2}\\
&=\left(\cos z\right)\left(\frac{1}{z+\frac{\pi}{2}}\right)\left(\frac{1}{z-\frac{\pi}{2}}\right)\\
&=\left[-\left(z-\frac{\pi}{2}\right)+\frac{1}{6}\left(z-\frac{\pi}{2}\right)^3+\ldots\right]\left[\frac{1}{\pi}-\left(\frac{z-\frac{\pi}{2}}{\pi^2}\right)+\ldots\right]\left(\frac{1}{z-\frac{\pi}{2}}\right)\\
&=-\frac{1}{\pi}+\ldots
\end{aligned}
\end{equation}
where all terms but $-\frac{1}{\pi}$ vanish when $z=\frac{\pi}{2}$; therefore, this series at $z=\frac{\pi}{2}$ equals $-\frac{1}{\pi}$. This can similarly be done with a series around $z=-\frac{\pi}{2}$ where we expand $\frac{1}{z-\frac{\pi}{2}}$ instead of $\frac{1}{z+\frac{\pi}{2}}$.
</s>