
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 vertex of angle $\alpha$ is at the origin, its initial side coincides with the positive half-axis of the x-axis, and its terminal side passes through point P(-3, $\sqrt{3}$).

(1) Find the value of $\tan\alpha$;  
(2) Define the determinant operation $\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad-bc$, and calculate the determinant of $\begin{vmatrix} \sin\alpha & \tan\alpha \\ 1 & \cos\alpha \end{vmatrix}$;  
(3) If the function $f(x) = \begin{vmatrix} \cos(x+\alpha) & -\sin\alpha \\ \sin(x+\alpha) & \cos\alpha \end{vmatrix}$ ($x\in\mathbb{R}$), find the maximum value of the function $y= \sqrt{3}f\left(\frac{\pi}{2}-2x\right)+2f^2(x)$, and indicate the value of $x$ when the maximum value is attained.

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