
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 that the function $f(x) = 2 + x^2 \cos\left(\frac{\pi}{2} + x\right)$ has its maximum and minimum values $M$ and $m$ respectively on the interval $[-a, a]$ $(a > 0)$, find the value of $M + m$.

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