Optimal. Leaf size=54 \[ \frac {x \coth ^{-1}(a x)}{a}-\frac {\coth ^{-1}(a x)^2}{2 a^2}+\frac {1}{2} x^2 \coth ^{-1}(a x)^2+\frac {\log \left (1-a^2 x^2\right )}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {6038, 6128,
6022, 266, 6096} \begin {gather*} \frac {\log \left (1-a^2 x^2\right )}{2 a^2}-\frac {\coth ^{-1}(a x)^2}{2 a^2}+\frac {1}{2} x^2 \coth ^{-1}(a x)^2+\frac {x \coth ^{-1}(a x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 6022
Rule 6038
Rule 6096
Rule 6128
Rubi steps
\begin {align*} \int x \coth ^{-1}(a x)^2 \, dx &=\frac {1}{2} x^2 \coth ^{-1}(a x)^2-a \int \frac {x^2 \coth ^{-1}(a x)}{1-a^2 x^2} \, dx\\ &=\frac {1}{2} x^2 \coth ^{-1}(a x)^2+\frac {\int \coth ^{-1}(a x) \, dx}{a}-\frac {\int \frac {\coth ^{-1}(a x)}{1-a^2 x^2} \, dx}{a}\\ &=\frac {x \coth ^{-1}(a x)}{a}-\frac {\coth ^{-1}(a x)^2}{2 a^2}+\frac {1}{2} x^2 \coth ^{-1}(a x)^2-\int \frac {x}{1-a^2 x^2} \, dx\\ &=\frac {x \coth ^{-1}(a x)}{a}-\frac {\coth ^{-1}(a x)^2}{2 a^2}+\frac {1}{2} x^2 \coth ^{-1}(a x)^2+\frac {\log \left (1-a^2 x^2\right )}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 43, normalized size = 0.80 \begin {gather*} \frac {2 a x \coth ^{-1}(a x)+\left (-1+a^2 x^2\right ) \coth ^{-1}(a x)^2+\log \left (1-a^2 x^2\right )}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(126\) vs.
\(2(48)=96\).
time = 0.11, size = 127, normalized size = 2.35
method | result | size |
risch | \(\frac {\left (a^{2} x^{2}-1\right ) \ln \left (a x +1\right )^{2}}{8 a^{2}}-\frac {\left (x^{2} \ln \left (a x -1\right ) a^{2}-2 a x -\ln \left (a x -1\right )\right ) \ln \left (a x +1\right )}{4 a^{2}}+\frac {x^{2} \ln \left (a x -1\right )^{2}}{8}-\frac {x \ln \left (a x -1\right )}{2 a}-\frac {\ln \left (a x -1\right )^{2}}{8 a^{2}}+\frac {\ln \left (a^{2} x^{2}-1\right )}{2 a^{2}}\) | \(114\) |
derivativedivides | \(\frac {\frac {a^{2} x^{2} \mathrm {arccoth}\left (a x \right )^{2}}{2}+a x \,\mathrm {arccoth}\left (a x \right )+\frac {\mathrm {arccoth}\left (a x \right ) \ln \left (a x -1\right )}{2}-\frac {\mathrm {arccoth}\left (a x \right ) \ln \left (a x +1\right )}{2}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (a x -1\right )^{2}}{8}+\frac {\ln \left (a x -1\right )}{2}+\frac {\ln \left (a x +1\right )}{2}+\frac {\ln \left (a x +1\right )^{2}}{8}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{4}}{a^{2}}\) | \(127\) |
default | \(\frac {\frac {a^{2} x^{2} \mathrm {arccoth}\left (a x \right )^{2}}{2}+a x \,\mathrm {arccoth}\left (a x \right )+\frac {\mathrm {arccoth}\left (a x \right ) \ln \left (a x -1\right )}{2}-\frac {\mathrm {arccoth}\left (a x \right ) \ln \left (a x +1\right )}{2}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (a x -1\right )^{2}}{8}+\frac {\ln \left (a x -1\right )}{2}+\frac {\ln \left (a x +1\right )}{2}+\frac {\ln \left (a x +1\right )^{2}}{8}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{4}}{a^{2}}\) | \(127\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs.
\(2 (48) = 96\).
time = 0.25, size = 97, normalized size = 1.80 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {arcoth}\left (a x\right )^{2} + \frac {1}{2} \, a {\left (\frac {2 \, x}{a^{2}} - \frac {\log \left (a x + 1\right )}{a^{3}} + \frac {\log \left (a x - 1\right )}{a^{3}}\right )} \operatorname {arcoth}\left (a x\right ) - \frac {2 \, {\left (\log \left (a x - 1\right ) - 2\right )} \log \left (a x + 1\right ) - \log \left (a x + 1\right )^{2} - \log \left (a x - 1\right )^{2} - 4 \, \log \left (a x - 1\right )}{8 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 62, normalized size = 1.15 \begin {gather*} \frac {4 \, a x \log \left (\frac {a x + 1}{a x - 1}\right ) + {\left (a^{2} x^{2} - 1\right )} \log \left (\frac {a x + 1}{a x - 1}\right )^{2} + 4 \, \log \left (a^{2} x^{2} - 1\right )}{8 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.19, size = 60, normalized size = 1.11 \begin {gather*} \begin {cases} \frac {x^{2} \operatorname {acoth}^{2}{\left (a x \right )}}{2} + \frac {x \operatorname {acoth}{\left (a x \right )}}{a} + \frac {\log {\left (a x + 1 \right )}}{a^{2}} - \frac {\operatorname {acoth}^{2}{\left (a x \right )}}{2 a^{2}} - \frac {\operatorname {acoth}{\left (a x \right )}}{a^{2}} & \text {for}\: a \neq 0 \\- \frac {\pi ^{2} x^{2}}{8} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 154 vs.
\(2 (48) = 96\).
time = 0.40, size = 154, normalized size = 2.85 \begin {gather*} \frac {1}{2} \, a {\left (\frac {{\left (a x + 1\right )} \log \left (\frac {a x + 1}{a x - 1}\right )^{2}}{{\left (\frac {{\left (a x + 1\right )}^{2} a^{3}}{{\left (a x - 1\right )}^{2}} - \frac {2 \, {\left (a x + 1\right )} a^{3}}{a x - 1} + a^{3}\right )} {\left (a x - 1\right )}} + \frac {2 \, \log \left (\frac {a x + 1}{a x - 1}\right )}{\frac {{\left (a x + 1\right )} a^{3}}{a x - 1} - a^{3}} - \frac {2 \, \log \left (\frac {a x + 1}{a x - 1} - 1\right )}{a^{3}} + \frac {2 \, \log \left (\frac {a x + 1}{a x - 1}\right )}{a^{3}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.21, size = 44, normalized size = 0.81 \begin {gather*} \frac {x^2\,{\mathrm {acoth}\left (a\,x\right )}^2}{2}+\frac {-\frac {{\mathrm {acoth}\left (a\,x\right )}^2}{2}+a\,x\,\mathrm {acoth}\left (a\,x\right )+\frac {\ln \left (a^2\,x^2-1\right )}{2}}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________