4. As shown in Figure 2, given $A C=2 B C, D A=$ $D B, D A \perp D B, C B \perp$ $A B, A B=1$. Then the area of the shaded part in the figure is $\qquad$ .
4. $\frac{9-4 \sqrt{3}}{12}$.

Draw $E F \perp A B$, with the foot of the perpendicular at $F$. Given $B C=\frac{1}{2} A C$, we know $\angle C A B=30^{\circ}$. Therefore, $B C=A B \tan 30^{\circ}=\frac{\sqrt{3}}{3}$.
Also, $A F=E F \cot 30^{\circ}=\sqrt{3} E F$, and $B F=E F$, so,
$$
\begin{array}{l}
A F+B F=(\sqrt{3}+1) E F=1, \\
E F=\frac{1}{2}(\sqrt{3}-1) .
\end{array}
$$

Thus, the area of the shaded part in the figure is
$$
\begin{array}{l}
S_{\triangle A B D}+S_{\triangle A B C}-2 S_{\triangle A B E} \\
=\frac{1}{4}+\frac{\sqrt{3}}{6}-\frac{1}{2}(\sqrt{3}-1)=\frac{9-4 \sqrt{3}}{12} .
\end{array}
$$