I was looking at this lovely answer to finding the characteristic function of a standard normal random variable.
Unfortunately I am stuck on a pair of equalities, the first one is the following:
$$ \int_{-L}^L \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{1}{2} \left( x - j \omega \right)^2 } \mathrm{d} x = \int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z $$
I understand that a change of variable has took place. But I have only ever proven the change of variable formula with real numbers so it's not completely obvious to me why this should work. Is it because the reals are just a subset of the complex field?
Moreover the fact that we can write the limits of the complex integral as two points in the complex plane is because the integrand function is holomorphic so we don't care for the path that connects the point, correct?
The second one is:
$$ \left(\int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z\right) \\ = -\int_\mathcal{C} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{L}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L-j \omega}^{-L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z $$
Where the contour $\mathcal{C}$ is given by $-L \to L \to L - j \omega \to -L - j \omega \to -L$
Here I am quite lost, I don't understand how the contour is defined an neither how the equality is achieved. Maybe an extra step in-between the two equalities could help me.
Suppose that $f(z)$ is analytic on and inside a contour $\gamma$ and we want to integrate $f$ along the line connecting the points $(-L-jw)$ and $(L-jw)$ then we can define it as $\gamma(t) = t$ where $(-L-jw)\leq t\leq (-L-jw)$ hence we have
$$\int_\gamma f(z)dz = \int^{L-jw}_{-L-jw}f(t)\,dt$$
Similarily we can define the path as $\gamma(t) = t-jw$ where $-L \leq t\leq L$ and we have
$$\int_\gamma f(z)dz = \int^{L}_{-L}f(t-jw)\,dt$$
Here we are using the parametrization rule
For the second one I think the integration is done a long a rectangle contour and since the function is entire by the residue theorem the integration long the contour is equal to 0.