Question:
I would like to know whether the following statement is true:
For every continuous function $f:[0,1]\to\mathbb{R}$ there is a Riemann-integrable function $g:[0,1]\to\mathbb{R}$ with values in $[-1,1]$ such that $\int f\cdot g=\int |f|$.
Motivation:
I am trying to prove that the canonical bounded linear injection $X\to X^{**}$ of a normed space into its double (continuous) dual is isometric, for the specific case of $X=C[0,1]$ in the $L^1$-norm, without using Hahn-Banach, and without using the Lebesgue integral.
So I want to constructively cook up for each continuous $f$ a functional $\alpha$ on $C[0,1]$ of norm 1 which maps $f$ to its norm.
From Lebesgue integration we know: the dense inclusion $C[0,1]\to L^1[0,1]$ yields an isomorphism $L^\infty[0,1]\cong(L^1[0,1])^*\to (C[0,1])^*$, so every functional (of unit norm) on $C[0,1]$ must be given by integration against an essentially bounded function (with essential supremum equal to 1). I am hoping to get such a function which is Riemann integrable.
Some thoughts:
A naive guess is to take $g_0=|f|/f$, i.e. the 'sign' of $f$, and set it to be $0$ (say) on points where $f$ is zero. Then $g_0=1_{\{f>0\}}+0\cdot 1_{\{f=0\}}-1_{\{f<0\}}$.
This $g_0$ is measurable (the sets $\{f>0\},\{f<0\}$ are open as $f$ is continuous) with essential supremum equal to 1. But I am afraid this (for suitable $f$) is NOT Riemann integrable for the following reason. Riemann integrability of this bounded function is equivalent to being continuous outside a set of measure zero. If I am not mistaking, the discontinuity set of $g_0$ is precisely $\partial\{f=0\}$, the boundary of the zero set of $f$. Since every closed set of $[0,1]$ is the zero-set of a continuous function (e.g. the 'distance to that set'), it suffices to construct a closed set of nonzero measure consisting solely of boundary points. For example the closure of a nowhere dense set (i.e. a closed with empty interior) of positive measure will do. The (closure of the) fat Cantor set is an example of such a set.
My problem is that this $f$ (the distance function) does not take both positive and negative values, and I could imagine that an adjustment of the behaviour of $g_0$ at $\{f=0\}$ could 'compensate' for this.