
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 that the center of the ellipse is at the origin, the foci are on the $x$-axis, the eccentricity is $\frac{\sqrt{3}}{2}$, and it passes through the point $M(4,1)$, the line $l$: $y=x+m$ intersects the ellipse at two distinct points $A$ and $B$.
$(1)$ Find the equation of the ellipse.
$(2)$ Find the range of values for $m$.

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