
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 one vertex of ellipse E is at $A(0,1)$, its foci lie on the x-axis, and the distance from the right focus to the line $x−y+2 \sqrt{2}=0$ is 3.
(1) Find the equation of ellipse E;
(2) Let line l pass through point A and intersect ellipse E at another point B. When the length of chord AB is the maximum, find the equation of line l.

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