\[ \int \frac {-1+2 x}{(1+x) \sqrt {-a^2 x^2+(1+x)^6}} \, dx \]
Optimal antiderivative \[ -\frac {2 \arctan \left (\frac {a x}{1+3 x +3 x^{2}+x^{3}+\sqrt {1+6 x +\left (-a^{2}+15\right ) x^{2}+20 x^{3}+15 x^{4}+6 x^{5}+x^{6}}}\right )}{a} \]
command
Integrate[(-1 + 2*x)/((1 + x)*Sqrt[-(a^2*x^2) + (1 + x)^6]),x]
Mathematica 13.1 output
\[ -\frac {2 \text {ArcTan}\left (\frac {a x}{1+3 x+3 x^2+x^3+\sqrt {1+6 x+\left (15-a^2\right ) x^2+20 x^3+15 x^4+6 x^5+x^6}}\right )}{a} \]
Mathematica 12.3 output
\[ \int \frac {-1+2 x}{(1+x) \sqrt {-a^2 x^2+(1+x)^6}} \, dx \]________________________________________________________________________________________