Cosine Minus Sine
1. **State the problem:** Given that $\tan x = \frac{1}{\sqrt{3}}$ for $0^\circ \leq x \leq 90^\circ$, find the value of $\cos x - \sin x$.
2. **Recall the basic trigonometric values:** From standard angles, $\tan 30^\circ = \frac{1}{\sqrt{3}}$. Since $\tan x = \frac{1}{\sqrt{3}}$, we conclude $x = 30^\circ$.
3. **Use known sine and cosine values:**
- $\sin 30^\circ = \frac{1}{2}$
- $\cos 30^\circ = \frac{\sqrt{3}}{2}$
4. **Calculate $\cos x - \sin x$ at $x = 30^\circ$:**
$$\cos 30^\circ - \sin 30^\circ = \frac{\sqrt{3}}{2} - \frac{1}{2} = \frac{\sqrt{3} - 1}{2}$$
**Final answer:**
$$\cos x - \sin x = \frac{\sqrt{3} - 1}{2}$$