
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Consider the function $f(x) = 2\cos^2 x + \sqrt{3} \sin 2x - 1$.
(1) Determine the maximum value of $f(x)$ and the corresponding value of $x$.
(2) Determine the intervals where $f(x)$ is monotonically decreasing.
(3) Given $x \in \left[-\frac{\pi}{6}, \frac{\pi}{3}\right]$, find the range of $f(x)$.

Present the answer in LaTex format: \boxed{Your answer}
user