
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\left(x\right)=\ln x+x^{2}-kx$ and the tangent line equation at point $\left(1,f\left(1\right)\right)$ is $x+y+m=0$.<br/>$(1)$ Find the values of real numbers $k$ and $m$;<br/>$(2)$ Find the maximum value of $f\left(x\right)$ on $\left[1,e\right]$ (where $e$ is the base of the natural logarithm).

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