
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\ln x + \frac{a+1}{2}x^2 + 1$ ($a$ is a real constant).

(1) When $a=-\frac{1}{2}$, find the maximum and minimum values of the function $f(x)$ on the interval $[\frac{1}{e}, e]$.

(2) Discuss the monotonicity of the function $f(x)$.

(3) When $-1 < a < 0$, find the range of the real number $a$ such that $f(x) > 1 + \frac{a}{2} \ln (-a)$ always holds.

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