I was bored and started punching in some rational functions into WolframAlpha to integrate and I came across a closed form that I've never seen before and have no clue how it would even be derived.
The integral I took was $$ \int{\frac{dx}{Ax^3 + Bx^2 + Cx + D}} $$ and the return value given was $$ \sum_{\{\omega\ : \ A\omega^3 + B\omega^2 + C\omega + D = 0\}}{\frac{\ln{|-\omega + x|}}{3A\omega^2 + 2B\omega + C}} \color{silver}{+ \text{constant}} $$ It seems as though in general, $$ \int{\frac{dx}{\sum_{k=1}^n{A_kx^{n-k}}}} = \sum_{\{\omega\ : \ \sum_{k=1}^n{A_k\omega^{n-k}}=0\}}{\frac{\ln{|-\omega + x|}}{\frac{d}{dx}{\left(\sum_{k=1}^n{A_k\omega^{n-k}}\right)}}} \color{silver}{+ \text{constant}} $$ Where does this come from? Is there a name for this type of indefinite integral?