Find range of the function y = 6 cos x - sin^{2}x + 6, in which x is greater than or equal to pi/4 and less than or equal to 3pi/4.

Solution:

We use the completing square formula to change the given function y = 6 cos x - sin^{2}x + 6 into y = (cos x + 3)^{2} - 4. The question asks what is the maximum and
minimum value when x is greater than or equal to pi/4 and less than or equal to 3pi/4.

Since the graph of y = cos x is monotonic decrease from x = 0 to x = pi, so, when x = pi/4, y has a maximum value. The maximum value is y = (cos pi/4 + 3)^{2} - 4 = 9.69.
When y = 3pi/4, y has a minimum value. The minimum value is y = (cos 3pi/4 + 3)^{2} - 4 = 1.29. For a detailed solution, please watch the video.