
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) = a(x-1)^2 + \ln x$, where $a \in \mathbb{R}$.
1. When $a=2$, find the equation of the tangent line to the function $y=f(x)$ at point $P(1,f(1))$.
2. When $a=-1$, let the function $g(x)=f(x) + \ln x - 2x + 1 + m$. If the function $g(x)$ has two zeros in the interval $\left[\frac{1}{e}, e\right]$, find the range of values for the real number $m$.

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