
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 functions $f(x)=\left(\log_{2}x\right)^{2}-2\log_{\frac{1}{2}}x+1$, $g(x)=x^{2}-ax+1$.

$(1)$ Find the domain of the function $y=f(\cos(x-\frac{x}{3}))$;

$(2)$ If there exists $a\in\mathbb{R}$, for any $x_{1}\in\left[\frac{1}{8},2\right]$, there always exists a unique $x_{0}\in[-1,2]$, such that $f(x_{1})=g(x_{0})$ holds, find the range of the real number $a$.

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