Optimal. Leaf size=109 \[ \frac{\log \left (a^2-\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\log \left (a^2+\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} x}{a}+1\right )}{2 \sqrt{2} a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0616562, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {297, 1162, 617, 204, 1165, 628} \[ \frac{\log \left (a^2-\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\log \left (a^2+\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} x}{a}+1\right )}{2 \sqrt{2} a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 297
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rubi steps
\begin{align*} \int \frac{x^2}{a^4+x^4} \, dx &=-\left (\frac{1}{2} \int \frac{a^2-x^2}{a^4+x^4} \, dx\right )+\frac{1}{2} \int \frac{a^2+x^2}{a^4+x^4} \, dx\\ &=\frac{1}{4} \int \frac{1}{a^2-\sqrt{2} a x+x^2} \, dx+\frac{1}{4} \int \frac{1}{a^2+\sqrt{2} a x+x^2} \, dx+\frac{\int \frac{\sqrt{2} a+2 x}{-a^2-\sqrt{2} a x-x^2} \, dx}{4 \sqrt{2} a}+\frac{\int \frac{\sqrt{2} a-2 x}{-a^2+\sqrt{2} a x-x^2} \, dx}{4 \sqrt{2} a}\\ &=\frac{\log \left (a^2-\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\log \left (a^2+\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}\\ &=-\frac{\tan ^{-1}\left (1-\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}+\frac{\tan ^{-1}\left (1+\frac{\sqrt{2} x}{a}\right )}{2 \sqrt{2} a}+\frac{\log \left (a^2-\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}-\frac{\log \left (a^2+\sqrt{2} a x+x^2\right )}{4 \sqrt{2} a}\\ \end{align*}
Mathematica [A] time = 0.0277268, size = 79, normalized size = 0.72 \[ \frac{\log \left (a^2-\sqrt{2} a x+x^2\right )-\log \left (a^2+\sqrt{2} a x+x^2\right )-2 \tan ^{-1}\left (1-\frac{\sqrt{2} x}{a}\right )+2 \tan ^{-1}\left (\frac{\sqrt{2} x}{a}+1\right )}{4 \sqrt{2} a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 101, normalized size = 0.9 \begin{align*}{\frac{\sqrt{2}}{8}\ln \left ({ \left ({x}^{2}-\sqrt [4]{{a}^{4}}x\sqrt{2}+\sqrt{{a}^{4}} \right ) \left ({x}^{2}+\sqrt [4]{{a}^{4}}x\sqrt{2}+\sqrt{{a}^{4}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{a}^{4}}}}}+{\frac{\sqrt{2}}{4}\arctan \left ({x\sqrt{2}{\frac{1}{\sqrt [4]{{a}^{4}}}}}+1 \right ){\frac{1}{\sqrt [4]{{a}^{4}}}}}+{\frac{\sqrt{2}}{4}\arctan \left ({x\sqrt{2}{\frac{1}{\sqrt [4]{{a}^{4}}}}}-1 \right ){\frac{1}{\sqrt [4]{{a}^{4}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.94405, size = 651, normalized size = 5.97 \begin{align*} -\frac{1}{2} \, \sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} \arctan \left (-\sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} x + \sqrt{2} \sqrt{\sqrt{2} a^{4} \frac{1}{a^{4}}^{\frac{3}{4}} x + a^{4} \sqrt{\frac{1}{a^{4}}} + x^{2}} \frac{1}{a^{4}}^{\frac{1}{4}} - 1\right ) - \frac{1}{2} \, \sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} \arctan \left (-\sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} x + \sqrt{2} \sqrt{-\sqrt{2} a^{4} \frac{1}{a^{4}}^{\frac{3}{4}} x + a^{4} \sqrt{\frac{1}{a^{4}}} + x^{2}} \frac{1}{a^{4}}^{\frac{1}{4}} + 1\right ) - \frac{1}{8} \, \sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} \log \left (\sqrt{2} a^{4} \frac{1}{a^{4}}^{\frac{3}{4}} x + a^{4} \sqrt{\frac{1}{a^{4}}} + x^{2}\right ) + \frac{1}{8} \, \sqrt{2} \frac{1}{a^{4}}^{\frac{1}{4}} \log \left (-\sqrt{2} a^{4} \frac{1}{a^{4}}^{\frac{3}{4}} x + a^{4} \sqrt{\frac{1}{a^{4}}} + x^{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.126486, size = 19, normalized size = 0.17 \begin{align*} \frac{\operatorname{RootSum}{\left (256 t^{4} + 1, \left ( t \mapsto t \log{\left (64 t^{3} a + x \right )} \right )\right )}}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05912, size = 154, normalized size = 1.41 \begin{align*} \frac{\sqrt{2}{\left | a \right |} \arctan \left (\frac{\sqrt{2}{\left (\sqrt{2}{\left | a \right |} + 2 \, x\right )}}{2 \,{\left | a \right |}}\right )}{4 \, a^{2}} + \frac{\sqrt{2}{\left | a \right |} \arctan \left (-\frac{\sqrt{2}{\left (\sqrt{2}{\left | a \right |} - 2 \, x\right )}}{2 \,{\left | a \right |}}\right )}{4 \, a^{2}} - \frac{\sqrt{2}{\left | a \right |} \log \left (\sqrt{2} x{\left | a \right |} + x^{2} +{\left | a \right |}^{2}\right )}{8 \, a^{2}} + \frac{\sqrt{2}{\left | a \right |} \log \left (-\sqrt{2} x{\left | a \right |} + x^{2} +{\left | a \right |}^{2}\right )}{8 \, a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]