
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{a}{(x+1)^2}$ $(a \in \mathbb{R})$.

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

$(2)$ Given $g(x) = x^3 - x^2$, if for all $x_1 \in \left[ -\frac{2}{3}, 1 \right]$ and all $x_2 \in \left[ \frac{1}{3}, 2 \right]$, the inequality $(x_1+1)f(x_1) + 3 \geqslant g(x_2)$ always holds, find the range of the real number $a$.

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