
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+2\cos^2x)\cos(2x+\theta)$ is an odd function, and $f\left(\frac{\pi}{4}\right)=0$, where $a\in \mathbb{R}$, $\theta\in(0,\pi)$,

$(1)$ Find the values of $a$ and $\theta$;

$(2)$ If $f\left(\frac{\alpha}{4}\right)=-\frac{2}{5}$, $\alpha \in \left(\frac{\pi}{2},\pi \right)$, find the value of $\sin\left(\alpha +\frac{\pi}{3}\right)$.

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