
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)=\ln (x+1)- \frac{ax^{2}+x}{(1+x)^{2}}$,
(1) When $a=1$, find the equation of the tangent line to the function $f(x)$ at $x=e-1$;
(2) When $\frac{2}{3} < a\leqslant 2$, discuss the monotonicity of the function $f(x)$;
(3) If $x > 0$, find the maximum value of the function $g(x)=(1+ \frac{1}{x})^{x}+(1+x)^{ \frac{1}{x}}$.

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