<s>[INST] 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
 [/INST] I would integrate 'by inspection', using the standard result stated above:
$$ \int \frac{f'(x) } {f(x) } \quad dx= ln(f(x)) +c$$
Therefore, answering your question;
$$\int \frac{x} {1+x^2} \quad dx, $$
If $f(x) =x^2 \, then, \, \, f'(x) =2x$
Another equivalent form of the integral becomes;
$${1\over2} \cdot \int \frac{2x} {1+x^2} \quad dx $$
The integral is in the form of $\frac{f' (x) } {f(x) }, $
So the integral may be evaluated as;
$${1 \over 2} \cdot ln(1+x^2)+c$$
Hope this helps. 
</s>