Consider a function $f(x,y)$ smooth in both variables and $f(x,y) = 0$ for $x \in \mathbb R\backslash K$ for some compact set $K$.
I know that for each $x$, there is a constant $M_x$ such that $|f(x,y)| \leq M_x g(y)$, where $g$ is a known function. However, I do not know how $M_x$ depends on $x$, so I do not know that $\sup_x M_x < \infty$ a priori.
Question: Does the compact support of $f(x,y)$ in $x$ imply
$$
\sup_x |f(x,y)| \leq \sup_x M_x g(y) \equiv M g(y)?
$$
It would be sufficient if, for example, the $M_x$ is a continuous and compactly supported function in $x$. It is certainly compactly supported, as we have $|f(x,y)| = 0$ for $x \not \in K$. But continuity is not clear to me.
Unfortunately, I do not have much else to offer regarding my own attempts.
Edit:
For non-continuous functions, pointwise bounds do not imply uniform bounds. Just because $|f(x)| \leq M_x$ for all $x \in K$ and $f(x) = 0$ for $x \not \in K$, we do not know that $\sup_x |f(x)| < \infty$ (for example $f(x) = \frac{1}{x}$ for $0<x<1$ and 0 otherwise).
What I have more in the above case is that $\sup_x |f(x,y)| < \infty$ for $y$ fixed. But I do not see how to deduce that $\sup_x g_x(y) < \infty$ from this.
How would I approach this problem? Do I need more than the stated properties?
Idea for a proof:
I could consider instead the equivalent inequality
$$
\frac{|f(x,y)|}{g(y)} \leq M_x.
$$
Now, the right-hand side is independent of $y$ and we find
$$
\sup_y \frac{|f(x,y)|}{g(y)} \leq M_x.
$$
Further, the left-hand side is still smooth and compactly supported (is this actually preserved under supremum norm?) in $x$, so its supremum exists
$$
\sup_x \sup_y \frac{|f(x,y)|}{g(y)} \equiv M < \infty.
$$
If it holds for the supremum, it is true for all $x,y$, and so
$$
|f(x,y)| \leq M g(y).
$$
Notice that for any $(x,y)$ you have that
$$\lvert f(x,y)\rvert\leq g_x(y)\leq\sup_\xi g_\xi(y),$$
and so $\sup_\xi g_\xi(y)$ is an upper bound for $\lvert f(x,y)\rvert$ (with only $y$ fixed). As the supremum is the smallest upper bound, we thus get that
$$\sup_x\lvert f(x,y)\rvert\leq\sup_x g_x(y)$$
for all $y$. Notice that there is nothing specific about $f$ and $g$ at play here, and so the same proof can be used to show that you can always take supremums in inequalities.