$0- \large\frac{\pi}{2}$$=> \cos x$
$\large\frac{\pi}{2}-\frac{\pi}{2}$$ \to \sin x$
$\int \limits_0^{\frac{\pi}{4}} \cos x dx+ \int\limits_{\large\frac{\pi}{4}} ^{\frac{\pi}{2}} \sin x dx$
$\bigg[\sin x \bigg]_0^{\large\frac{z}{4}} - \bigg[\cos x \bigg]_{\large\frac{\pi}{2}}^{\large\frac{z}{4}}$
$ \sin \large\frac{z}{4}$$ - \sin 0- \cos \large\frac{\pi}{2}$$+\cos {\frac{\pi}{4}}$
=> $ \sqrt {2}$