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