4. Connecting the right-angle vertex of a right triangle to the two trisection points of the hypotenuse, the lengths of the two resulting line segments are $\sin \alpha$ and $\cos \alpha\left(0<\alpha<\frac{\pi}{2}\right)$, then the length of the hypotenuse is
A. $\frac{4}{3}$
B. $\sqrt{5}$
C. $\frac{2}{\sqrt{5}}$
D. $\frac{3}{\sqrt{5}}$
4. $\mathrm{D}$ Hint: Taking the right-angle vertex as the origin, the two legs of the right angle as the positive half-axes of the $x, y$ axes, set $C(0,0)$, $A(a, 0), B(0, b)$, the trisection points $D\left(\frac{2}{3} a, \frac{1}{3} b\right), E\left(\frac{1}{3} a, \frac{2}{3} b\right)$, (according to the section formula for coordinates). Thus, $\left(\frac{2}{3} a\right)^{2}$ $+\left(\frac{1}{3} b\right)^{2}=\sin ^{2} \alpha,\left(\frac{1}{3} a\right)^{2}+\left(\frac{2}{3} b\right)^{2}=\cos ^{2} \alpha$. Adding these, $\frac{5}{9}\left(a^{2}+b^{2}\right)=1, \sqrt{a^{2}+b^{2}}=\frac{3}{\sqrt{5}}$.