Optimal. Leaf size=37 \[ -4 x \tanh ^{-1}\left (e^{2 x}\right )+x \log \left (a \coth ^2(x)\right )-\text {Li}_2\left (-e^{2 x}\right )+\text {Li}_2\left (e^{2 x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {2628, 12, 5569,
4267, 2317, 2438} \begin {gather*} -\text {PolyLog}\left (2,-e^{2 x}\right )+\text {PolyLog}\left (2,e^{2 x}\right )+x \log \left (a \coth ^2(x)\right )-4 x \tanh ^{-1}\left (e^{2 x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2317
Rule 2438
Rule 2628
Rule 4267
Rule 5569
Rubi steps
\begin {align*} \int \log \left (a \coth ^2(x)\right ) \, dx &=x \log \left (a \coth ^2(x)\right )-\int -2 x \text {csch}(x) \text {sech}(x) \, dx\\ &=x \log \left (a \coth ^2(x)\right )+2 \int x \text {csch}(x) \text {sech}(x) \, dx\\ &=x \log \left (a \coth ^2(x)\right )+4 \int x \text {csch}(2 x) \, dx\\ &=-4 x \tanh ^{-1}\left (e^{2 x}\right )+x \log \left (a \coth ^2(x)\right )-2 \int \log \left (1-e^{2 x}\right ) \, dx+2 \int \log \left (1+e^{2 x}\right ) \, dx\\ &=-4 x \tanh ^{-1}\left (e^{2 x}\right )+x \log \left (a \coth ^2(x)\right )-\text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 x}\right )+\text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 x}\right )\\ &=-4 x \tanh ^{-1}\left (e^{2 x}\right )+x \log \left (a \coth ^2(x)\right )-\text {Li}_2\left (-e^{2 x}\right )+\text {Li}_2\left (e^{2 x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 47, normalized size = 1.27 \begin {gather*} -\frac {1}{2} \log \left (a \coth ^2(x)\right ) \log (1-\tanh (x))+\frac {1}{2} \log \left (a \coth ^2(x)\right ) \log (1+\tanh (x))-\text {Li}_2(-\tanh (x))+\text {Li}_2(\tanh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 47, normalized size = 1.27
method | result | size |
derivativedivides | \(\frac {\ln \left (\coth \left (x \right )+1\right ) \ln \left (a \left (\coth ^{2}\left (x \right )\right )\right )}{2}+\dilog \left (\coth \left (x \right )+1\right )-\frac {\ln \left (\coth \left (x \right )-1\right ) \ln \left (a \left (\coth ^{2}\left (x \right )\right )\right )}{2}+\dilog \left (\coth \left (x \right )\right )+\ln \left (\coth \left (x \right )-1\right ) \ln \left (\coth \left (x \right )\right )\) | \(47\) |
default | \(\frac {\ln \left (\coth \left (x \right )+1\right ) \ln \left (a \left (\coth ^{2}\left (x \right )\right )\right )}{2}+\dilog \left (\coth \left (x \right )+1\right )-\frac {\ln \left (\coth \left (x \right )-1\right ) \ln \left (a \left (\coth ^{2}\left (x \right )\right )\right )}{2}+\dilog \left (\coth \left (x \right )\right )+\ln \left (\coth \left (x \right )-1\right ) \ln \left (\coth \left (x \right )\right )\) | \(47\) |
risch | \(2 x \ln \left (1+{\mathrm e}^{2 x}\right )-\frac {i x \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right ) \mathrm {csgn}\left (\frac {i a \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{2}}{2}-\frac {i x \pi \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )^{2}\right )^{3}}{2}-\frac {i x \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )^{2}\right ) \mathrm {csgn}\left (\frac {i}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )^{2}\right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{2 x}-1\right )^{2}\right )^{3}}{2}+x \ln \left (a \right )+\frac {i x \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{2 x}-1\right )\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{2 x}-1\right )^{2}\right )}{2}-\frac {i x \pi \mathrm {csgn}\left (\frac {i a \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{3}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right ) \mathrm {csgn}\left (\frac {i a \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{2}}{2}-2 x \ln \left (1+i {\mathrm e}^{x}\right )-2 x \ln \left (1-i {\mathrm e}^{x}\right )-2 \dilog \left (1+i {\mathrm e}^{x}\right )-2 \dilog \left (1-i {\mathrm e}^{x}\right )-\frac {i x \pi \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right )^{2} \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )^{2}\right )}{2}+i x \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )^{2}\right )^{2}+\frac {i x \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (\frac {i a \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{2}}{2}-i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2 x}-1\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{2 x}-1\right )^{2}\right )^{2}-\frac {i x \pi \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{2 x}\right )^{2}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}\right )^{3}}{2}-2 \ln \left ({\mathrm e}^{x}\right ) \ln \left ({\mathrm e}^{2 x}-1\right )-2 \dilog \left ({\mathrm e}^{x}\right )+2 \dilog \left (1+{\mathrm e}^{x}\right )+2 \ln \left ({\mathrm e}^{x}\right ) \ln \left (1+{\mathrm e}^{x}\right )\) | \(560\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 59, normalized size = 1.59 \begin {gather*} x \log \left (a \coth \left (x\right )^{2}\right ) - 2 \, x \log \left (e^{\left (2 \, x\right )} + 1\right ) + 2 \, x \log \left (e^{x} + 1\right ) + 2 \, x \log \left (-e^{x} + 1\right ) - {\rm Li}_2\left (-e^{\left (2 \, x\right )}\right ) + 2 \, {\rm Li}_2\left (-e^{x}\right ) + 2 \, {\rm Li}_2\left (e^{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.43, size = 127, normalized size = 3.43 \begin {gather*} x \log \left (\frac {a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + a}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} - 1}\right ) + 2 \, x \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - 2 \, x \log \left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right ) + 1\right ) - 2 \, x \log \left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right ) + 1\right ) + 2 \, x \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + 2 \, {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - 2 \, {\rm Li}_2\left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right )\right ) - 2 \, {\rm Li}_2\left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right )\right ) + 2 \, {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \log {\left (a \coth ^{2}{\left (x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \ln \left (a\,{\mathrm {coth}\left (x\right )}^2\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________