Optimal. Leaf size=40 \[ \frac {1}{2 a (1+\cosh (x))}+\frac {\log (1-\cosh (x))}{4 a}+\frac {3 \log (1+\cosh (x))}{4 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3964, 90}
\begin {gather*} \frac {1}{2 a (\cosh (x)+1)}+\frac {\log (1-\cosh (x))}{4 a}+\frac {3 \log (\cosh (x)+1)}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 3964
Rubi steps
\begin {align*} \int \frac {\coth (x)}{a+a \text {sech}(x)} \, dx &=-\left (a^2 \text {Subst}\left (\int \frac {x^2}{(a-a x) (a+a x)^2} \, dx,x,\cosh (x)\right )\right )\\ &=-\left (a^2 \text {Subst}\left (\int \left (-\frac {1}{4 a^3 (-1+x)}+\frac {1}{2 a^3 (1+x)^2}-\frac {3}{4 a^3 (1+x)}\right ) \, dx,x,\cosh (x)\right )\right )\\ &=\frac {1}{2 a (1+\cosh (x))}+\frac {\log (1-\cosh (x))}{4 a}+\frac {3 \log (1+\cosh (x))}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 44, normalized size = 1.10 \begin {gather*} \frac {\left (1+2 \cosh ^2\left (\frac {x}{2}\right ) \left (3 \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.79, size = 38, normalized size = 0.95
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 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-2 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 a}\) | \(38\) |
risch | \(-\frac {x}{a}+\frac {{\mathrm e}^{x}}{\left ({\mathrm e}^{x}+1\right )^{2} a}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2 a}+\frac {3 \ln \left ({\mathrm e}^{x}+1\right )}{2 a}\) | \(40\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 52, normalized size = 1.30 \begin {gather*} \frac {x}{a} + \frac {e^{\left (-x\right )}}{2 \, a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a} + \frac {3 \, \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. 136 vs.
\(2 (34) = 68\).
time = 0.35, size = 136, normalized size = 3.40 \begin {gather*} -\frac {2 \, x \cosh \left (x\right )^{2} + 2 \, x \sinh \left (x\right )^{2} + 2 \, {\left (2 \, x - 1\right )} \cosh \left (x\right ) - 3 \, {\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 \, {\left (2 \, x \cosh \left (x\right ) + 2 \, x - 1\right )} \sinh \left (x\right ) + 2 \, x}{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 {\coth {\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.40, size = 56, normalized size = 1.40 \begin {gather*} \frac {3 \, \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 {3 \, e^{\left (-x\right )} + 3 \, 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.37, size = 65, normalized size = 1.62 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{2\,x}-1\right )}{a}-\frac {x}{a}-\frac {1}{a+2\,a\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}}+\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {-a^2}}{a}\right )}{\sqrt {-a^2}}+\frac {1}{a+a\,{\mathrm {e}}^x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________