3. For what values of $x$ does the expression

$$
3-|\operatorname{tg}(\sqrt{2} \pi \cos \pi x)|-\left|\operatorname{ctg}\left(\frac{\pi \sqrt{2} \sin 3 \pi x}{2}\right)\right|
$$

take its maximum possible value
Answer: $x=-\frac{1}{4}+\frac{n}{2}, n \in Z$.