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