the g/h residue shortcut
An enormous fraction of the functions you integrate are quotients g(z) / h(z) where the numerator is fine but the denominator has a zero. When that zero is simple, there is an especially slick formula that avoids even forming the product (z - z_0) f(z) — you just plug into a ratio of values.
The rule: suppose f = g / h, where g and h are holomorphic at z_0, g(z_0) is not zero, and h has a simple zero at z_0 (meaning h(z_0) = 0 but h'(z_0) is not 0). Then f has a simple pole at z_0 and Res(f, z_0) = g(z_0) / h'(z_0). Where does h' come from? Apply the simple-pole limit: Res(f, z_0) = limit of (z - z_0) g(z) / h(z). Rewrite h(z) near z_0 using its tangent line, h(z) is approximately h'(z_0)(z - z_0) since h(z_0) = 0, so (z - z_0) / h(z) tends to 1 / h'(z_0), and the limit becomes g(z_0) / h'(z_0). The derivative of the denominator quietly does the cancellation for you.
This shortcut is a genuine time-saver for trigonometric and Fourier integrals, where the denominator is something like z^n - 1 or sin z whose derivative is clean. It pairs beautifully with the residue theorem when you must sum residues over many simple poles at once — for instance at all the n-th roots of unity, where h(z) = z^n - 1 gives h'(z) = n z^(n-1) and every residue is g(z_k) / (n z_k^(n-1)). It applies only at simple zeros of h; a double zero of h sends you back to the order-m formula.
For f(z) = z / (z^4 - 1) at the simple pole z_0 = i (a fourth root of 1), take g(z) = z and h(z) = z^4 - 1 so h'(z) = 4 z^3. Then Res(f, i) = g(i) / h'(i) = i / (4 i^3) = i / (-4 i) = -1 / 4.
Residue at a simple pole of a quotient is just g(z_0) divided by h'(z_0).
This requires the zero of h to be simple and g(z_0) not zero. If g(z_0) is also zero, the singularity may be removable or of lower order, and the bare formula g(z_0)/h'(z_0) can mislead — simplify the common factor first.