The function f(x)\displaystyle {f{{\left({x}\right)}}} has a domain of all real numbers, is periodic and has a period of p=18\displaystyle {p}={18}. The graph of one complete period is shown below.
2468101214161820-2246-2
Find the following values:
f(2)=\displaystyle {f{{\left({2}\right)}}}=  
f(31)=\displaystyle {f{{\left({31}\right)}}}=  
f(397)=\displaystyle {f{{\left({397}\right)}}}=