
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 $\vec{m}=(\sin x, -\frac{1}{2})$ and $\vec{n}=(\sqrt{3}\cos x, \cos 2x)$, and the function $f(x)=\vec{m}\cdot\vec{n}$.

$(1)$ Find the maximum value of the function $f(x)$ and its smallest positive period;

$(2)$ The graph of the function $y=f(x)$ is translated to the left by $\frac{\pi}{6}$ units to obtain the graph of the function $y=g(x)$. Find the range of $g(x)$ on the interval $\left[0, \frac{\pi}{2}\right]$.

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