
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 an ellipse $\dfrac{x^{2}}{a^{2}} + \dfrac{y^{2}}{b^{2}} = 1 (a > b > 0)$ that passes through the point $(-\sqrt{2},1)$ and has a major axis length of $2\sqrt{5}$, and a line $l$ with slope $k$ passing through point $C(-1,0)$ intersects the ellipse at two distinct points $A$ and $B$.

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

$(2)$ If the midpoint of segment $AB$ has an x-coordinate of $-\dfrac{1}{2}$, find the slope of line $l$.

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