Integrating $\frac{x}{1+x^2}$ I need to integrate $\frac{x}{1+x^2}$ and I tried it like this:
$$f(x)=\frac{x}{1+x^2}=\frac{x}{(x+1)(x-1)}=\frac{x+1-1}{(x+1)(x-1)}= \frac{x+1}{(x+1)(x-1)}-\frac{1}{(x+1)(x-1)}=\frac{1}{x-1}-\frac{1}{1+x^2}$$
After I simplified it I integrate it!
$$\int{f(x)}=\int{\frac{1}{x-1}}-\int{\frac{1}{1+x^2}}$$
$\int{\frac{dx}{1+x^2}}$ becomes arctan(x) and I substitute $\int{\frac{dx}{x-1}}$ to $\int{\frac{du}{u}}$ now it becomes $ln(x-1)$ after this been done I get:
$$\int{f(x)}=ln(x-1)-arctan(x)$$
but when I type integrate x/(1+x^2) into wolframAlpha I it tells me the answer is: $$\int{f(x)}=\frac{1}{2}log(x^2+1)$$
where did I go wrong or what should I have done instead ?
Thank you for your help in advance,
Raavgo

Hint:
Use the substitution $$1+x^2=t \quad \rightarrow \quad 2xdx=dt$$
