
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 $\overrightarrow{a}=(2\sin x,\cos^2x)$ and $\overrightarrow{b}=(\sqrt{3}\cos x,2)$, let $f(x)= \overrightarrow{a}\cdot \overrightarrow{b}$.  
$(1)$ Find the smallest positive period and the intervals of monotonic decrease for $f(x)$.  
$(2)$ Find the maximum and minimum values of the function $f(x)$ in the interval $\left[0, \frac{\pi}{2}\right]$.

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