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

$(1)$ When $a = \frac{1}{2}$, solve the inequality $f(x) \leqslant 0$;

$(2)$ If $a > 0$, solve the inequality $f(x) \leqslant 0$ with respect to $x$.

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