Consider a function $f: \mathbb{R}^d \times \mathbb{R}^k \to \mathbb{R}_+$, such that $(\theta, x) \mapsto f(\theta, x)$ is continuous, and $x \mapsto f(\theta, x)$ is Lebesgue integrable for every $\theta \in \mathbf{R}^d$. Let now $\Theta \subseteq \mathbf{R}^d$ be compact. I am trying to prove that the supremum function $g(x) := \sup_{\theta \in \Theta} f(\theta, x)$ is Lebesgue integrable as well.
Anyone that can help? Many thanks in advance.
Counterexample with $d=1$: Say $\phi:\Bbb R\to[0,\infty)$ is continuous with compact support, $\phi\ne0$. Let $$f(\theta,x)=\begin{cases}\phi\left(x-\frac1\theta\right),&\theta>0, \\0,&\theta\le0,\end{cases}$$ $\Theta=[0,1]$.