Why is this function well-behaved? Why is this function $f(x) = \dfrac{\cos(\frac{\pi x}{2})}{\pi(1-x^2)}$ well behaved at $x=\pm 1$? 
I thought it would have an asymptote at $x=\pm 1$ due to the denominator, but apparently its value at $x=\pm  1$ is $\frac{1}{4}$. Why is that so? 
 A: Although $f$ is not yet defined at $\pm 1$, after writing
$$f(x) = -\frac{1}{\pi(1 + x)} \frac{\cos(\pi x / 2)}{x - 1}$$
one can recognize that
$$\lim_{x \to 1} f(x) = -\frac{1}{2\pi} \left.\frac{d}{dx} \right|_{x = 1} \cos\left(\frac{\pi x}{2}\right) = \frac{1}{2\pi} \frac{\pi}{2} \sin\left(\frac{\pi}{2}\right) = \frac 1 4$$
As such, we can extend $f$ to be defined and continuous at $1$ by assigning its value there to be $\frac 1 4$.
A: The denominator of $\dfrac x x$ at $x=0$ is $0$, but that doesn't mean there is a vertical asymptote there.  Notice that $\dfrac x x$ remains equal to $1$ as $x$ approaches $0$.  The fraction $\dfrac 5 x$ has a vertical asymptote because when $x$ is near $0$ then $x$ goes into $5$ a very very large number of times.
In the case of $f(x) = \dfrac{\cos(\frac{\pi x} 2)}{\pi(1-x^2)}$, the numerator and denominator both approach $0$ as $x\to\pm1$.  Therefore this is like $x/x$ rather than like $5/x$.
L'Hopital's rule will get you the limit without much effort and also without much insight.
$$
f(x) = \frac{\cos(\frac{\pi x}{2})}{\pi(1-x^2)} = \frac 1 {1+x} \cdot \frac 1 \pi\cdot  \frac{\cos(\frac\pi 2 x)}{1-x} = \frac 2 {1+x} \cdot  \frac{\sin(\frac\pi2(1-x))}{\frac \pi 2(1-x)} = \frac 2 {1+x} \cdot \frac{\sin u} u.
$$
Then we have $\displaystyle\lim_{u\to0}\frac{\sin u} u$, which you have probably seen done by squeezing.
