Finding values using trigonometric functions