If $f\in C[0,1)$, $\int_{0}^{1}f^{2}(t)dt =\infty$, can one construct $g\in C[0,1)$ so $\int_{0}^{1}g^{2}dt < \infty$, $\int fgdt = \infty$?

If a real $f\in C[0,1)$ satisfies $\int_{0}^{1}f^{2}(t)dt =\infty$, can one explicitly construct $g\in C[0,1)$ such that $\int_{0}^{1}g^{2}dt < \infty$ and $\int_0^1 fgdt = \infty$?

There must must exist such a function $g\in L^{2}(0,1)$ because of the Uniform boundedness principle of Functional Analysis. This comes from assuming there is no such $g \in L^{2}[0,1]$, and considering the family of bounded linear functionals $\Phi_{x}(g)=\int_{0}^{x}fgdt$ on $L^{2}[0,1]$ which then satisfy $\sup_{x \in (0,1)}|\Phi_{x}(g)| < \infty$ for every fixed $g \in L^{2}[0,1]$. The conclusion is that $\|\Phi_{x}\|=\int_{0}^{x}|f|^{2}dt$ is bounded in $x$, contrary to assumption.

However, in the case that $f$ is continous on $[0,1)$, it seems to me that there should be a way to construct a continuous $g$ on $[0,1)$, but I don't see it. Feel free to assume $f$ is continuously differentiable on $[0,1)$ if it helps. This is not a homework problem ... I'm curious if there is a construction under reasonable circumstances.


Put $\displaystyle F(x)=\int_0^x f(t)^2dt$, and $\displaystyle g(x)=\frac{f(x)}{1+F(x)}$. Clearly $g$ is continuous on $[0,1)$. Now you have $\displaystyle F^{\prime}(x)=f(x)^2$, hence $\displaystyle g(x)^2=\frac{F^{\prime}(x)}{(1+F(x))^2}$, and $\displaystyle f(x)g(x)=\frac{F^{\prime}(x)}{1+F(x)}$. Now it is easy to finish.