Evaluate Integral $\int\frac{1+x}{1+x^2}\ dx$ $\int\frac{1+x}{1+x^2}\ dx$
Let $u=1+x^2$
Then $du = 2x\ dx$
Here is my work. 
Split integral $\int\frac{1}{1+x^2}\ dx$ + $\int\frac{x}{1+x^2}\ dx$
Integrate first integral term:
$\int\frac{1}{1+x^2}\ dx=tan^{-1}x$
$\int\frac{x}{1+x^2}\cdot\frac{du}{2x} $
I am stuck when it comes to the second integral term (I hope that is the right term). I have $\frac{du}{2x}$ It does get rid of the x. Should I carry the 2 over by placing outside the second integral. 

HINT:
$$\int \frac{1}{u}\,du=\log|u|+C$$
So, let $u=1+x^2$, $du=2x\,dx$ and ...
SPOILER ALERT Scroll over the highlighted area to reveal the answer

$$\int\frac{1+x}{1+x^2}\,dx=\int\frac{1}{1+x^2}\,dx+\int\frac{x}{1+x^2}\,dx=\arctan(x)+\frac12 \log(1+x^2)+C$$where for the second integral, we used the HINT and substituted $u=1+x^2$, $du=2xdx$, so that $$\int\frac{x}{1+x^2}\,dx=\frac12\int\frac{1}{u}\,du=\frac12\log |u|+C=\frac12\log (1+x^2)+C$$

