
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 the function $f(x) = \sqrt{3}\sin\omega x\cos\omega x + \sin^2\omega x - \frac{1}{2}$ has a period of $\pi$.
(1) Find the expression for $f(x)$.
(2) Determine the maximum and minimum values of $f(x)$ for $x \in \left[0, \frac{\pi}{2}\right]$.

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