Periodic Function Definition Math