Optimal. Leaf size=63 \[ \frac {3 x}{4}-x^2-\frac {\coth (x)}{2}-\frac {1}{2} x \coth ^2(x)+2 x \log \left (1-e^{2 x}\right )+\text {PolyLog}\left (2,e^{2 x}\right )-\frac {1}{4} \cosh (x) \sinh (x)+\frac {1}{2} x \sinh ^2(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 10, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {5558, 5480,
2715, 8, 3797, 2221, 2317, 2438, 3801, 3554} \begin {gather*} \text {Li}_2\left (e^{2 x}\right )-x^2+\frac {3 x}{4}+2 x \log \left (1-e^{2 x}\right )+\frac {1}{2} x \sinh ^2(x)-\frac {1}{2} x \coth ^2(x)-\frac {\coth (x)}{2}-\frac {1}{4} \sinh (x) \cosh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2221
Rule 2317
Rule 2438
Rule 2715
Rule 3554
Rule 3797
Rule 3801
Rule 5480
Rule 5558
Rubi steps
\begin {align*} \int x \cosh ^2(x) \coth ^3(x) \, dx &=\int x \cosh ^2(x) \coth (x) \, dx+\int x \coth ^3(x) \, dx\\ &=-\frac {1}{2} x \coth ^2(x)+\frac {1}{2} \int \coth ^2(x) \, dx+2 \int x \coth (x) \, dx+\int x \cosh (x) \sinh (x) \, dx\\ &=-\frac {\coth (x)}{2}-\frac {1}{2} x \coth ^2(x)+\frac {1}{2} x \sinh ^2(x)+\frac {\int 1 \, dx}{2}-\frac {1}{2} \int \sinh ^2(x) \, dx+2 \left (-\frac {x^2}{2}-2 \int \frac {e^{2 x} x}{1-e^{2 x}} \, dx\right )\\ &=\frac {x}{2}-\frac {\coth (x)}{2}-\frac {1}{2} x \coth ^2(x)-\frac {1}{4} \cosh (x) \sinh (x)+\frac {1}{2} x \sinh ^2(x)+\frac {\int 1 \, dx}{4}+2 \left (-\frac {x^2}{2}+x \log \left (1-e^{2 x}\right )-\int \log \left (1-e^{2 x}\right ) \, dx\right )\\ &=\frac {3 x}{4}-\frac {\coth (x)}{2}-\frac {1}{2} x \coth ^2(x)-\frac {1}{4} \cosh (x) \sinh (x)+\frac {1}{2} x \sinh ^2(x)+2 \left (-\frac {x^2}{2}+x \log \left (1-e^{2 x}\right )-\frac {1}{2} \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 x}\right )\right )\\ &=\frac {3 x}{4}-\frac {\coth (x)}{2}-\frac {1}{2} x \coth ^2(x)+2 \left (-\frac {x^2}{2}+x \log \left (1-e^{2 x}\right )+\frac {\text {Li}_2\left (e^{2 x}\right )}{2}\right )-\frac {1}{4} \cosh (x) \sinh (x)+\frac {1}{2} x \sinh ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 56, normalized size = 0.89 \begin {gather*} \frac {1}{8} \left (8 x^2+2 x \cosh (2 x)-4 \coth (x)-4 x \text {csch}^2(x)+16 x \log \left (1-e^{-2 x}\right )-8 \text {PolyLog}\left (2,e^{-2 x}\right )-\sinh (2 x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.36, size = 82, normalized size = 1.30
method | result | size |
risch | \(-x^{2}+\left (-\frac {1}{16}+\frac {x}{8}\right ) {\mathrm e}^{2 x}+\left (\frac {1}{16}+\frac {x}{8}\right ) {\mathrm e}^{-2 x}-\frac {2 x \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x}-1}{\left ({\mathrm e}^{2 x}-1\right )^{2}}+2 x \ln \left (1-{\mathrm e}^{x}\right )+2 \polylog \left (2, {\mathrm e}^{x}\right )+2 x \ln \left ({\mathrm e}^{x}+1\right )+2 \polylog \left (2, -{\mathrm e}^{x}\right )\) | \(82\) |
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. 146 vs.
\(2 (50) = 100\).
time = 0.31, size = 146, normalized size = 2.32 \begin {gather*} -2 \, x^{2} + 2 \, x \log \left (e^{x} + 1\right ) + 2 \, x \log \left (-e^{x} + 1\right ) + \frac {5}{8} \, x + \frac {16 \, x^{2} + {\left (2 \, x - 1\right )} e^{\left (6 \, x\right )} + 2 \, {\left (8 \, x^{2} - 2 \, x + 1\right )} e^{\left (4 \, x\right )} - {\left (32 \, x^{2} + 8 \, x + 11\right )} e^{\left (2 \, x\right )} + {\left (2 \, x + 1\right )} e^{\left (-2 \, x\right )} - 14 \, x + 9}{16 \, {\left (e^{\left (4 \, x\right )} - 2 \, e^{\left (2 \, x\right )} + 1\right )}} - \frac {5 \, {\left (2 \, x e^{\left (4 \, x\right )} + e^{\left (2 \, x\right )} - 1\right )}}{16 \, {\left (e^{\left (4 \, x\right )} - 2 \, e^{\left (2 \, x\right )} + 1\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 [B] Leaf count of result is larger than twice the leaf count of optimal. 916 vs.
\(2 (50) = 100\).
time = 0.36, size = 916, normalized size = 14.54 \begin {gather*} \frac {{\left (2 \, x - 1\right )} \cosh \left (x\right )^{8} + 8 \, {\left (2 \, x - 1\right )} \cosh \left (x\right ) \sinh \left (x\right )^{7} + {\left (2 \, x - 1\right )} \sinh \left (x\right )^{8} - 2 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )^{6} + 2 \, {\left (14 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{2} - 8 \, x^{2} - 2 \, x + 1\right )} \sinh \left (x\right )^{6} + 4 \, {\left (14 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{3} - 3 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{5} + 4 \, {\left (8 \, x^{2} - 7 \, x - 4\right )} \cosh \left (x\right )^{4} + 2 \, {\left (35 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{4} - 15 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )^{2} + 16 \, x^{2} - 14 \, x - 8\right )} \sinh \left (x\right )^{4} + 8 \, {\left (7 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{5} - 5 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )^{3} + 2 \, {\left (8 \, x^{2} - 7 \, x - 4\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} - 2 \, {\left (8 \, x^{2} + 2 \, x - 7\right )} \cosh \left (x\right )^{2} + 2 \, {\left (14 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{6} - 15 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )^{4} + 12 \, {\left (8 \, x^{2} - 7 \, x - 4\right )} \cosh \left (x\right )^{2} - 8 \, x^{2} - 2 \, x + 7\right )} \sinh \left (x\right )^{2} + 32 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + {\left (15 \, \cosh \left (x\right )^{2} - 2\right )} \sinh \left (x\right )^{4} - 2 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 2 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (15 \, \cosh \left (x\right )^{4} - 12 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + 2 \, {\left (3 \, \cosh \left (x\right )^{5} - 4 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 32 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + {\left (15 \, \cosh \left (x\right )^{2} - 2\right )} \sinh \left (x\right )^{4} - 2 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 2 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (15 \, \cosh \left (x\right )^{4} - 12 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + 2 \, {\left (3 \, \cosh \left (x\right )^{5} - 4 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) + 32 \, {\left (x \cosh \left (x\right )^{6} + 6 \, x \cosh \left (x\right ) \sinh \left (x\right )^{5} + x \sinh \left (x\right )^{6} - 2 \, x \cosh \left (x\right )^{4} + {\left (15 \, x \cosh \left (x\right )^{2} - 2 \, x\right )} \sinh \left (x\right )^{4} + 4 \, {\left (5 \, x \cosh \left (x\right )^{3} - 2 \, x \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + x \cosh \left (x\right )^{2} + {\left (15 \, x \cosh \left (x\right )^{4} - 12 \, x \cosh \left (x\right )^{2} + x\right )} \sinh \left (x\right )^{2} + 2 \, {\left (3 \, x \cosh \left (x\right )^{5} - 4 \, x \cosh \left (x\right )^{3} + x \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + 32 \, {\left (x \cosh \left (x\right )^{6} + 6 \, x \cosh \left (x\right ) \sinh \left (x\right )^{5} + x \sinh \left (x\right )^{6} - 2 \, x \cosh \left (x\right )^{4} + {\left (15 \, x \cosh \left (x\right )^{2} - 2 \, x\right )} \sinh \left (x\right )^{4} + 4 \, {\left (5 \, x \cosh \left (x\right )^{3} - 2 \, x \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + x \cosh \left (x\right )^{2} + {\left (15 \, x \cosh \left (x\right )^{4} - 12 \, x \cosh \left (x\right )^{2} + x\right )} \sinh \left (x\right )^{2} + 2 \, {\left (3 \, x \cosh \left (x\right )^{5} - 4 \, x \cosh \left (x\right )^{3} + x \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + 4 \, {\left (2 \, {\left (2 \, x - 1\right )} \cosh \left (x\right )^{7} - 3 \, {\left (8 \, x^{2} + 2 \, x - 1\right )} \cosh \left (x\right )^{5} + 4 \, {\left (8 \, x^{2} - 7 \, x - 4\right )} \cosh \left (x\right )^{3} - {\left (8 \, x^{2} + 2 \, x - 7\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + 2 \, x + 1}{16 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + {\left (15 \, \cosh \left (x\right )^{2} - 2\right )} \sinh \left (x\right )^{4} - 2 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 2 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (15 \, \cosh \left (x\right )^{4} - 12 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + 2 \, {\left (3 \, \cosh \left (x\right )^{5} - 4 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\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 x \cosh ^{2}{\left (x \right )} \coth ^{3}{\left (x \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.02 \begin {gather*} \int x\,{\mathrm {cosh}\left (x\right )}^2\,{\mathrm {coth}\left (x\right )}^3 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________