# `f(x) = x + 2cos(x), [-pi,pi]` Find the local and absolute extreme values of the function on the given interval.

### 1 Answer | Add Yours

You need to evaluate the extreme values of the function on the interval [-pi,pi], hence, you need to evaluate the zeroes of the function f'(x).

You need to find the derivative of the function:

`f'(x) = 1-2sin x`

You need to solve for x the equation f'(x) = 0, such that:

`1 - 2sin x = 0 => 2sin x = 1 => sin x = 1/2 => x = pi/6 and x = 5pi/6`

You need to evaluate the values of the function at critical points` x = pi/6 ` and `x = 5pi/6.`

`f(pi/6) = pi/6+ 2cos(pi/6) = pi/6 + sqrt3`

Since `5pi/6 = pi - pi/6` and `2cos(5pi/6) = -2cos(pi/6) `

`f(5pi/6) = pi - pi/6 - 2cos(pi/6) =pi - pi/6 -sqrt 3`

You need to evaluate the function at the end points:

`f(pi) = pi + 2cos pi = pi - 2`

`f(-pi) = - pi + 2cos(-pi) = -pi - 2`

**Hence, evaluating the absolute maximum of the function, on interval `[-pi,pi],` yields` pi/6+sqrt3` and it occurs at `x = pi/6` and evaluating the minimum of the function yields -`pi-2` and it occurs at **`x = -pi.`