
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)=m(\sin x+\cos x)-4\sin x\cos x$, where $x\in[0, \frac{\pi}{2}]$, and $m\in\mathbb{R}$.
(1) Let $t=\sin x+\cos x$, where $x\in[0, \frac{\pi}{2}]$. Express $f(x)$ as a function of $t$, denoted as $g(t)$, and find the range of $t$.
(2) If the inequality $f(x)\geq 0$ holds for all $x\in[0, \frac{\pi}{2}]$, find the range of the real number $m$.
(3) If the equation $f(x)-2m+4=0$ has real roots in the interval $[0, \frac{\pi}{2}]$, find the range of the real number $m$.

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