Let $X$ be a compact metric space. Assume that $f: X \to \mathbb{R}$ is upper-semi continuous and $g:X \to \mathbb{R}$ is a lower semi-continuous. Assume that $\sup \{ f(x)+g(x) : x \in X \}$ is boundedfinite. Is it true that $$\sup \{ f(x)+g(x) : x \in X \}$$ is attiendattained? I doubt that the answer is positive. If so, under what minimumminimal conditions is it true? For sure, I don't want to assume the continuity. For instance, can we assume some extra assumptionconditions on the space $X$?