
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 that $O$ is the origin of coordinates, $\overrightarrow{OA} = (2\cos^2x, 1)$, $\overrightarrow{OB} = (1, \sqrt{3}\sin 2x + a)$ ($x \in \mathbb{R}, a \in \mathbb{R}, a$ is a constant), and $y = \overrightarrow{OA} \cdot \overrightarrow{OB}$.

(1) Find the analytical expression of $y$ as a function of $x$, denoted as $f(x)$;  
(2) If $x \in [0, \frac{\pi}{2}]$ and the maximum value of $f(x)$ is 2, find the value of $a$ and specify the intervals of monotonicity for the function $f(x)$, where $x \in \mathbb{R}$.

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