
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)=\frac{ax+b}{x}e^{x}$, where $a$, $b\in \mathbb{R}$, and $a > 0$.

$(1)$ If $a=2$, $b=1$, find the extreme values of the function $f(x)$;

$(2)$ Let $g(x)=a(x-1)e^{x}-f(x)$. When $a=1$, for any $x\in (0,+\infty)$, $g(x)\geqslant 1$ holds, find the maximum value of $b$;

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