Consider finding the principal value of $$p.v. \int_{-\infty}^{\infty} \frac{e^{ax}}{1+e^x} dx$$
Q1: It is said the top path $\gamma_3$ is accessed by multiplying $-e^{2\pi i a}$. So why is the integral being multiple by $e^{2\pi i a}$ and no vertical translation is made for $\gamma_1$
PS: Do coming up with these contours take some ingenuity? Because I don't think I would think about using a rectangle had I not seen the solution.
PSS: The Residue theorem gives $\pi/4$

