Compute $\displaystyle \int{\frac{x^2}{1+x^2}}$.
My first thought was to use long division which resulted in $\int {1-\frac{1}{x^2+1}dx}$. However I then did not come any further. The solution did the same thing and just stated that the integral obtained after long division is an elementary integral and $\int {1-\frac{1}{x^2+1}dx} =x-\arctan(x)+C$ with $x\in\mathbb R$. So did I just struggle because I didn't know that $\int {\frac{1}{x^2+1}dx}=\arctan(x)$ - or should I have been able to come up with that solution (in an efficient way) without knowing this?
$$y=\frac{x^2}{1+x^2}=\frac{1+x^2-1}{1+x^2}=1-\frac{1}{1+x^2}=1-\frac{1}{(x+i)(x-i)}$$ $$y=1-\frac{i}{2 (x+i)}+\frac{i}{2 (x-i)}$$ Just finish