
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
The eccentricity of the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$ is $\frac{\sqrt{3}}{2}$, and it passes through the point $C(1,\frac{\sqrt{3}}{2})$.  
$(1)$ Find the equation of the ellipse.  
$(2)$ Point $A$ is the upper vertex of the ellipse. The line $l$ passing through point $B(-1,0)$ intersects the ellipse at points $P$ and $Q$. The lines $AP$ and $AQ$ intersect the $x$-axis at points $M$ and $N$, respectively. If $|MN|=4\sqrt{7}$, find the equation of the line $l$.

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