I am working on the following problem:
Let $a > 0$, $f \in L^1(0,a)$ and define
$$ g(x) = \int_x^a f(t) t^{-1} dt, \quad 0 < x \leq a. $$ Show that $g \in L^1(0,a)$ and $\int_0^a g(x)dx = \int_0^a f(t) dt$.
I'm thinking that I should let $h(x,y) = \chi_{[x,a)} f(y) y^-1$ ($\chi_A$ the characteristic function of $A$) and then apply the Fubini and/or Tonelli theorems, but I can't quite figure out how. Can anyone give me a hint in the right direction?
Note that in the solution of the problem, things like integration by parts are not allowed, since I don't know whether $f$ is continuous.
Writing $f$ as the difference of two non-negative integrable and measurable functions, we can assume that $f$ is non-negative and integrable.
Define $h(x,y):=\chi_{\{0\leqslant x\leqslant y\lt a\}}f(y)y^{-1}$. Then by Fubini-Tonelli theorem (that is, Fubini for non-negative functions), we have $$\int_{[0,a]}g(x)dx=\iint_{[0,a]^2}h(x,y)dydx=\iint_{[0,a]^2}h(x,y)dxdy=\int_{[0,a]}f(y)dy.$$