
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 $x \in \mathbb{R}, a \in \mathbb{R}$ and $a \neq 0$, the vectors $\overrightarrow{OA} = (a\cos^2x, 1)$, $\overrightarrow{OB} = (2, \sqrt{3}a\sin 2x - a)$, and $f(x) = \overrightarrow{OA} \cdot \overrightarrow{OB}$.  
$(1)$ Find the analytical expression of the function $f(x)$, and when $a > 0$, find the intervals of monotonic increase for $f(x)$;  
$(2)$ When $x \in [0, \frac{\pi}{2}]$, the maximum value of $f(x)$ is $5$, find the value of $a$;  
$(3)$ When $a = 1$, if the inequality $|f(x) - m| < 2$ holds true for all $x \in [0, \frac{\pi}{2}]$, find the range of the real number $m$.

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