To solve the integral \(\int \frac{1+x}{1+x^2} \, dx\), we can use the method of splitting the fraction into simpler parts. We can rewrite the integrand as \(\frac{1}{1+x^2} + \frac{x}{1+x^2}\). The first part, \(\frac{1}{1+x^2}\), is a standard integral that results in \(\arctan(x)\). The second part, \(\frac{x}{1+x^2}\), can be solved using a simple substitution.
Solution Approach
Split the integrand into two parts: \(\frac{1}{1+x^2}\) and \(\frac{x}{1+x^2}\).
Integrate each part separately.
Combine the results.
Step 1: Split the Integrand
We start by splitting the integrand \(\frac{1+x}{1+x^2}\) into two simpler parts:
\[
\frac{1+x}{1+x^2} = \frac{1}{1+x^2} + \frac{x}{1+x^2}
\]
Step 2: Integrate Each Part Separately
Next, we integrate each part separately.
The integral of \(\frac{1}{1+x^2}\) is:
\[
\int \frac{1}{1+x^2} \, dx = \arctan(x)
\]
The integral of \(\frac{x}{1+x^2}\) can be solved using the substitution \(u = 1 + x^2\), \(du = 2x \, dx\):
\[
\int \frac{x}{1+x^2} \, dx = \frac{1}{2} \int \frac{2x}{1+x^2} \, dx = \frac{1}{2} \ln|1+x^2|
\]
Step 3: Combine the Results
Combining the results of the two integrals, we get:
\[
\int \frac{1+x}{1+x^2} \, dx = \arctan(x) + \frac{1}{2} \ln|1+x^2| + C
\]