To solve the integral \(\int \frac{x}{\sqrt{x} + 1} \, 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 \(x\) and \(dx\) into the integral gives:
\[
\int \frac{x}{\sqrt{x} + 1} \, dx = \int \frac{t^2}{t + 1} \cdot 2t \, dt = 2 \int \frac{t^3}{t + 1} \, dt
\]
### Step 3: Simplify the Integral
Now, we can simplify \(\frac{t^3}{t + 1}\) by performing polynomial long division:
\[
\frac{t^3}{t + 1} = t^2 - t + 1 - \frac{1}{t + 1}
\]
Thus, we can rewrite the integral as:
\[
2 \int \left( t^2 - t + 1 - \frac{1}{t + 1} \right) dt
\]
### Step 4: Integrate Each Term
Now we can integrate each term separately:
\[
2 \left( \int t^2 \, dt - \int t \, dt + \int 1 \, dt - \int \frac{1}{t + 1} \, dt \right)
\]
Calculating these integrals gives:
\[
\int t^2 \, dt = \frac{t^3}{3}, \quad \int t \, dt = \frac{t^2}{2}, \quad \int 1 \, dt = t, \quad \int \frac{1}{t + 1} \, dt = \log|t + 1|
\]
Thus, we have:
\[
2 \left( \frac{t^3}{3} - \frac{t^2}{2} + t - \log|t + 1| \right) + C
\]
### Step 5: Substitute Back
Now we substitute back \(t = \sqrt{x}\):
\[
= 2 \left( \frac{(\sqrt{x})^3}{3} - \frac{(\sqrt{x})^2}{2} + \sqrt{x} - \log|\sqrt{x} + 1| \right) + C
\]
This simplifies to:
\[
= \frac{2x\sqrt{x}}{3} - x + 2\sqrt{x} - 2\log(\sqrt{x} + 1) + C
\]
### Final Answer
Thus, the final answer is:
\[
\int \frac{x}{\sqrt{x} + 1} \, dx = \frac{2x\sqrt{x}}{3} - x + 2\sqrt{x} - 2\log(\sqrt{x} + 1) + C
\]