TITLE: Change of variable (translation) in complex integral
QUESTION [6 upvotes]: If I have a real integral, e.g. $\int f(x+2) \ dx$, I can substitute $y = x+2$, so $dy = dx$.
But if my function is complex, am I still allowed to do this? In which cases I cannot apply a translation?

REPLY [10 votes]: Daniel Fischer is correct. It is perfectly fine to do this (so long as you don't run into issues with poles). A more interesting question is evaluating real-line integrals that benefit from complex changes of variables. One thing people often do when taking the Fourier transform of the Gaussian, i.e. evaluating the integral (for $\omega\in\mathbb{R}$)
$$\int_{-\infty}^{\infty} e^{-i\omega t}e^{-t^2}dt,$$
is a complex change of variable and then equate it to a real-line integral. This implicitly relies on the function $\exp(-z^2)$ being holomorphic. Here's how it's done traditionally:
$$\int_{-\infty}^{\infty} e^{-i\omega t}e^{-t^2}dt = e^{-\frac{\omega^2}{4}}\int_{-\infty}^{\infty} e^{\frac{\omega^2}{4}}e^{-i\omega t}e^{-t^2}dt = e^{-\frac{\omega^2}{4}}\int_{-\infty}^{\infty}e^{-\left(-i\frac{\omega}{2}-t\right)^2}dt. $$
Then they say, let $y = -i\frac{\omega}{2}-t$ and then state that this is equal to
$$\int_{-\infty}^{\infty} e^{-y^2}dy$$
while wholly ignoring the complex nature of the line you are integrating over (you should be integrating over the line $y = -i\frac{\omega}{2}$). But since the integrand is holomorphic, you can argue very simply that it is indeed equal to what they claim by parameterizing a rectangular contour with top and bottom being $y=-i\frac{\omega}{2}$ and the real line, respectively (the sides can be shown to go to zero without too much difficulty). Since $\exp(-z^2)$ is holomorphic, any closed contour of it will give $0$, hence the top and bottom pieces being equal and why they are correct to claim what they do.
If $\exp(-z^2)$ were not holomorphic, we would need to invoke more involved complex analytic techniques to relate the complex line integral to the real line integral.
For completeness, we know that $\int_{-\infty}^{\infty}e^{-y^2}dy = \sqrt{\pi}$ and so we see that
$$\int_{-\infty}^{\infty} e^{-i\omega t}e^{-t^2}dt = \sqrt{\pi}e^{-\frac{\omega^2}{4}}.$$
This is not the only way to evaluate this integral, but it is one of the two or three ways I've seen to argue that the Gaussian is what is called an eigenfunction of the Fourier transform (meaning the Fourier transform of the Gaussian gives a Gaussian with some scaling changes). Another way is by doing parametric differentiation on the initial integral but this requires some measure theoretic arguments.