Find the period of the function