11.21 Find the range of the function $y=(\sin x+\cos x)^{2}$.

 untranslated text:
11.21 Найти область значений функции $y=(\sin x+\cos x)^{2}$.
11.21 Given that $\sin x+\cos x=\sqrt{2} \sin \left(x+\frac{\pi}{4}\right), \quad$ we can write the expression for $y$ as $y=(\sin x+\cos x)^{2}=2 \sin ^{2}\left(x+\frac{\pi}{4}\right)$. But $0 \leq \sin ^{2}\left(x+\frac{\pi}{4}\right) \leq 1$, from which $0 \leq 2 \sin \left(x+\frac{\pi}{4}\right) \leq 2$, i.e., the range of values of this function is the interval $[0,2]$.

Answer: $0 \leq y \leq 2$.