4. As shown in the figure, $AB$ is the diameter of the semicircle $\odot O$, $CD \perp AB$. Let $\angle COD = \theta$, then $\frac{AD}{BD}$ - $\tan^2 \frac{\theta}{2}=$ $\qquad$
4. 1.

Connect $A C$, then $\angle C A D=\frac{1}{2} \angle \theta$, and $\operatorname{tg} \frac{\theta}{2}=\operatorname{tg} \angle C A D=\frac{C D}{A D}$.
According to the projection theorem, we know
$$
\begin{array}{l}
C D^{2}=A D \cdot B D . \\
\therefore \frac{A D}{B D} \operatorname{tg}^{2} \frac{\theta}{2}=\frac{A D}{B D} \cdot \frac{C D^{2}}{A D^{2}} \\
=\frac{A D}{B D} \cdot \frac{A D \cdot B D}{A D^{2}}=1 .
\end{array}
$$