
12.5.15 Olympic algebra
Condition: Find all values of the variable \( x \), for each of which both expressions \[ \begin{array}{l} f(x)=\tan ^{2}\left(\frac{\pi \cos x}{2 \sqrt{2}}\right)+\cot ^{2}\left(\frac{\pi \cos x}{2 \sqrt{2}}\right) \\ \text { and } g(x)=\frac{\sqrt{15-2 x-x^{2}}+2 x+4}{2+x} \end{array} \] are defined, and the value of the smaller of the expressions does not exceed two (if two numbers are equal, then any of them is considered smaller).
Olympiad problems in algebra