Let $f \colon \mathbb{R} \rightarrow \mathbb{R}$ be a measurable function such that $$ \int_{-\infty}^{\infty} |f|^p e^{-x^2} \,dx < \infty. $$ Define $g \colon \mathbb{R} \rightarrow \mathbb{R}$ to be $$ g(x) = \int_{0}^{x} f(x^{\prime}) d x^{\prime}.$$ Is it necessarily true that $$\int_{-\infty}^{\infty} |g|^p e^{-x^2} \,dx < \infty $$ ?
More generally, suppose $f \colon \mathbb{R}^m \rightarrow \mathbb{R}$ is a measurable function such that $$ \int |f|^p e^{-(x_1^2 + \ldots + x_m^2)} \,dx_1 \ldots dx_m < \infty. $$ and $g \colon \mathbb{R}^m \rightarrow \mathbb{R}$ is defined to be $$ g(x_1, x_2, .., x_m) = \int_{0}^{x_1} f(x_1^{\prime}, x_2, \ldots, x_m) \,d x_1^{\prime}.$$
Is it necessarily true that $$\int |g|^p e^{-(x_1^2 + \ldots x_m^2)} \,dx_1 \ldots dx_m < \infty $$ ?
There are weighted version of Hardy's inequality, for instance page 3 (it works for $p\gt 1$).
For general $m$, we can use an induction argument.