
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)=3\sin (2x+\varphi)$ where $(0 < \varphi < \frac{\pi}{2})$, its graph is shifted to the left by $\frac{\pi }{6}$ and then becomes symmetric about the $y$-axis.

$(1)$ Find the expression for the function $f(x)$.

$(2)$ Stretch the $x$-coordinates of each point on the graph of the function $y=f(x)$ by a factor of $2$ (the $y$-coordinates remain unchanged) to obtain the graph of the function $y=g(x)$. Find the intervals where $g(x)$ is decreasing.

$(3)$ Based on $(2)$, find the maximum and minimum values of the function $y=g(x)$ when $x \in \left[-\frac{\pi }{3},\frac{\pi}{2}\right]$.

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