Is $\int_{-\infty }^\infty g(z,t)\,dt$ holomorphic? Let $\Omega \subset \mathbb C$ an open. I have a theorem that says that if $g:\Omega \times [a,b]\to \mathbb C$ is continuous such that $z\longmapsto g(z,t)$ is holomorphic, then $$z\longmapsto \int_a^b g(z,t)\,dt$$
is holomorphic. Is this result still true if we have $\mathbb R$ despite of $[a,b]$ ? i.e. if $g:\Omega \times \mathbb R\longrightarrow \mathbb C$ continuous, $z\longmapsto g(t,z)$ holomorphic, is $$z\longmapsto \int_{-\infty }^\infty g(z,t)\,dt$$
holomorphic ?
 A: It's true if the hypotheses of Fubini's theorem and Morera's theorem are satisfied.
From Wikipedia:

Morera's theorem states that a continuous, complex-valued function $f$ defined on an open set $D$ in the complex plane that satisfies $\displaystyle \oint_\gamma f(z) \, dz=0$ for every closed piecewise $C^1$ curve $\gamma$ in $D$ is holomorphic on $D$.

Let $\displaystyle f(z) = \int_{-\infty}^\infty g(z,t)\,dt$ and consider $\displaystyle\int_\gamma f(z)\,dz$ where $\gamma$ is a closed curve. Can we show that this integral along $\gamma$ must be $0$ no matter which curve $\gamma$ is? If so then Morera's theorem says $f$ is holomorphic.
\begin{align}
\int_\gamma f(z)\,dz & = \int_\gamma \int_{-\infty}^\infty g(z,t)\,dt \,dz \\[10pt]
& = \int_{-\infty}^\infty \int_\gamma g(z,t)\,dz\,dt & & \text{Is this step valid?} \\[10pt]
& = \int_{-\infty}^\infty 0\,dt & & \text{Because a holomorphic function was} \\
& & & \text{integrated along a closed curve. This} \\
& & & \text{won't work if $\gamma$ surrounds a bad enough} \\
& & & \text{singularity.} \\
& = 0.
\end{align}
What Fubini's theorem assumes is that the double integral of the absolute value of the function being integrated is finite.
