Optimal. Leaf size=13 \[ 2 x-\coth (x)+2 \log (\sinh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3558, 3556}
\begin {gather*} 2 x-\coth (x)+2 \log (\sinh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3558
Rubi steps
\begin {align*} \int (1+\coth (x))^2 \, dx &=2 x-\coth (x)+2 \int \coth (x) \, dx\\ &=2 x-\coth (x)+2 \log (\sinh (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 13, normalized size = 1.00 \begin {gather*} 2 x-\coth (x)+2 \log (\sinh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 13, normalized size = 1.00
method | result | size |
derivativedivides | \(-\coth \left (x \right )-2 \ln \left (\coth \left (x \right )-1\right )\) | \(13\) |
default | \(-\coth \left (x \right )-2 \ln \left (\coth \left (x \right )-1\right )\) | \(13\) |
risch | \(-\frac {2}{{\mathrm e}^{2 x}-1}+2 \ln \left ({\mathrm e}^{2 x}-1\right )\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 19, normalized size = 1.46 \begin {gather*} 2 \, x + \frac {2}{e^{\left (-2 \, x\right )} - 1} + 2 \, \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. 53 vs.
\(2 (13) = 26\).
time = 0.36, size = 53, normalized size = 4.08 \begin {gather*} \frac {2 \, {\left ({\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - 1\right )}}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 22, normalized size = 1.69 \begin {gather*} 4 x - 2 \log {\left (\tanh {\left (x \right )} + 1 \right )} + 2 \log {\left (\tanh {\left (x \right )} \right )} - \frac {1}{\tanh {\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 21, normalized size = 1.62 \begin {gather*} -\frac {2}{e^{\left (2 \, x\right )} - 1} + 2 \, \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 = 20, normalized size = 1.54 \begin {gather*} 2\,\ln \left ({\mathrm {e}}^{2\,x}-1\right )-\frac {2}{{\mathrm {e}}^{2\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________