Optimal. Leaf size=31 \[ 8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \log (\sinh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3559, 3558,
3556} \begin {gather*} 8 x-\frac {1}{3} (\coth (x)+1)^3-(\coth (x)+1)^2-4 \coth (x)+8 \log (\sinh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3558
Rule 3559
Rubi steps
\begin {align*} \int (1+\coth (x))^4 \, dx &=-\frac {1}{3} (1+\coth (x))^3+2 \int (1+\coth (x))^3 \, dx\\ &=-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+4 \int (1+\coth (x))^2 \, dx\\ &=8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \int \coth (x) \, dx\\ &=8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \log (\sinh (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.13, size = 84, normalized size = 2.71 \begin {gather*} \frac {(1+\coth (x))^4 \sinh (x) \left (-\cosh ^3(x) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};\tanh ^2(x)\right )+3 \sinh (x) \left (-2 \cosh ^2(x)-6 \cosh (x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\tanh ^2(x)\right ) \sinh (x)+(x+8 \log (\cosh (x))+8 \log (\tanh (x))) \sinh ^2(x)\right )\right )}{3 (\cosh (x)+\sinh (x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 25, normalized size = 0.81
method | result | size |
derivativedivides | \(-\frac {\left (\coth ^{3}\left (x \right )\right )}{3}-2 \left (\coth ^{2}\left (x \right )\right )-7 \coth \left (x \right )-8 \ln \left (\coth \left (x \right )-1\right )\) | \(25\) |
default | \(-\frac {\left (\coth ^{3}\left (x \right )\right )}{3}-2 \left (\coth ^{2}\left (x \right )\right )-7 \coth \left (x \right )-8 \ln \left (\coth \left (x \right )-1\right )\) | \(25\) |
risch | \(-\frac {4 \left (18 \,{\mathrm e}^{4 x}-27 \,{\mathrm e}^{2 x}+11\right )}{3 \left ({\mathrm e}^{2 x}-1\right )^{3}}+8 \ln \left ({\mathrm e}^{2 x}-1\right )\) | \(35\) |
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. 95 vs.
\(2 (29) = 58\).
time = 0.30, size = 95, normalized size = 3.06 \begin {gather*} 12 \, x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 2\right )}}{3 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1\right )}} + \frac {8 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} + \frac {12}{e^{\left (-2 \, x\right )} - 1} + 4 \, \log \left (e^{\left (-x\right )} + 1\right ) + 4 \, \log \left (e^{\left (-x\right )} - 1\right ) + 4 \, \log \left (\sinh \left (x\right )\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. 273 vs.
\(2 (29) = 58\).
time = 0.36, size = 273, normalized size = 8.81 \begin {gather*} -\frac {4 \, {\left (18 \, \cosh \left (x\right )^{4} + 72 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + 18 \, \sinh \left (x\right )^{4} + 27 \, {\left (4 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{2} - 27 \, \cosh \left (x\right )^{2} - 6 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + 3 \, {\left (5 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 3 \, {\left (5 \, \cosh \left (x\right )^{4} - 6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )^{2} + 6 \, {\left (\cosh \left (x\right )^{5} - 2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 18 \, {\left (4 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right ) + 11\right )}}{3 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + 3 \, {\left (5 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 3 \, {\left (5 \, \cosh \left (x\right )^{4} - 6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )^{2} + 6 \, {\left (\cosh \left (x\right )^{5} - 2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.57, size = 37, normalized size = 1.19 \begin {gather*} 16 x - 8 \log {\left (\tanh {\left (x \right )} + 1 \right )} + 8 \log {\left (\tanh {\left (x \right )} \right )} - \frac {7}{\tanh {\left (x \right )}} - \frac {2}{\tanh ^{2}{\left (x \right )}} - \frac {1}{3 \tanh ^{3}{\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 35, normalized size = 1.13 \begin {gather*} -\frac {4 \, {\left (18 \, e^{\left (4 \, x\right )} - 27 \, e^{\left (2 \, x\right )} + 11\right )}}{3 \, {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} + 8 \, \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.14, size = 60, normalized size = 1.94 \begin {gather*} 8\,\ln \left ({\mathrm {e}}^{2\,x}-1\right )-\frac {8}{3\,\left (3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1\right )}-\frac {12}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {24}{{\mathrm {e}}^{2\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________