Finding the value of a trigonometric function using given values