\(y'=1-\sqrt{2}\sin x=\dfrac{1}{\sqrt{2}}\Rightarrow x=\dfrac{\pi}{4}\\ y\left(0\right)=\sqrt{2};y\left(\dfrac{\pi}{4}\right)=\dfrac{\pi}{4}+1;y\left(\dfrac{\pi}{2}\right)=\dfrac{\pi}{2}\\ \Rightarrow y_{max}=y\left(\dfrac{\pi}{4}\right)=\dfrac{\pi}{4}+1\\ y_{min}=y\left(0\right)=\sqrt{2}\)