3. Given $\sin x-\cos x=\frac{1}{3}(1+2 \sqrt{2}), \cot \frac{x}{2}=$ $\qquad$
3. $\sqrt{2}, 3+2 \sqrt{2}$.

Given $\sin x-\cos x=\frac{1}{3}(1+2 \sqrt{2})$ and $\sin ^{2} x+\cos ^{2} x=1$, solve to get $\sin x=\frac{1}{3}, \cos x=-\frac{2 \sqrt{2}}{3}$ or $\cos x=-\frac{1}{3}, \sin x=\frac{2 \sqrt{2}}{3}$. Since $\cot \frac{x}{2}=\frac{1-\cos x}{\sin x}$, thus $\cot \frac{x}{2}=\frac{1+\frac{2 \sqrt{2}}{3}}{\frac{1}{3}}=3+2 \sqrt{2}$ or $\cot \frac{x}{2}=$ $\frac{1+\frac{1}{3}}{\frac{2 \sqrt{2}}{3}}=\sqrt{2}$