
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 the equation of an ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1 (a>b>0)$, where $A(-2,0)$ and $B(2,0)$ are the left and right vertices of the ellipse, respectively. A line $l$ passes through point $C(6,0)$. When the line $l$ passes through point $D(-2,\sqrt{2})$, the line $l$ is tangent to the ellipse.

$(1)$ Find the equation of the ellipse.

$(2)$ If the line $l$ intersects the ellipse at points $P$ and $Q$ (distinct from $A$ and $B$):

$(i)$ Find the product of the slopes of $BP$ and $BQ$.

$(ii)$ If the sum of the slopes of $AP$ and $BQ$ is $-\frac{1}{2}$, find the equation of the line $l$.

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