Step 1: Understanding the Question:
This is a standard integration problem where the degree of the numerator is equal to the degree of the denominator. We can simplify it by manipulating the numerator.
Step 2: Key Formula or Approach:
Add and subtract 2 in the numerator to split the fraction.
Step 3: Detailed Explanation:
\[ I = \int \frac{x}{x+2} \, dx \]
Rewrite the numerator:
\[ I = \int \frac{x+2-2}{x+2} \, dx \]
Split the integral:
\[ I = \int \left( \frac{x+2}{x+2} - \frac{2}{x+2} \right) \, dx \]
\[ I = \int (1 - \frac{2}{x+2}) \, dx \]
Integrate term by term:
\[ I = x - 2\log|x+2| + C \]
Step 4: Final Answer:
The integral evaluates to \( x - 2\log|x+2| + C \).