
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) = \sin x + a \cos x$ ($a \in \mathbb{R}$) that satisfies $f(\frac{\pi}{4} + x) = f(\frac{\pi}{4} - x)$ for any $x \in \mathbb{R}$, determine the maximum value of the function $g(x) = \sin x + f(x)$.

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