Example 1 (Chongqing 2008) The maximum value of the function $y=\sqrt{1-x}+$ $\sqrt{x+3}$ is $(\quad)$
$$\begin{array}{l}
\text { Analysis: By Cauchy-Schwarz inequality, we have: } \\
y=\sqrt{1} \cdot \sqrt{1-x}+\sqrt{1} \cdot \sqrt{x+3} \leqslant \sqrt{1^{2}+1^{2}} . \\
\sqrt{(1-x)+(x+3)}=2 \sqrt{2} .
\end{array}$$

Therefore, the answer should be $2 \sqrt{2}$.
Evaluation: This problem involves an irrational function. There are many methods to solve it, but using the Cauchy-Schwarz inequality is undoubtedly the simplest.