
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 vectors $\overrightarrow{m} = (a\cos x, \cos x)$ and $\overrightarrow{n} = (2\cos x, b\sin x)$, with a function $f(x) = \overrightarrow{m} \cdot \overrightarrow{n}$ that satisfies $f(0) = 2$ and $f\left(\frac{\pi}{3}\right) = \frac{1}{2} + \frac{\sqrt{3}}{2}$,  
(1) If $x \in \left[0, \frac{\pi}{2}\right]$, find the maximum and minimum values of $f(x)$;  
(2) If $f\left(\frac{\theta}{2}\right) = \frac{3}{2}$, and $\theta$ is an internal angle of a triangle, find $\tan \theta$.

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