How do I go from this $\frac{x^2-3}{x^2+1}$ to $1-\frac{4}{x^2+1}$? So I am doing $\int\frac{x^2-3}{x^2+1}dx$ and on wolfram alpha it says the first step is to do "long division" and goes from $\frac{x^2-3}{x^2+1}$ to $1-\frac{4}{x^2+1}$. That made the integral much easier, so how would I go about doing that in a clear manner? Thanks in advance for the help!

$\left( \frac{x^2 -3}{x^2 +1}\right) \Rightarrow \left(\frac {x^2}{x^2+1} - \frac {3}{x^2+1} \right) \Rightarrow \left(\frac{x^2+1}{x^2+1}  - \frac {1}{x^2+1} -\frac{3}{x^2+1} \right)\Rightarrow \left(1 -\frac {4}{x^2+1}\right) $
