50.2. Solve the equation

$$
\operatorname{tg}^{2} x=\frac{1-\cos x}{1-\sin x}
$$
50.2. We can rewrite the given equation as follows:

$$
\frac{\sin ^{2} x}{\cos ^{2} x}=\frac{1-\cos x}{1-\sin x}, \text { i.e., } \frac{(1-\cos x)(1+\cos x)}{(1-\sin x)(1+\sin x)}-\frac{1-\cos x}{1-\sin x}-=0
$$

From this, we have: $1-\cos x=0$ or $\cos x-\sin x=0$.

Finally, we get: $x_{1}=\frac{\pi}{2}+2 \pi k, x_{2}=\frac{\pi}{4}+\pi k$, where $k=0, \pm 1, \ldots$