Optimal. Leaf size=44 \[ \frac {2 a^2 x}{3}-\frac {2 x^3}{9}-\frac {2}{3} a^3 \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{3} x^3 \log \left (a^2+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2505, 308, 209}
\begin {gather*} -\frac {2}{3} a^3 \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{3} x^3 \log \left (a^2+x^2\right )+\frac {2 a^2 x}{3}-\frac {2 x^3}{9} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 308
Rule 2505
Rubi steps
\begin {align*} \int x^2 \log \left (a^2+x^2\right ) \, dx &=\frac {1}{3} x^3 \log \left (a^2+x^2\right )-\frac {2}{3} \int \frac {x^4}{a^2+x^2} \, dx\\ &=\frac {1}{3} x^3 \log \left (a^2+x^2\right )-\frac {2}{3} \int \left (-a^2+x^2+\frac {a^4}{a^2+x^2}\right ) \, dx\\ &=\frac {2 a^2 x}{3}-\frac {2 x^3}{9}+\frac {1}{3} x^3 \log \left (a^2+x^2\right )-\frac {1}{3} \left (2 a^4\right ) \int \frac {1}{a^2+x^2} \, dx\\ &=\frac {2 a^2 x}{3}-\frac {2 x^3}{9}-\frac {2}{3} a^3 \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{3} x^3 \log \left (a^2+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 44, normalized size = 1.00 \begin {gather*} \frac {2 a^2 x}{3}-\frac {2 x^3}{9}-\frac {2}{3} a^3 \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{3} x^3 \log \left (a^2+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains complex when optimal does not.
time = 2.20, size = 45, normalized size = 1.02 \begin {gather*} \frac {I}{3} a^3 \left (\text {Log}\left [-I a+x\right ]-\text {Log}\left [I a+x\right ]\right )+\frac {2 a^2 x}{3}-\frac {2 x^3}{9}+\frac {x^3 \text {Log}\left [a^2+x^2\right ]}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 37, normalized size = 0.84
method | result | size |
default | \(\frac {2 a^{2} x}{3}-\frac {2 x^{3}}{9}-\frac {2 a^{3} \arctan \left (\frac {x}{a}\right )}{3}+\frac {x^{3} \ln \left (a^{2}+x^{2}\right )}{3}\) | \(37\) |
risch | \(\frac {2 a^{2} x}{3}-\frac {2 x^{3}}{9}-\frac {2 a^{3} \arctan \left (\frac {x}{a}\right )}{3}+\frac {x^{3} \ln \left (a^{2}+x^{2}\right )}{3}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 36, normalized size = 0.82 \begin {gather*} -\frac {2}{3} \, a^{3} \arctan \left (\frac {x}{a}\right ) + \frac {1}{3} \, x^{3} \log \left (a^{2} + x^{2}\right ) + \frac {2}{3} \, a^{2} x - \frac {2}{9} \, x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 36, normalized size = 0.82 \begin {gather*} -\frac {2}{3} \, a^{3} \arctan \left (\frac {x}{a}\right ) + \frac {1}{3} \, x^{3} \log \left (a^{2} + x^{2}\right ) + \frac {2}{3} \, a^{2} x - \frac {2}{9} \, x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 0.09, size = 53, normalized size = 1.20 \begin {gather*} - 2 a^{3} \left (- \frac {i \log {\left (- i a + x \right )}}{6} + \frac {i \log {\left (i a + x \right )}}{6}\right ) + \frac {2 a^{2} x}{3} + \frac {x^{3} \log {\left (a^{2} + x^{2} \right )}}{3} - \frac {2 x^{3}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 50, normalized size = 1.14 \begin {gather*} \frac {1}{3} x^{3} \ln \left (a^{2}+x^{2}\right )-2 \left (\frac {3 x^{3}-9 x a^{2}}{27}+\frac {2 a^{4} \arctan \left (\frac {x}{a}\right )}{2\cdot 3 a}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 65, normalized size = 1.48 \begin {gather*} \frac {2\,a^2\,x}{3}-\frac {\ln \left (x-\sqrt {-a^2}\right )\,{\left (-a^2\right )}^{3/2}}{3}+\frac {x^3\,\ln \left (a^2+x^2\right )}{3}+\frac {\ln \left (x+\sqrt {-a^2}\right )\,{\left (-a^2\right )}^{3/2}}{3}-\frac {2\,x^3}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________