
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^2\left(x - \frac{\pi}{6}\right) + \cos^2\left(x - \frac{\pi}{3}\right) + \sin x \cdot \cos x$, where $x \in \mathbb{R}$.

(1) Find the maximum value of $f(x)$ and the value of $x$ when the maximum value is obtained.
(2) Find the monotonic intervals of $f(x)$ on the interval $\left[0, \pi\right]$.

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