Here is my question:
Let $f:[0,1]\to\mathbb{C}$ be a continuous function. Show that $$g(z) = \int_0^1 f(t)e^{tz^2} dt$$ defines an entire function.
I know that one approach can be made by using Morera's Theorem.
Let $C$ be a closed contour. Applying Fubini's Theorem, we get $$\oint_C g(z)dz = \oint_C \int_0^1 f(t)e^{tz^2}dtdz = \int_0^1 f(t) \left( \oint_C e^{tz^2} dz \right)dt = \int_0^1 0dt = 0.$$ If we show that $g$ is continuous in $\mathbb{C}$, the proof is completed. However, I am not sure how to do it. For instance, I think that the continuity follows from the fact that the integrand $f(t)e^{tz^2}$ is continuous for all $(t,z)\in[0,1]\times\mathbb{C}$, but I don't know what theorem I should use to conclude it.
This is a standard Complex Analysis theorem:
Theorem: Let $U$ be an open subset of $\Bbb C$, let $[a,b]$ be a closed and bounded interval of $\Bbb R$, and let $F\colon[a,b]\times U\longrightarrow\Bbb C$ be a continuous function such that, for each $t\in[a,b]$, the function$$\begin{array}{ccc}U&\longrightarrow&\Bbb C\\z&\mapsto&F(t,z)\end{array}$$is analytic. Then the function$$\begin{array}{rccc}f\colon&U&\longrightarrow&\Bbb C\\&z&\mapsto&\int_a^bF(t,z)\,\mathrm dt\end{array}$$is analytic too.
And it's not hard to prove. Take $z_0\in U$ and take $r>0$ such that $\overline{B_r(z_0)}\subset U$. For each $t\in[0,2\pi]$, let $\gamma(t)=z_0+re^{it}$. Then, for each $t\in[a,b]$ and each $z\in B_r(z_0)$,$$F(t,z)=\frac1{2\pi i}\int_\gamma\frac{F(t,u)}{u-z}\,\mathrm du$$and therefore\begin{align}f(z)&=\int_a^bF(t,z)\,\mathrm dt\\&=\int_a^b\frac1{2\pi i}\int_\gamma\frac{F(t,u)}{u-z}\,\mathrm du\,\mathrm dt\\&=\frac1{2\pi i}\int_\gamma\frac{\int_a^bF(t,u)\,\mathrm dt}{u-z}\,\mathrm du.\end{align}So, since the function $u\mapsto\int_a^bF(t,u)\,\mathrm dt$ is continuous, $f|_{B_r(z_0)}$ is analytic, because then the function$$\begin{array}{ccc}B_r(z_0)&\longrightarrow&\Bbb C\\z&\mapsto&\displaystyle\int_\gamma\frac{\int_a^bF(t,u)\,\mathrm dt}{u-z}\,\mathrm du\end{array}$$is analytic. Since the restriction of $f$ to each disk $B_r(z_0)$ is analytic, $f$ is analytic.