Period and phase shift for trigonometric functions