This post is in response to this thread on Reddit.
The original question was essentially to evaluate the integral:
∮C(z−2)(z−3)e2zdz on the circle defined by ∣z∣=2. This presents an obvious challenge, as a pole exists on this curve, which means that Cauchy's integral formula and the residue theorem cannot be used to evaluate this integral as is. For brevity's sake, let's call our integrand f(z).
The way around this problem is to modify the curve so that the pole no longer occurs on it. Below is one such modified curve:
As no pole occurs within C' and f(z) is defined along and in C', we know by the Cauchy integral theorem that:
∮C′(z−2)(z−3)e2zdz=0 and splitting ∮C′f(z)dz into subintegrals from A to B and B to A, we get:
∫AB(z−2)(z−3)e2zdz+∫BA(z−2)(z−3)e2zdz=0. Along AB:
z=2eiθ, dz=2ieiθdθ and δ≤θ≤2π−δ, where δ=sin−1(2ϵ).
Along BA:
z=2+ϵeiθ, dz=2iϵeiθdθ and θ goes from 23π to 2π.
Therefore our contour integral becomes:
∫δ2π−δ(2eiθ−2)(2eiθ−3)e2⋅2eiθ2ieiθdθ+∫23π2π(2+ϵeiθ−2)(2+ϵeiθ−3)e2⋅(2+ϵeiθ)iϵeiθdθ=0. As ϵ→0, the first of these integrals becomes the same as ∮Cf(z)dz and the second integral becomes:
ϵ→0lim∫23π2π(2+ϵeiθ−2)(2+ϵeiθ−3)e2⋅(2+ϵeiθ)iϵeiθdθ=ϵ→0limie4∫23π2π(ϵeiθ)(ϵeiθ−1)e2ϵeiθϵeiθdθ=ϵ→0limie4∫23π2πϵeiθ−1e2ϵeiθdθ=ie4∫23π2π−11dθ=−ie4∫23π2πdθ=ie4∫2π23πdθ=ie4π. Our contour integral therefore becomes:
∮C(z−2)(z−3)e2zdz+ie4π=0. Hence our original integral is:
∮C(z−2)(z−3)e2zdz=−ie4π.