
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 in the complex plane, points $A$ and $B$ correspond to complex numbers $z_{1}=\sin^{2}\theta+i$ and $z_{2}=-\cos^{2}\theta+i\cos 2\theta$ respectively, where $\theta\in(0,\pi)$. Let the complex number corresponding to $\overrightarrow{AB}$ be $z$.
$(1)$ Find the complex number $z$;
$(2)$ If the point $P$ corresponding to the complex number $z$ lies on the line $y= \frac{1}{2}x$, find the value of $\theta$.

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