Deforming contour in complex plane integration and wave equation I'm studying d'Alembert's equation with scalar field in a homogeneous medium in time and space. In particular the calculation of the Green function, that is the field irradiated by an impulsive source in space and time:
$$
\left(\nabla^2 - \frac{1}{c^2}\frac{\partial^2}{\partial t^2}\right) g(\mathbf{R},\tau)= \delta(\mathbf{R}) \delta(\tau)
$$
Obviously, uniqueness also requires the initial conditions on the function and the first derivative.
For the resolution, the book does the space-time Fourier transform of the equation, obtaining:
$$
[-K^2 + k^2] \tilde{G}(\mathbf{K},\omega)=1
$$
where $K^2=\mathbf{K}\cdot \mathbf{K}$, $k=\omega/c$.
Then it does the antitransformation, getting
$$
g(\mathbf{R},\tau)= \frac{1}{(2\pi)^4} \int_{-\infty}^{+\infty} d\omega \int d\mathbf{K} \frac{i(\mathbf{K}\cdot\mathbf{R}- \omega \tau)} {-K^2+k^2}
$$
Now, the text notes that, contrary to appearances, the latter expression does not unambiguously describe the green function, since we have not used the initial conditions anywhere. This is due to the improper nature of the integral for the presence of the poles $k=\omega/c=\pm K$. To give meaning to the integral it is necessary to deform the integration path to avoid the poles.
Then, without demonstrating how to get there, it verifies that, choosing as integration path not the real axis but a straight line parallel to it with positive imaginary part, the integral, solved by exploiting the residual theorem and the jordan lemmas, is a causal green function, that is with null initial conditions.
Could you explain why we can deform contour integration and why it corresponds to change initial conditions?
I probably have complex analysis gaps that prevent me from understanding. What is the theory necessary to understand and from where to study it?
Thank you
 A: We must view $\omega$ as a complex variable and the integrand as a meromorphic function of a complex variable, with simple poles at $\omega_{\pm} = \pm cK$.
\begin{equation}
\int_{-\infty}^{\infty}\frac{c^2e^{it\omega}}{(\omega - cK)(\omega + cK)}d\omega
\end{equation}

There are two distinct parts to the integral along $\mathbb{R}$:

*

*the principal value ($\mathsf{PV}$) of the integral is what we get when we integrate along the real line, except for the radius-$\epsilon$ semicircles, and then let $\epsilon$ shrink to 0;

*the numbers we pick up from integrating along the radius-$\epsilon$ semicircles and letting $\epsilon$ shrink to 0.

\begin{equation}
\begin{split}
&~\oint_{\gamma}\frac{c^2e^{itz}}{(z - cK)(z + cK)}dz\\
=&~ \textsf{PV}\int_{-\infty}^{\infty}\frac{c^2e^{it\omega}}{(\omega - cK)(\omega + cK)}d\omega \pm i\pi\frac{e^{itcK}}{2cK} \pm i\pi\frac{e^{-itcK}}{-2cK} + 0,
\end{split}
\end{equation}
where $\gamma$ is the limit curve of curves that that lie along the real line from $-R$ to $R$ but make small semicircles above or below the singularities, and then go along a large arc from $R$ back to $-R$. Jordan's Lemma ensures that the limit of the integral along the large arc is 0. The sign of $t$ determines whether one chooses an arc in the upper half-plane or the lower half-plane.
Each sign attached to a latter term depends on whether the semicircle went into the upper half-plane (clockwise around singularity) or into the lower half-plane (counter-clockwise around the singularity).

Moving the line away from the real line gives another expression for the integral and works because integrating around a box containing both $\mathbb{R}$ (deformed to avoid singularities) and $\mathbb{R}\pm i\epsilon$ (in the opposite direction) is 0.
Let $\Gamma$ be a box with two indentations that goes

*

*from $-R$ to $R$ along the real line,

*but avoids the singularities via semicircles,

*goes from $R$ to $R \pm i\epsilon$,

*goes from $R \pm i\epsilon$ to $-R + \pm i\epsilon$,

*and then from $-R \pm i\epsilon$ to $-R$.

The integrand has no singularities inside this box, so integrating around it yields 0 by Cauchy's Integral Theorem. As $R\to\infty$, the integrals along vertical edges drop to 0, so the $\mathsf{PV}$ of the integral along the real line (from $-\infty$ to $\infty$) plus the integral along $\mathbb{R} + i\epsilon$ (from $\infty + i\epsilon$ to $-\infty + i\epsilon$) is 0.
This means that the integral along $\mathbb{R} \pm i\epsilon$ is equal to the $\mathsf{PV}$ plus the terms picked up from the semicircles over or under the singularities at $\omega_{\pm} = \pm cK$:
\begin{equation}
\begin{split}
&~\int_{-\infty\pm i\epsilon}^{\infty \pm i\epsilon}\frac{c^2 e^{itz}}{(z - cK)(z+cK)}dz\\
=&~\textsf{PV}\int_{-\infty}^{\infty}\frac{c^2e^{it\omega}}{(\omega - cK)(\omega + cK)}d\omega \pm i\pi\frac{e^{itcK}}{2cK} \pm i\pi\frac{e^{-itcK}}{-2cK}
\end{split}
\end{equation}
This might also be written as
\begin{equation}
\begin{split}
&~\int_{-\infty}^{\infty}\frac{c^2 e^{it(\omega \pm i\epsilon)}}{(\omega \pm i\epsilon - cK)(\omega \pm i\epsilon + cK)}d\omega\\
=&~\textsf{PV}\int_{-\infty}^{\infty}\frac{c^2e^{it\omega}}{(\omega - cK)(\omega + cK)}d\omega \pm i\pi\frac{e^{itcK}}{2cK} \pm i\pi\frac{e^{-itcK}}{-2cK}
\end{split}
\end{equation}

From what I see in a textbook, some authors note that as $\epsilon\to 0$, $f(\omega \pm i\epsilon)\to f(\omega)$ for $f$ continuous at $\omega$. Then they cheat by dropping the $\pm i\epsilon$ in the numerator. In our case, we get the incorrect expression
\begin{equation}
\int_{-\infty}^{\infty}\frac{c^2 e^{it\omega}}{(\omega \pm i\epsilon - cK)(\omega \pm i\epsilon + cK)}d\omega
\end{equation}
because $\pm i\epsilon$ has been removed from the argument of the exponential. This notation gives the reader a warning that there are singularities encountered along $\mathbb{R}$, but the OP's experience shows that it must be used with care or not at all.

For more examples with diagrams, see Principal Value of an Integral in Mathematical Physics by Sadri Hassani.
