2. (20 points) Let a line passing through the origin with a positive slope intersect the ellipse $\frac{x^{2}}{4}+y^{2}=1$ at points $E$ and $F$. Points $A(2,0)$ and $B(0,1)$. Find the maximum value of the area of quadrilateral $A E B F$.


2. It is known that $l_{A B}: x+2 y=2$.

Let the slope of line $E F$ be $k$.
Then $l_{E F}: y=k x(k>0)$.
Let $E\left(x_{1}, k x_{1}\right), F\left(x_{2}, k x_{2}\right)\left(x_{1}<x_{2}\right)$.
Since points $E$ and $F$ are on the ellipse, $x_{1}$ and $x_{2}$ satisfy the equation
$$
\left(1+4 k^{2}\right) x^{2}=4 \text {. }
$$

Thus, $x_{1}=-\frac{2}{\sqrt{1+4 k^{2}}}, x_{2}=\frac{2}{\sqrt{1+4 k^{2}}}$.
By the distance formula from a point to a line, the distances from points $E$ and $F$ to line $A B$ are respectively
$$
\begin{array}{l}
h_{1}=\frac{\left|x_{1}+2 k x_{1}-2\right|}{\sqrt{5}}=\frac{2\left(1+2 k+\sqrt{1+4 k^{2}}\right)}{\sqrt{5\left(1+4 k^{2}\right)}}, \\
h_{2}=\frac{\left|x_{2}+2 k x_{2}-2\right|}{\sqrt{5}}=\frac{2\left(1+2 k-\sqrt{1+4 k^{2}}\right)}{\sqrt{5\left(1+4 k^{2}\right)}} .
\end{array}
$$

Also, $|A B|=\sqrt{5}$, so the area of quadrilateral $A E B F$ is
$$
\begin{aligned}
S & =\frac{1}{2}|A B|\left(h_{1}+h_{2}\right) \\
& =\frac{1}{2} \times \sqrt{5} \times \frac{4(1+2 k)}{\sqrt{5\left(1+4 k^{2}\right)}} \\
& =2 \sqrt{\frac{1+4 k^{2}+4 k}{1+4 k^{2}}} \\
& =2 \sqrt{1+\frac{4}{\frac{1}{k}+4 k}} \leqslant 2 \sqrt{2} .
\end{aligned}
$$

The equality holds if and only if $\frac{1}{k}=4 k$, i.e., $k=\frac{1}{2}$. Thus, $S$ attains its maximum value $2 \sqrt{2}$.