
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\sin x+b\cos x$ whose graph passes through the points $\left( \frac{\pi }{3},\,0 \right)$ and $\left( \frac{\pi }{2},\,1 \right)$.

$(1)$ Find the values of the real numbers $a$ and $b$;

$(2)$ Find the intervals where the function $f(x)$ is monotonically decreasing, and determine the value of $x$ at which $f(x)$ attains its maximum value.

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