Limit at odd integer for $x$ 
$$\lim_{x\to a}\frac{1}{(a^2-x^2)^2}\cdot\left(\frac{a^2+x^2}{ax}-2\sin\frac{a\pi}{2}\sin\frac{\pi x}2\right)=?$$ if $a$ is an odd integer.

The way I set out is first assuming $a=1$ and seeing if I can spot some pattern. Now, if I rewrite this limit out as:
$$\lim_{x\to 1}\frac{1}{(1-x^2)^2}\cdot\left(\frac{1+x^2}{x}-2\sin\frac{\pi x}2\right)=?$$ 
Now, you can clearly see that the denominator is of the form $0^4$ (due to the $(1-x^2)^2$), whereas the numerator is, at max, $0^2$ (due to the $x^2$). Since denominator has a higher power of zero than the numerator, I believe that the limit won't exist.
However, my textbook says this limit exists and has a finite value. So, I wish to ask what is the fault in my reasoning.
 A: Note that for $a=1$ with $x=1+y$ and $y\to 0$
$$\frac{1}{ (1-x^2)^2 }\cdot\left(\frac{1+x^2}{x}-2\sin\frac{\pi x}2\right)
=\frac{1}{ (y^2+2y)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2\cos\frac{\pi y}2\right)=...$$
and by Taylor's series
$$\cos \frac{\pi y}2=1-\frac{\pi^2 y^2}8+o(y^2)$$
then
$$...=\frac{1}{ (y^2+2y)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2\cos\frac{\pi y}2\right)
=\\=\frac{1}{ y^2(y+2)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2+\frac{\pi^2 y^2}4+o(y^2)\right)=\\=\frac{1}{ y^2(y+2)^2 }\cdot\left(\frac{y^2+2y+2-2-2y+\frac{\pi^2 y^2}4+o(y^2)}{y+1}\right)=\\=\frac{1}{ (y+2)^2 }\cdot\left(\frac{1+\frac{\pi^2 }4+o(1)}{y+1}\right)\to\frac14+\frac{\pi^2}{16}$$
For the general case just let $x=az$ with $z\to 1$ and note that
$$\lim_{x\to a}\frac{1}{(a^2-x^2)^2}\cdot\left(\frac{a^2+x^2}{ax}-2\sin\frac{a\pi}{2}\sin\frac{\pi x}2\right)=\\
=\lim_{z\to 1}\frac1{a^4}\frac{1}{(1-z^2)^2}\cdot\left(\frac{1+z^2}{z}-2\sin\frac{a\pi}{2}\sin\frac{\pi a z}2\right)$$
which can be solved with the same approach.
Notably note that for $z=1+y$ and $y\to 0$
$$\frac1{a^4}\frac{1}{ (1-z^2)^2 }\cdot\left(\frac{1+z^2}{z} -2\sin\frac{a\pi}{2}\sin\frac{\pi a z}2 \right)
=\frac1{a^4}\frac{1}{ (y^2+2y)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2\cos\frac{a \pi y}2\right)=...$$
and by Taylor's series
$$\cos \frac{a\pi y}2=1-\frac{a^2\pi^2 y^2}8+o(y^2)$$
then
$$...=\frac1{a^4}\frac{1}{ (y^2+2y)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2\cos\frac{a\pi y}2\right)
=\\=\frac1{a^4}\frac{1}{ y^2(y+2)^2 }\cdot\left(\frac{y^2+2y+2}{y+1}-2+\frac{a^2\pi^2 y^2}4+o(y^2)\right)=\\=\frac1{a^4}\frac{1}{ y^2(y+2)^2 }\cdot\left(\frac{y^2+2y+2-2-2y+\frac{a^2\pi^2 y^2}4+o(y^2)}{y+1}\right)=\\=\frac1{a^4}\frac{1}{ (y+2)^2 }\cdot\left(\frac{1+\frac{a^2\pi^2 }4+o(1)}{y+1}\right)\to\frac1{4a^4}+\frac{\pi^2}{16a^2}$$
