3. The maximum value of the function
$y=\frac{\sin x \cos x}{1+\sin x+\cos x}$ is $\qquad$ .
Let $t=\sin x+\cos x \in[-\sqrt{2}, \sqrt{2}]$, then $y=\frac{t^{2}-1}{2(t+1)}=\frac{1}{2}(t-1)$ and $t \neq-1$, so the maximum value of function $y$ is $\frac{\sqrt{2}-1}{2}$, which is achieved when $x=\frac{\pi}{4}$.