Is the integral of a measurable function measurable?

Let $f(t,x):(0,\infty) \times \mathbb{R}^d \rightarrow \mathbb{R}$ be a bounded and $\mathcal{B}([0,\infty))\otimes \mathcal{B}(\mathbb{R}^d)$-measurable function. Is the function
$$g(t,x) = \int_0^t f(s,x) ds $$
a $\mathcal{B}([0,\infty))\otimes \mathcal{B}(\mathbb{R}^d)$-measurable function? Why?

Solutions Collecting From Web of "Is the integral of a measurable function measurable?"

I will answer your first question. Your second question is not well-defined, as some of the commenters have noted. Returning to your first question, without any assumptions whatsoever on the measure spaces, I think the answer is no, but under some very weak assumptions – in particular that the two measure spaces in question are $\sigma$-finite, and that the integral of the function in question is finite – this is part of the content of the Fubini/Tonelli theorems for integration on product measures. So for your first question, since you’re considering $\mathbb{R}^n$ and Borel measures, then the answer is yes so long as the integral is finite.

To see this, we first prove a result about measurable sets. If $(X,\Sigma_1,\mu), (Y,\Sigma_2,\nu)$ are the measure spaces, with $A \in \Sigma_1$ and $B \in \Sigma_2$ of finite measure, then take $E = A \times B$. If $E(x)$ and $E(y)$ be the “slices” of $E$ given by fixing $x$ and $y$, respectively, then $\nu(E(x)) = 1_A(x)\nu(B)$ and $\mu(E(y)) = \mu(A) 1_B(y)$ are measurable in $X$ and $Y$, respectively. By $\sigma$-finiteness, then we can take increasing sequences of products $A_i \times B_i$ to show that the same result holds for $A,B$ measurable. So this proves the desired result for when $f$ is a characteristic function. Then, to obtain the general result for measurable $f(x,y)$ on $X \times Y$, we use the fact that $f$ can be approximated pointwise by a sequence of simple functions.

I haven’t actually proven (only sketched) my claims above. For more details, you can see any analysis textbook on integration.