You can't, it's not true. For example, if for x not equal to 0 or 1, f(0)= f(1)= 0, then f does NOT assume maximum or minimum values on [0, 1].

Whatistrue is that anycontinuousfunction assumes a maximum and minimum on a closed and bounded interval.

The standard proof is a very complicated and involves showing that a continuous function maps a closed and bounded interval into a closed and bounded interval.