
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 the function $f(x)=\sin(\omega x+\varphi)(\omega > 0,0 < \varphi < \frac{\pi}{2})$, the distance between two adjacent intersection points of its graph and the $x$-axis is $\frac{\pi}{4}$, and the graph passes through point $M(\frac{\pi}{3},-1)$.
(1) Find the analytical expression of $f(x)$;
(2) The graph of function $f(x)$ is shifted to the right by $\frac{\pi}{8}$ units, and then the $x$-coordinate of each point on the graph is stretched to twice its original length (the $y$-coordinate remains unchanged), resulting in the graph of function $y=g(x)$. Find the range of values of the real number $k$ such that the equation $g(x)+k=0$ has exactly one real solution in the interval $[0,\frac{\pi}{2}]$.

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