If f(x) is continuous and M(x) is the maximum value of f(x) in the closed interval [a,x], then prove that limxa+M(x)=f(a).

Problem: 

If f(x) is continuous and M(x) is the maximum value of f(x) in the closed interval [a,x], then prove that
limxa+M(x)=f(a).

Answer: 

It is true that if f(x) is continuous and M(x) is the maximum value of f(x) in the closed interval [a,x], then limxa+M(x)=f(a).