# How to show that this function is continuous?

Let $$\psi(x,y)$$ be a continuous function in two real variables, and then define $$f(x) = \sup_{t \in [-x,x]} \psi(x,t)$$ It seems to me that the function $$f$$ should also be continuous for $$x \geq 0$$, but I'm not sure how to prove it. Is this true and how would you prove it?

• Assume $x \geq 0$ Aug 4 '19 at 19:26
• What have you tried? Aug 4 '19 at 21:33
• My only thought is that if you could show that $g(x,x^\prime) = \sup_{t \in [-x^\prime, x^\prime]} \psi(x,t)$ is continuous in $x$ and $x^\prime$ separately, then $f(x) = g(x,x)$ will be continuous as a corollary. To be honest, I posted this on the assumption that a theorem to this effect existed somewhere and I could cite it, and I was hoping someone could give me a reference. Aug 4 '19 at 22:23

HINT: use uniform continuity.

Fix $$x_0$$ and let $$\epsilon > 0$$. Choose $$t_0 \in \left[-x, x\right]$$ such that $$f(x_0) = \psi(x_0, t_0)$$. Since $$\psi$$ is continuous, there exists a $$\delta > 0$$ such that

$$|\psi(x, t) - \psi(x_0, t_0)| < \epsilon$$

for all $$(x, t)$$ in the closed ball of radius $$\delta$$ (let's say with respect to the norm $$\|\cdot\|_\infty$$) centered on $$(x_0, t_0$$). Hence

$$f(x) \ge \psi(x, t_0 - \operatorname{sgn}(t_0)\delta) > f(x_0) - \epsilon$$

for all $$x$$ such that $$|x - x_0| < \delta$$ (note that $$t_0 - \operatorname{sgn}(t_0)\delta \in [-x, x]$$).

Let $$M \gg x_0$$. By compactness and continuity, $$\psi$$ is uniformly continuous on $$E = [-M, M] \times [-M, M]$$. Thus we could have chosen $$\delta$$ to be the "universal delta" for $$\psi$$ over $$E$$. Hence, analogously,

$$f(x_0) > f(x) - \epsilon$$

and therefore $$|f(x) - f(x_0)| < \epsilon$$.