Complex integration using singularities I'm working on Ablowitz and Fokas' Complex Variables. On section 3.5 on singularities, problem 2 reads: 
Evaluate the integral of f(z) over the unit circle centered at the origin:
a) $f(z)=z/(z^2 + w^2)$
b) $f(z)=1/(8z^3+1)$ 
Normally, I would proceed with finding the residue, but for a) I do not know how to handle the $w^2$ term once I break the function down to geometric series. If $|w|>1$ , it seems to me that the function is analytic since z is not equal to w for any z on the unit circle, so the integral just vanishes. 
For b) the expression I get by partial fractions is too complicated, and I'm suspecting that the point of this exercise is not to manipulate series since it is a chapter on singularities.
Is there a smarter way to evaluate these integrals if I have information about their singularities? Any help is appreciated.
 A: You can use Cauchy's Integral Theorem which gives that the area over a holomorphic (i.e. complex analytic) function is exactly zero if the closed contour contains no singularities.
Or you could evaluate the following way just to convince yourself: The unit circle is $z=e^{i\theta}$ where $\theta\in[0,2\pi]$, so we have: $dz=ie^{i\theta}d\theta$.
So, for (a) we get
$$\int_{|z|=1} \frac{z}{z^2+w^2} = \int_0^{2\pi}\frac{ie^{2i\theta}}{e^{2i\theta}+w^2}d\theta=\cdots$$
NOTE When you come to do the residue theorem later on, you will see that it generalises the integral theorem to allow for singularities within the closed contour of integration. Basically we just sum up the residues at the singularities and multiply by $2\pi i$. Easy as $2\pi i$ !
A: I worked it out, I can factor $z^2$ out of the denominator in a) and $8z^3$ in b) and that gets me the geometric series I want to find the residue.
At first, I blindly began with partial fractions and ended up with a mess, and I figured it is pretty unlikely they are asking for something that technically painstaking in a section that does not even focus on integration, but turns out it was just another routine geometric series. 
Note: @pbs was correct, both times! (I got Mathematica to solve them in polar coordinates and got the correct result).
