
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 $\sin \theta$ and $\cos \theta$ are the roots of the equation $2x^2-(\sqrt{3}+1)x+m=0$, where $\theta \in (0,2\pi)$.

$(1)$ Find the value of $\frac{\sin^2 \theta}{\sin \theta - \cos \theta} + \frac{\cos \theta}{1 - \tan \theta}$;  
$(2)$ Find the value of $m$;  

$(3)$ Find the two roots of the equation and the value of $\theta$ at this time.

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