
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 right vertex of the ellipse $C: \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 (a > b > 0)$ is $Q$, and $O$ is the origin. A perpendicular line to the x-axis through the midpoint of $OQ$ intersects the ellipse in the first quadrant at point $A$, and the y-coordinate of point $A$ is $\frac{3}{2}c$, where $c$ is the semi-focal distance.
$(1)$ Find the eccentricity of the ellipse;
$(2)$ A line $l$ passing through point $A$ with a slope of $\frac{1}{2}$ intersects the ellipse at another point $B$. A circle with diameter $AB$ passes through point $P\left(\frac{1}{2}, \frac{9}{2}\right)$. Find the equation of the ellipse.

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