
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 proposition $p:x$ satisfies $\left\{\begin{array}{l}ax-2≤0,\\ ax+1＞0,\end{array}\right.$ and proposition $q:x$ satisfies $x^{2}-x-2 \lt 0$.<br/>$(1)$ If there exists $x\in (\frac{1}{2}$,$3)$ such that $p$ is a true proposition, find the range of real number $a$;<br/>$(2)$ If $p$ is a necessary but not sufficient condition for $q$, find the range of real number $a$.

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