Step 1: Substitute to simplify:
Put $u = \sqrt{x}$, so the function becomes $y = \cos u$. This is a function of $u$, and $u$ is a function of $x$.
Step 2: Differentiate with respect to u and x separately:
\[ \frac{dy}{du} = -\sin u \]
Since $u = x^{1/2}$, the power rule gives
\[ \frac{du}{dx} = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}} \]
Step 3: Join them with the chain rule:
\[ \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = (-\sin u) \cdot \frac{1}{2\sqrt{x}} \]
Step 4: Replace u by the square root of x:
\[ \frac{dy}{dx} = \frac{-\sin\sqrt{x}}{2\sqrt{x}} \]
Only option (B) shows a negative sign together with the factor $2\sqrt{x}$ in the denominator.
Final Answer:
The answer is option (B).
\[ \boxed{\frac{-\sin\sqrt{x}}{2\sqrt{x}}} \]