$\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$ The length of the longest chord passing through the vertex $B(0, b)$.
Given the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$ and a point $P(a \cos \theta, b \sin \theta)$ on it, then
$$
\begin{array}{l}
|P B|^{2}=a^{2} \cos ^{2} \theta+b^{2}(\sin \theta-1)^{2}=\left(b^{2}+c^{2}\right) \cos ^{2} \theta+b^{2} \sin ^{2} \theta-2 b^{2} \sin \theta+b^{2} \\
=-c^{2} \sin ^{2} \theta-2 b^{2} \sin \theta+2 b^{2}+c^{2}=-c^{2}\left(\sin \theta+\frac{b^{2}}{c^{2}}\right)^{2}+\frac{b^{4}}{c^{2}}+2 b^{2}+c^{2} \\
=-c^{2}\left(\sin \theta+\frac{b^{2}}{c^{2}}\right)^{2}+\frac{b^{4}+2 b^{2} c^{2}+c^{4}}{c^{2}}=-c^{2}\left(\sin \theta+\frac{b^{2}}{c^{2}}\right)^{2}+\frac{a^{4}}{c^{2}},
\end{array}
$$

If $b \leqslant c$, when $\sin \theta=-\frac{b^{2}}{c^{2}}$, $|P B|_{\text {max }}=\frac{a^{2}}{c}$; if $b>c$, when $\sin \theta=-1$, $|P B|_{\max }=2 b$. Therefore, $|P B|_{\max }=\left\{\begin{array}{l}2 b, b>c, \\ \frac{a^{2}}{c}, b \leqslant c .\end{array}\right.$