Step 1: Understanding the Question:
The integrand \( \cos\sqrt{x} \) has a square root inside the cosine. Direct integration is not possible, so we first remove the root with a substitution. After that, the integral becomes a product of two functions, which we handle by parts.
Step 2: Substitute:
Let \( \sqrt{x} = t \). Then \( x = t^2 \) and \( dx = 2t\,dt \).
\[ \int \cos\sqrt{x}\,dx = \int \cos t \cdot 2t\,dt = 2\int t\cos t\,dt \]
Step 3: Integrate by parts:
Use \( \int u\,dv = uv - \int v\,du \) with \( u = t \) and \( dv = \cos t\,dt \).
Then \( du = dt \) and \( v = \sin t \).
\[ \int t\cos t\,dt = t\sin t - \int \sin t\,dt = t\sin t + \cos t \]
Step 4: Put back the limits of the substitution:
Multiply by the factor 2 and replace \( t \) by \( \sqrt{x} \):
\[ \int \cos\sqrt{x}\,dx = 2\left(t\sin t + \cos t\right) + k = 2\left(\sqrt{x}\sin\sqrt{x} + \cos\sqrt{x}\right) + k \]
This is option (C).
Step 5: Check by differentiating:
\( \frac{d}{dx}\left[2\sqrt{x}\sin\sqrt{x} + 2\cos\sqrt{x}\right] = 2\left[\frac{\sin\sqrt{x}}{2\sqrt{x}} + \frac{\sqrt{x}\cos\sqrt{x}}{2\sqrt{x}}\right] - \frac{2\sin\sqrt{x}}{2\sqrt{x}} = \cos\sqrt{x} \). The \( \sin\sqrt{x}/\sqrt{x} \) terms cancel, which confirms the answer.
Step 6: Why the other options are wrong:
Option (A): its derivative is \( \frac{\cos\sqrt{x}-\sin\sqrt{x}}{2\sqrt{x}} \), which is not \( \cos\sqrt{x} \).
Option (B): it has the factor \( \frac{1}{2} \) in place of 2 and a wrong sign on the cosine. Its derivative is \( \frac{\sin\sqrt{x}}{2\sqrt{x}} + \frac{\cos\sqrt{x}}{4} \).
Option (D): the derivative of \( \sin\sqrt{x} \) is \( \frac{\cos\sqrt{x}}{2\sqrt{x}} \). The factor \( 2\sqrt{x} \) in the denominator means it does not equal \( \cos\sqrt{x} \). This is the mistake of treating \( \sqrt{x} \) as if it were \( x \).
Final Answer:
After substituting \( \sqrt{x}=t \) and using integration by parts, the integral is \( 2(\sqrt{x}\sin\sqrt{x}+\cos\sqrt{x})+k \). This is option (C).
\[ \boxed{2\left(\sqrt{x}\sin\sqrt{x}+\cos\sqrt{x}\right)+k} \]