4. Solve the equation $\sqrt{1+\operatorname{tg} x}=\sin x+\cos x$. Find all its roots that satisfy the condition $|2 x-5|<2$.

#
# Solution:

Given the condition $\sin x+\cos x \geq 0$, both sides of the equation $\sqrt{1+\operatorname{tg} x}=\sin x+\cos x$ can be squared. Since $\sin x+\cos x=\sqrt{2} \sin (x+\pi / 4)$, we have $-\pi / 4+2 \pi n \leq x \leq 3 \pi / 4+2 \pi n, n \in Z$. Under these constraints, the equation is equivalent to:
$1+\operatorname{tg} x=\sin ^{2} x+2 \sin x \cos x+\cos ^{2} x, \operatorname{tg} x-2 \sin x \cos x=0, \sin x\left(1-2 \cos ^{2} x\right)=0$. Thus, we arrive at the following system of equations: 1) $\sin x=0, x=\pi n, n \in Z, 2)$ $\cos ^{2} x=1 / 2, \cos x= \pm \sqrt{2} / 2, x= \pm \pi / 4+\pi n, n \in Z$. Considering the constraints, the solutions to the original equation are: $x=2 \pi n, \quad x= \pm \pi / 4+2 \pi n, x=3 \pi / 4+2 \pi n, n \in Z$. Given the condition $|2 x-5|<2$, we have $x \in(1.5 ; 3.5)$, hence $x=3 \pi / 4$. Answer: solutions: $2 \pi n, \quad \pm \pi / 4+2 \pi n$, $3 \pi / 4+2 \pi n, n \in Z$; root satisfying the condition: $3 \pi / 4$.