The fractions have the largest value when the denominators are smallest, and this occurs when x=0 or 2.
f(0)=1⅓, f(2)=1⅓. Now, take a value between 0 and 2, say 1: f(1)=1 which is smaller than 1⅓. f(½)=16/15, also smaller than 1⅓, so the absolute maximum is 1⅓.