Example using Cauchy's Theorem and integrating over a contour This is an example out of Stein and Shakarachi Complex Analysis.  My question is, Why do they choose $f(z) = \frac{(1 - e^{iz})}{z^2}?$  


$f(z) = \frac{(1 - e^{iz})}{z^2}$
when z is on the real axis ...
$f(z) = \frac{(1 - e^{ix})}{x^2}$ where x is real
$f(z) = \frac{1 - (\cos(x)+i\sin(x))}{x^2}= \frac{1 - \cos(x)}{x^2}-i \frac{\sin(x)}{x^2}$
so the integral of $\frac{1 - \cos(x)}{x^2}$ is the real part of the integral of $f(z)$
