An integral involving a smooth function

Let $f : [0,1] \to \mathbb [0,1]$ be a smooth function (class $C^\infty$) that is not necessarily real-analytic.

Let $g : (-1, \infty) \to \mathbb R$ be the function defined by $g(x) = \int_0^1 f(t) \, t^x dt$.

Is $g$ necessarily a real-analytic function on $(-1, \infty)$?


The change of variables $t=e^{-s}$ shows that $g(x)=F(x+1)$ where $F$ is the Laplace transform of $s\mapsto f(e^{-s})$ which is, in our case continuous and bounded. So $F$ is analytic in $\{z:\Re z>0\}$, and consequently $g$ is real analytic on $(-1,+\infty)$.


It is easier to do it in complex.

To prove that $g(z)$ is holomorphic in the open half-plane $D=\{z:\mathrm{Re}\,z>-1\}$, it is enough to verify that $\oint_{\partial T} g(z)dz=0$ around every triangle $T$ in $D$.

If $T\subset D$ is a triangle, then take $m=\min\limits_{z\in T}\mathrm{Re}\,z>-1$. Then $$ \int_{t=0}^1 \oint_{z\in\partial T} |f(t)| |t^z| \, |dz|\,dt < \max|f| \cdot \int_{t=0}^1 \oint_{z\in\partial T} t^{m} \, |dz|\,dt < \frac{\max|f| \cdot length(\gamma)}{m+1} < \infty, $$ so we may exchange the integrals as $$ \oint_{\partial T} g(z)dz = \oint_{\partial T} \left(\int_{t=0}^1 f(t) t^z dt\right)dz = \int_{t=0}^1 f(t) \left(\oint_{\partial T} t^z dz\right)dt = \int_{t=0}^1 f(t) \cdot 0 \,dt = 0. $$