
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) = a(\cos^2{x} + \sin{x}\cos{x}) + b$

(1) Find the interval(s) where $f(x)$ is monotonically increasing when $a > 0$.

(2) When $a < 0$ and $x \in [0, \frac{\pi}{2}]$, the range of $f(x)$ is $[3, 4]$. Find the values of $a$ and $b$.

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