
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 maximum value of the function $y = a - b \cos(2x + \frac{\pi}{6}) (b > 0)$ is $3$, and the minimum value is $-1$.
$(1)$ Find the values of $a$ and $b$;
$(2)$ Find the range of the function $g(x) = 4a \sin(bx - \frac{\pi}{3})$ when $x \in [\frac{\pi}{4}, \frac{5\pi}{6}]$.

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