
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
Given the function $f(x) = 2\cos^2\left(\frac{x}{2}\right) + \sqrt{3}\sin x$.
(I) Find the maximum value of the function $f(x)$ and list the set of values of $x$ for which this maximum is attained;
(II) If $\tan\left(\frac{\alpha}{2}\right) = \frac{1}{2}$, find the value of $f(\alpha)$.

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