This is a question from Ahlfors, page $123$, number $1b$: Compute $\int_{|z|=2}z^n(1-z)^mdz$. He doesn't specify anything about $n$ and $m$ on the page, so I am not sure if they are natural numbers or integers. If they are natural numbers, then the integrand is analytic and so the integral is $0$, so I assume they aren't natural. So, I imagine we consider cases depending on which $n$ or $m$ is less than $0$ and which one is greater than or equal to $0$. When doing so, we either get a pole of order $n$ at $0$ or a pole of order $m$ at $1$. I can write these out in the standard residue form, but is there a way to "clean them up", so to speak? In particular, if you were, say, teaching a class on Complex Analysis, what would you expect from your students? (note: I am not a current student, just looking back through some old notes and problems from several years ago).
EDIT: In particular, I am talking about, for instance, when $n\geq 0$ and $m<0$, then we have $\int_{|z|=2}\frac{z^n}{(1-z)^m}dz=\frac{1}{(m-1)!}\lim_{z\rightarrow m}\frac{z^{m-1}}{dz^{m-1}}z^n$. But, $m<0$, so what is the negative-th derivative of $z^n$? Similarly, we can consider the case when $n<0$, $m\geq 0$ and $n,m<0$. (I feel like I am missing some cases). Moreover, this problem comes in Ahlfors book BEFORE Residue theory. So, maybe there is a better way to tackle it? I just wasn't seeing a nice way of using Cauchy's theorem.
EDIT (number 2): The question was asked here: Computing $\int_{|z|=2} z^n(1 - z)^m\ dz$ for $n,m\in\Bbb Z$, but I'm finding issues with the answer. In particular, I am not seeing how they arrived to their answer, and they are only dealing with one case.
EDIT (number 3, last update): The question was also asked here: Computing $\int_{|z|=2} z^n(1 - z)^m\ dz$, handling most of the cases. However, the case whenever both $n,m$ are strictly negative is still not clear to me.
From the context, Alhfors is assuming that $n$ and $m$ are integers (and otherwise, the integrand wouldn't be well-defined). Since he hasn't covered the residue theorem by that point in the book, presumably he's expecting students to use the form of Cauchy's Theorem on pp. 120--121. (I'm a bit surprised he doesn't prove Eq. 24 there, which is what I'm more familiar with as the usual form of Cauchy's Theorem. Maybe it's subsumed into the residue theorem).
Anyway, if this were my class, I would expect most correct answers from students to have an argument like:
That having been said, it's pretty much a standard exercise applying the residue theorem, and in fact the setup outlined above comes close to a proof of the residue theorem: Reduce an integral over the boundary of a region to integrals around small loops encircling each of an isolated set of poles, and compute those integrals via Cauchy's Theorem. (Turning that into a full proof involves some results about the topology of contours in the plane, and which I seem to recall that Ahlfors mostly (justifiably) sweeps under the rug anyway. Unfortunately, there's no easy way around the topological results necessary to go from Cauchy's Theorem for a circle or rectangle to the general case.)