
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) = x^3 + mx^2 - m^2x + 1$ where $m$ is a constant and $m > 0$, and the function has a maximum value of $9$.

(I) Find the value of $m$ and the monotonic intervals of the function;

(II) If a line with a slope of $2$ is a tangent line to the curve $y = f(x)$, find the equation of this line.

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