(4) Let the line $l$ with a slope of $\frac{\sqrt{2}}{2}$ intersect the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$ at two distinct points $P$ and $Q$. If the projections of points $P$ and $Q$ on the $x$-axis are exactly the two foci of the ellipse, then the eccentricity of the ellipse is $\qquad$.
(4) $\frac{\sqrt{2}}{2}$ Hint: Method 1 Let the semi-focal distance of the ellipse be $c$. As shown in the figure, it is easy to know that the coordinates of point $P$ are $\left(c, \frac{\sqrt{2}}{2} c\right)$, then
$$
\frac{c^{2}}{a^{2}}+\frac{\left(\frac{\sqrt{2}}{2} c\right)^{2}}{b^{2}}=1 \text {, i.e., } \frac{c^{2}}{a^{2}}+\frac{c^{2}}{2\left(a^{2}-c^{2}\right)}=1 \text {, }
$$

Therefore, $e^{2}+\frac{e^{2}}{2\left(1-e^{2}\right)}=1$.
Solving this, we get $e^{2}=2$ (discard) or $e^{2}=\frac{1}{2}$, hence $e=\frac{\sqrt{2}}{2}$.
Method 2 From the given, we have $\left|P F_{2}\right|=\frac{\sqrt{2}}{2} c$, thus
$$
\left|P F_{1}\right|=\sqrt{\left|F_{1} F_{2}\right|^{2}+\left|P F_{2}\right|^{2}}=\frac{3 \sqrt{2}}{2} c \text {. }
$$

From $2 a=\left|P F_{1}\right|+\left|P F_{2}\right|=2 \sqrt{2} c$, we get $e=\frac{\sqrt{2}}{2}$.