
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 a quadratic function $f\left(x\right)$ satisfies $f\left(0\right)=2$ and $f\left(x+1\right)-f\left(x\right)=2x-1$. Find:<br/>$(1)$ The analytical expression and monotonic intervals of the function $f\left(x\right)$;<br/>$(2)$ When $x\in \left[-1,2\right]$, find the maximum and minimum values of the function $f\left(x\right)$.

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