
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)=\ln x+\frac{1}{2}x^{2}-ax+a$ where $a\in \mathbb{R}$.

$(1)$ If the function $f(x)$ is monotonically increasing on $(0,+\infty)$, find the range of the real number $a$.

$(2)$ If the function $f(x)$ has extreme values at $x=x_{1}$ and $x=x_{2}$, where $x_{2}\geqslant ex_{1}$ ($e$ is the base of the natural logarithm), find the maximum value of $f(x_{2})-f(x_{1})$.

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