We are tasked with finding the absolute maximum value of the function \( f(x) = \cos x + \sin^2 x \) on the interval \( x \in [0, \pi] \). To do this, we will first find the critical points of the function by taking its derivative, then evaluate the function at those critical points as well as at the endpoints of the interval.
Step 1: Find the derivative of the function
The function \( f(x) \) is given by: \[ f(x) = \cos x + \sin^2 x \] To differentiate this, we use the chain rule for the term \( \sin^2 x \): \[ f'(x) = -\sin x + 2 \sin x \cos x \] Simplifying, we get: \[ f'(x) = -\sin x + 2 \sin x \cos x = \sin x (2 \cos x - 1) \] Therefore, the derivative is: \[ f'(x) = \sin x (2 \cos x - 1) \]
Step 2: Find the critical points
Critical points occur where the derivative is equal to zero or undefined. Here, \( f'(x) = 0 \) gives: \[ \sin x (2 \cos x - 1) = 0 \] This equation has two factors: 1. \( \sin x = 0 \) leads to \( x = 0, \pi \) (since \( x \in [0, \pi] \)). 2. \( 2 \cos x - 1 = 0 \) gives \( \cos x = \frac{1}{2} \), which results in \( x = \frac{\pi}{3} \) (since \( \cos \frac{\pi}{3} = \frac{1}{2} \)). Thus, the critical points are \( x = 0, \frac{\pi}{3}, \pi \).
Step 3: Evaluate \( f(x) \) at the critical points and endpoints
We now evaluate \( f(x) = \cos x + \sin^2 x \) at \( x = 0, \frac{\pi}{3}, \pi \). - At \( x = 0 \): \[ f(0) = \cos 0 + \sin^2 0 = 1 + 0 = 1 \] - At \( x = \frac{\pi}{3} \): \[ f\left( \frac{\pi}{3} \right) = \cos \frac{\pi}{3} + \sin^2 \frac{\pi}{3} = \frac{1}{2} + \left( \frac{\sqrt{3}}{2} \right)^2 = \frac{1}{2} + \frac{3}{4} = \frac{5}{4} \] - At \( x = \pi \): \[ f(\pi) = \cos \pi + \sin^2 \pi = -1 + 0 = -1 \]
Step 4: Conclusion
The values of \( f(x) \) at the critical points and endpoints are:
- \( f(0) = 1 \) - \( f\left( \frac{\pi}{3} \right) = \frac{5}{4} \) - \( f(\pi) = -1 \)
Therefore, the absolute maximum value of \( f(x) \) on the interval \( [0, \pi] \) is \( \boxed{\frac{5}{4}} \), which occurs at \( x = \frac{\pi}{3} \).