
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)=4 \sqrt {3}\sin x\cos x-4\sin ^{2}x+1$.
(1) Find the maximum value of the function $f(x)$ and the value of $x$ at this time;
(2) In $\triangle ABC$, $a$, $b$, $c$ are the sides opposite to angles $A$, $B$, $C$ respectively, and for any $x$ in the definition domain of $f(x)$, $f(x)\leqslant f(A)$. If $a=2$, find the maximum value of $\overrightarrow{AB}\cdot \overrightarrow{AC}$.

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