Calculating $\int\frac{a^4-x^4}{x^4+a^2x^2+a^4}dx$ 
$$\int\frac{a^4-x^4}{x^4+a^2x^2+a^4}dx$$

I tried factoring as $${(a^2-x^2)(a^2+x^2)}$$ $$\text{and}$$ $$(x^2+a^2+ax)(x^2+a^2-ax)$$ but didn't get much after this. I sew that the expression is symmetric in a,x but I don't know how to use that.

Rewrite the integrand as
$$\frac{a^4 - x^4}{x^4 + a^2x^2 + a^4}
=-1+ \frac{\frac {3a}2(\frac 1a +\frac{a}{x^2})-\frac a2(\frac 1a -\frac{a}{x^2})}{\frac{x^2 }{a^2}+ \frac{a^2}{x^2}+1}
$$
and then integrate as follows
$$\int\frac{a^4-x^4}{x^4+a^2x^2+a^4}dx
= -x + \frac{3a}2\int \frac{d(\frac xa-\frac ax)}{(\frac xa-\frac ax)^2+3} -\frac{a}2\int \frac{d(\frac xa+\frac ax)}{(\frac xa+\frac ax)^2-1}\\
=-x +\frac{\sqrt3 a}2\tan^{-1}\frac{\frac xa-\frac ax}{\sqrt3}
+\frac a2\coth^{-1}(\frac xa+\frac ax)+C
$$
