I am aware of the following result (found in Stein-Shakarchi):
Let $f:D\times [0,1]\to\mathbb C$ be a function where $D$ is an open connected set in $\mathbb C$ such that for each $s\in [0,1]$, $f(.,s)$ is holomorphic on $D$ and $f(.,.)$ is jointly continuous w.r.t. $D\times[0,1]$. Then $F(z):=\int_0^1 f(z,s)ds$ is holomorphic on $D$.
The proof uses Morera's theorem and the fact that the integral is approximated by a Riemann sum, and thus uses that we are on a bounded interval $[0,1]$.
My question is, under what condition can I replace $[0,1]$ with $(-\infty,\infty)$? In particular, consider the following function $$F(z)=\int_{-\infty}^{\infty} e^{-\pi x^2}e^{2\pi i x z}dx$$ where $z\in\mathbb C$. I want to show $F$ is holomorphic on all of $\mathbb C$.
Clearly I would like to use the theorem mentioned with $D=\mathbb C$. Here is my answer. Kindly tell me if it is correct.
Take $f(z,x)=e^{-\pi x^2}e^{2\pi i x z}$ which clearly satisfies the conditions of the theorem. To apply Morera's theorem, take any triangle $T$ and consider $\int_T \int_{-\infty}^{\infty} e^{-\pi x^2}e^{2\pi i x z}dxdz$.Since $\int_T \int_{-\infty}^{\infty}e^{-\pi x^2} dxdz<\infty$ we can interchange the integrals to obtain $\int_{-\infty}^{\infty} \int_T e^{-\pi x^2}e^{2\pi i x z}dzdx$. Now $f$ is holomorphic for each real $x$ and so by Cauchy Goursat, the inner integral is $0$. Thus, $F$ is holomorphic.
So effectively, if we assume that $\int_T \int_{-\infty}^{\infty} |f(z,s)|dsdz<\infty$ then we can interchange the order of integration and then under the same assumptions as the original theorem, we can get the answer. Please comment if this is right or not. I would love if you can really tell me the exact conditions when the bounded interval assumption can be weakened to $f$ being defined on an unbounded interval.