To solve the integral \( \int \cos(\sqrt{x}) \, dx \), we will follow these steps:
### Step 1: Substitution
Let \( t = \sqrt{x} \). Then, we have:
\[
x = t^2 \quad \text{and} \quad dx = 2t \, dt
\]
### Step 2: Rewrite the Integral
Substituting \( t \) and \( dx \) into the integral gives:
\[
\int \cos(\sqrt{x}) \, dx = \int \cos(t) \cdot 2t \, dt = 2 \int t \cos(t) \, dt
\]
### Step 3: Integration by Parts
We will use integration by parts, where we let:
- \( u = t \) (first function)
- \( dv = \cos(t) \, dt \) (second function)
Then, we find:
- \( du = dt \)
- \( v = \sin(t) \)
Using the integration by parts formula \( \int u \, dv = uv - \int v \, du \):
\[
\int t \cos(t) \, dt = t \sin(t) - \int \sin(t) \, dt
\]
### Step 4: Integrate \( \sin(t) \)
The integral of \( \sin(t) \) is:
\[
\int \sin(t) \, dt = -\cos(t)
\]
So, substituting back, we have:
\[
\int t \cos(t) \, dt = t \sin(t) + \cos(t)
\]
### Step 5: Substitute Back
Now, substituting back into our integral:
\[
2 \int t \cos(t) \, dt = 2(t \sin(t) + \cos(t)) = 2t \sin(t) + 2\cos(t)
\]
### Step 6: Replace \( t \) with \( \sqrt{x} \)
Finally, we replace \( t \) with \( \sqrt{x} \):
\[
= 2\sqrt{x} \sin(\sqrt{x}) + 2\cos(\sqrt{x}) + C
\]
### Final Answer
Thus, the integral \( \int \cos(\sqrt{x}) \, dx \) is:
\[
\int \cos(\sqrt{x}) \, dx = 2\sqrt{x} \sin(\sqrt{x}) + 2\cos(\sqrt{x}) + C
\]