Solution.
Set f(w)=w+zwa−1 and for 0<ε<∣z∣<R and α∈(0,π), let γε,R,α be the boundary of
{z∈C∣ε<∣z∣<R and α<Argz<2π−α},
where we take the standard branch of Argz with branch cut on the positive real axis. On the arc CR of radius R, we have
∣∣∫CRf(w)dw∣∣=∣∣∫α2π−αRei(a−1)θ+zRa−1ei(a−1)θiReiθdθ∣∣≤∫02πR−∣z∣Radθ=R−∣z∣2πRaR→∞0,
since a<1, so this contribution tends to 0 uniformly in α. Similarly, on the arc Cε of radius ε,
∣∣∫Cεf(w)dw∣∣≤∣z∣−ε2πεaε→0,
since a>0, uniformly in α as well. Finally, in the limit as α→0, the contribution from the segment [εei(2π−α),Rei(2π−α)] becomes
∫εRtei(2π−α)+zta−1ei(a−1)(2π−α)ei(2π−α)dtα→0e2πi(a−1)∫εRt+zta−1dt.
Indeed, the integrand is bounded and [ε,R] is compact, so we may apply dominated convergence to send α→0. f only has one residue at w=−z, which is
Res(f;−z)=(−z)a−1,
which is well-defined since Rez>0, so −z avoids the positive real axis. Thus, by the residue theorem and sending α→0, ε→0, and R→∞, we get
(1+e2πi(a−1))∫0∞x+zxa−1dx=2πi(−z)a−1⟹∫0∞x+zxa−1dx=1+e2πi(a−1)2πi(−z)a−1.