Solution (source code)

= Solution

The function $g$ is measurable, and for fixed positive $y$ both terms are <integrable> over $0<x<1$ by linear substitution and integrability of $f$. Those substitutions give
$$
\int_0^1g(x,y)dx=\frac1y\left(\int_0^y f(t)dt-\int_0^{ay}f(t)dt\right)=-\frac1y\int_y^{ay}f(t)dt<0.
$$
The strict sign follows from positivity of $f$ on a nonempty <interval>, since $a>1$. Similarly each section in $y$ is absolutely <integrable> for fixed $x>0$, and
$$
\int_1^\infty g(x,y)dy=\frac1x\left(\int_x^\infty f(t)dt-\int_{ax}^\infty f(t)dt\right)=\frac1x\int_x^{ax}f(t)dt>0.
$$
If $g$ were absolutely <integrable> on the stated rectangle, Fubini would make the two finite iterated integrals equal. The first would be strictly negative and the second strictly positive, which is impossible. Therefore $\boxed{g\notin L^1((0,1)\times(1,\infty))}$. The one-dimensional section integrability does not rescue the missing product-space hypothesis.