
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 functions $f(x)=\ln x+ax,g(x)=a{x}^{2}+2x$, where $a$ is a real number, and $e$ is the base of the natural logarithm.
 $(1)$ If $a=1$, find the equation of the tangent line to the curve $y=f(x)$ at the point $(1,f(1))$;
 $(2)$ If the maximum value of the function $y=f(x)$ is $-2$, find the value of the real number $a$;
 $(3)$ If $a < 0$, and for any $x\in[1,e]$, $f(x)\leqslant g(x)$ always holds, find the range of values for the real number $a$.

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