4. Let the two tangents to the parabola $y^{2}=4 a x$ intersect at an angle $\theta$ (where $\theta$ is a constant). Find the equation of the locus of the vertex of the angle.


Let the vertex of the angle be \( P\left(x_{0}, y_{0}\right) \), and the points of tangency be \( A\left(a t^{2}, 2 a t\right) \) and \( B\left(a s^{2}, 2 a s\right) \). Substituting these into the equation of the chord of contact \( A B \), we get \( y_{0} y=2 a\left(x_{0}+x\right) \).

Thus, \( t \) and \( s \) are the roots of the quadratic equation \( a u^{2} - y_{0} u + x_{0} = 0 \). By Vieta's formulas, we have
\[
t + s = \frac{y_{0}}{a}, \quad t s = \frac{x_{0}}{a}.
\]

The equation of the tangent \( P A \) is
\[
2 a t y = 2 a\left(a t^{2} + x\right) \Leftrightarrow x - t y + a t^{2} = 0.
\]

Thus, \( \boldsymbol{\alpha} = (1, -t) \) is the normal vector of the tangent \( P A \). Similarly, \( \boldsymbol{\beta} = (1, -s) \) is the normal vector of the tangent \( P B \). By the problem statement, we have
\[
\begin{array}{l}
|\boldsymbol{\alpha} \cdot \boldsymbol{\beta}| = |\boldsymbol{\alpha}| \cdot |\boldsymbol{\beta}| \cos \theta \\
\Leftrightarrow (1 + t s)^{2} = \left(1 + t^{2}\right)\left(1 + s^{2}\right) \cos^{2} \theta.
\end{array}
\]

Substituting (1) into the above equation and simplifying, we find that the required locus equation is
\[
\begin{array}{l}
x^{2} \sin^{2} \theta + 2 a\left(1 + \cos^{2} \theta\right) x - \\
y^{2} \cos^{2} \theta + a^{2} \sin^{2} \theta = 0.
\end{array}
\]