<s>[INST] How to compute $\int \frac{16 x^3 - 42 x^2+2x}{\sqrt{-16x^8+112x^7-204x^6+28x^5-x^4+1}}\,\mathrm dx.$ I want to compute the following integral:
$$\int \frac{16 x^3 - 42 x^2+2x}{\sqrt{-16x^8+112x^7-204x^6+28x^5-x^4+1}}\,\mathrm dx.$$
First I tried substituting $y=\text{denominator}$ but it gets very messy. 
Also, I tried using partial fractions but it doesn’t work because of the square root.
What can I do here?
 [/INST] $-16x^8+112x^7-204x^6+28x^5-x^4+1=-(4x^4-14x^3+x^2+1)(4x^4-14x^3+x^2-1)$
Set $a=4x^4-14x^3+x^2.$ The integral rewrites 
$$\int \frac{\mathrm da}{\sqrt{-a^2+1}}.$$
</s>