Optimal. Leaf size=18 \[ -\frac {1}{2} \tanh ^{-1}(\cosh (x))-\frac {1}{2 (1+\cosh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 24, normalized size of antiderivative = 1.33, number of steps
used = 6, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {4482, 2785,
2686, 30, 2691, 3855} \begin {gather*} \frac {\text {csch}^2(x)}{2}-\frac {1}{2} \tanh ^{-1}(\cosh (x))-\frac {1}{2} \coth (x) \text {csch}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2686
Rule 2691
Rule 2785
Rule 3855
Rule 4482
Rubi steps
\begin {align*} \int \frac {1}{\sinh (x)+\tanh (x)} \, dx &=-\left (i \int \frac {\coth (x)}{-i-i \cosh (x)} \, dx\right )\\ &=\int \coth ^2(x) \text {csch}(x) \, dx-\int \coth (x) \text {csch}^2(x) \, dx\\ &=-\frac {1}{2} \coth (x) \text {csch}(x)+\frac {1}{2} \int \text {csch}(x) \, dx-\text {Subst}(\int x \, dx,x,-i \text {csch}(x))\\ &=-\frac {1}{2} \tanh ^{-1}(\cosh (x))-\frac {1}{2} \coth (x) \text {csch}(x)+\frac {\text {csch}^2(x)}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 35, normalized size = 1.94 \begin {gather*} -\frac {1}{2} \log \left (\cosh \left (\frac {x}{2}\right )\right )+\frac {1}{2} \log \left (\sinh \left (\frac {x}{2}\right )\right )-\frac {1}{4} \text {sech}^2\left (\frac {x}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.13, size = 17, normalized size = 0.94
method | result | size |
default | \(\frac {\left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{4}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\) | \(17\) |
risch | \(-\frac {{\mathrm e}^{x}}{\left ({\mathrm e}^{x}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2}\) | \(26\) |
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. 39 vs.
\(2 (14) = 28\).
time = 0.28, size = 39, normalized size = 2.17 \begin {gather*} -\frac {e^{\left (-x\right )}}{2 \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 1} - \frac {1}{2} \, \log \left (e^{\left (-x\right )} + 1\right ) + \frac {1}{2} \, \log \left (e^{\left (-x\right )} - 1\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. 96 vs.
\(2 (14) = 28\).
time = 0.37, size = 96, normalized size = 5.33 \begin {gather*} -\frac {{\left (\cosh \left (x\right )^{2} + 2 \, {\left (\cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (\cosh \left (x\right )^{2} + 2 \, {\left (\cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + 2 \, \cosh \left (x\right ) + 2 \, \sinh \left (x\right )}{2 \, {\left (\cosh \left (x\right )^{2} + 2 \, {\left (\cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\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 \frac {1}{\sinh {\left (x \right )} + \tanh {\left (x \right )}}\, dx \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. 43 vs.
\(2 (14) = 28\).
time = 0.41, size = 43, normalized size = 2.39 \begin {gather*} \frac {e^{\left (-x\right )} + e^{x} - 2}{4 \, {\left (e^{\left (-x\right )} + e^{x} + 2\right )}} - \frac {1}{4} \, \log \left (e^{\left (-x\right )} + e^{x} + 2\right ) + \frac {1}{4} \, \log \left (e^{\left (-x\right )} + e^{x} - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 39, normalized size = 2.17 \begin {gather*} \frac {\ln \left (1-{\mathrm {e}}^x\right )}{2}-\frac {\ln \left (-{\mathrm {e}}^x-1\right )}{2}+\frac {1}{{\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1}-\frac {1}{{\mathrm {e}}^x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________