Optimal. Leaf size=30 \[ -2 x+2 a \tanh ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} x \log \left (\left (-a^2+x^2\right )^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {12, 2498, 327,
213} \begin {gather*} \frac {1}{2} x \log \left (\left (x^2-a^2\right )^2\right )+2 a \tanh ^{-1}\left (\frac {x}{a}\right )-2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 327
Rule 2498
Rubi steps
\begin {align*} \int \frac {1}{2} \log \left (\left (-a^2+x^2\right )^2\right ) \, dx &=\frac {1}{2} \int \log \left (\left (-a^2+x^2\right )^2\right ) \, dx\\ &=\frac {1}{2} x \log \left (\left (-a^2+x^2\right )^2\right )-2 \int \frac {x^2}{-a^2+x^2} \, dx\\ &=-2 x+\frac {1}{2} x \log \left (\left (-a^2+x^2\right )^2\right )-\left (2 a^2\right ) \int \frac {1}{-a^2+x^2} \, dx\\ &=-2 x+2 a \tanh ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} x \log \left (\left (-a^2+x^2\right )^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 31, normalized size = 1.03 \begin {gather*} \frac {1}{2} \left (-4 x+4 a \tanh ^{-1}\left (\frac {x}{a}\right )+x \log \left (\left (a^2-x^2\right )^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.95, size = 35, normalized size = 1.17 \begin {gather*} -a \left (\text {Log}\left [-a+x\right ]-\text {Log}\left [a+x\right ]\right )-2 x+\frac {x \text {Log}\left [{\left (a^2-x^2\right )}^2\right ]}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 35, normalized size = 1.17
method | result | size |
default | \(\frac {x \ln \left (\left (a^{2}-x^{2}\right )^{2}\right )}{2}-2 x +a \ln \left (a +x \right )-a \ln \left (a -x \right )\) | \(35\) |
risch | \(\frac {x \ln \left (\left (-a^{2}+x^{2}\right )^{2}\right )}{2}-2 x -a \ln \left (-a +x \right )+a \ln \left (a +x \right )\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 34, normalized size = 1.13 \begin {gather*} \frac {1}{2} \, x \log \left ({\left (a^{2} - x^{2}\right )}^{2}\right ) + a \log \left (a + x\right ) - a \log \left (-a + x\right ) - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.30, size = 38, normalized size = 1.27 \begin {gather*} \frac {1}{2} \, x \log \left (a^{4} - 2 \, a^{2} x^{2} + x^{4}\right ) + a \log \left (a + x\right ) - a \log \left (-a + x\right ) - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 32, normalized size = 1.07 \begin {gather*} - 2 a \left (\frac {\log {\left (- a + x \right )}}{2} - \frac {\log {\left (a + x \right )}}{2}\right ) + \frac {x \log {\left (\left (- a^{2} + x^{2}\right )^{2} \right )}}{2} - 2 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 42, normalized size = 1.40 \begin {gather*} \frac {x \ln \left (\left (-a^{2}+x^{2}\right )^{2}\right )+4 \left (-\frac {1}{2} a \ln \left |x-a\right |+\frac {1}{2} a \ln \left |x+a\right |-x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.40, size = 28, normalized size = 0.93 \begin {gather*} 2\,a\,\mathrm {atanh}\left (\frac {x}{a}\right )-2\,x+\frac {x\,\ln \left ({\left (a^2-x^2\right )}^2\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________