4. (2004 National College Entrance Examination - National Paper) The maximum value of the function $y=\sin x-\frac{1}{2} \cos x(x \in \mathbf{R})$ is
4. $\frac{\sqrt{5}}{2}$ Hint: Use the auxiliary angle formula.



Translating the above text into English, while preserving the original text's line breaks and format, the result is as follows:

4. $\frac{\sqrt{5}}{2}$ Hint: Use the auxiliary angle formula.