A question from Introduction to Analysis by Athur Mattuck:
(a) Assume $f(x)$ integrable on $I$ and $a,x \in I$. Prove $F(x)=\int_{a}^{x}f(t)dt$ is continuous on $I$.
(b) Suppose $I$ is compact and $f(x)$ is integrable on $I$. Define $$G(x,y)= \int _{x}^{y} f(t)dt.$$ Prove there exist points $x_0$ and $y_0$ such that $G(x_0,y_0)=\max_{x,y \in I}G(x,y).$
(Don't try to use guessed-at theorems about functions of two variables.)
(a) can be proved easily. I have not learned functions of two variables.
I guessed the function $M(x)=\max_{x,y \in I}G(x,y)$ is continuous on $I$. If so, (b) can be proved. But I don't know how to prove $M(x)$.
I think that the suggestion of @Quantaliinuxite is to write:
$$G(x,y)=F(y)-F(x),$$
where the point $a$ had been selected as the minimum of the set $I$. This is possible because $I$ is compact.
Then you can use that
$$\max\limits_{x,y\in I}{G(x,y)}=\max\limits_{y\in I}{F(y)}-\min\limits_{x\in I}{F(x)},$$
and applying the Weierstrass theorem for the function $F$ in the compact $I$, it is obtained
$$\max\limits_{x,y\in I}{G(x,y)}=F(y_0)-F(x_0)=G(x_0,y_0).$$