Determining the equation of a trigonometric function