
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 (2x+ \varphi )+ \sqrt{3} \cos (x+ \varphi )(0 < |\varphi | < \pi )$, it is known to be monotonically decreasing on the interval $[0,\frac{\pi }{4}]$, and it satisfies $f(x)=f(\frac{\pi }{2}-x)$.

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

(2) After shifting the graph of $y=f(x)$ to the left by $\frac{\pi }{3}$ units to obtain the graph of $y=g(x)$, find the analytical expression for $g(x)$.

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