Optimal. Leaf size=33 \[ -\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {\coth (x) \text {csch}(x)}{2 a}+\frac {\text {csch}^2(x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {3957, 2785,
2686, 30, 2691, 3855} \begin {gather*} \frac {\text {csch}^2(x)}{2 a}-\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {\coth (x) \text {csch}(x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2686
Rule 2691
Rule 2785
Rule 3855
Rule 3957
Rubi steps
\begin {align*} \int \frac {\text {csch}(x)}{a+a \text {sech}(x)} \, dx &=-\int \frac {\coth (x)}{-a-a \cosh (x)} \, dx\\ &=\frac {\int \coth ^2(x) \text {csch}(x) \, dx}{a}-\frac {\int \coth (x) \text {csch}^2(x) \, dx}{a}\\ &=-\frac {\coth (x) \text {csch}(x)}{2 a}+\frac {\int \text {csch}(x) \, dx}{2 a}-\frac {\text {Subst}(\int x \, dx,x,-i \text {csch}(x))}{a}\\ &=-\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {\coth (x) \text {csch}(x)}{2 a}+\frac {\text {csch}^2(x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 44, normalized size = 1.33 \begin {gather*} -\frac {\left (1+2 \cosh ^2\left (\frac {x}{2}\right ) \left (\log \left (\cosh \left (\frac {x}{2}\right )\right )-\log \left (\sinh \left (\frac {x}{2}\right )\right )\right )\right ) \text {sech}(x)}{2 a (1+\text {sech}(x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.71, size = 20, normalized size = 0.61
method | result | size |
default | \(\frac {\frac {\left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{2}+\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2 a}\) | \(20\) |
risch | \(-\frac {{\mathrm e}^{x}}{\left ({\mathrm e}^{x}+1\right )^{2} a}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2 a}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2 a}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 48, normalized size = 1.45 \begin {gather*} -\frac {e^{\left (-x\right )}}{2 \, a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a} - \frac {\log \left (e^{\left (-x\right )} + 1\right )}{2 \, a} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{2 \, a} \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. 103 vs.
\(2 (27) = 54\).
time = 0.37, size = 103, normalized size = 3.12 \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 (a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a\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*} \frac {\int \frac {\operatorname {csch}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 52, normalized size = 1.58 \begin {gather*} -\frac {\log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{4 \, a} + \frac {\log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{4 \, a} + \frac {e^{\left (-x\right )} + e^{x} - 2}{4 \, a {\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 = 1.44, size = 51, normalized size = 1.55 \begin {gather*} \frac {1}{a\,\left ({\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1\right )}-\frac {1}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {-a^2}}{a}\right )}{\sqrt {-a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________