
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{a}=(\sin (\frac{\omega}{2}x+\varphi), 1)$ and $\overrightarrow{b}=(1, \cos (\frac{\omega}{2}x+\varphi))$, where $\omega > 0$ and $0 < \varphi < \frac{\pi}{4}$, define the function $f(x)=(\overrightarrow{a}+\overrightarrow{b})\cdot(\overrightarrow{a}-\overrightarrow{b})$. If the function $y=f(x)$ has a period of $4$ and passes through point $M(1, \frac{1}{2})$,

(1) Find the value of $\omega$;

(2) Find the maximum and minimum values of the function $f(x)$ when $-1 \leq x \leq 1$.

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