Optimal. Leaf size=66 \[ \frac {\log (\cosh (x))}{a}+\frac {\log (1-\text {sech}(x))}{2 (a+b)}+\frac {\log (1+\text {sech}(x))}{2 (a-b)}-\frac {b^2 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 66, 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 = {3970, 908}
\begin {gather*} -\frac {b^2 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )}+\frac {\log (1-\text {sech}(x))}{2 (a+b)}+\frac {\log (\text {sech}(x)+1)}{2 (a-b)}+\frac {\log (\cosh (x))}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 908
Rule 3970
Rubi steps
\begin {align*} \int \frac {\coth (x)}{a+b \text {sech}(x)} \, dx &=-\left (b^2 \text {Subst}\left (\int \frac {1}{x (a+x) \left (b^2-x^2\right )} \, dx,x,b \text {sech}(x)\right )\right )\\ &=-\left (b^2 \text {Subst}\left (\int \left (\frac {1}{2 b^2 (a+b) (b-x)}+\frac {1}{a b^2 x}+\frac {1}{a (a-b) (a+b) (a+x)}-\frac {1}{2 (a-b) b^2 (b+x)}\right ) \, dx,x,b \text {sech}(x)\right )\right )\\ &=\frac {\log (\cosh (x))}{a}+\frac {\log (1-\text {sech}(x))}{2 (a+b)}+\frac {\log (1+\text {sech}(x))}{2 (a-b)}-\frac {b^2 \log (a+b \text {sech}(x))}{a \left (a^2-b^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 44, normalized size = 0.67 \begin {gather*} -\frac {b^2 \log (b+a \cosh (x))-a^2 \log (\sinh (x))+a b \log \left (\tanh \left (\frac {x}{2}\right )\right )}{a^3-a b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.91, size = 78, normalized size = 1.18
method | result | size |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {b^{2} \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{a \left (a +b \right ) \left (a -b \right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a +b}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}\) | \(78\) |
risch | \(\frac {x}{a}-\frac {x}{a +b}-\frac {x}{a -b}+\frac {2 b^{2} x}{\left (a^{2}-b^{2}\right ) a}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{a +b}+\frac {\ln \left ({\mathrm e}^{x}+1\right )}{a -b}-\frac {b^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a \left (a^{2}-b^{2}\right )}\) | \(103\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 67, normalized size = 1.02 \begin {gather*} -\frac {b^{2} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{3} - a b^{2}} + \frac {x}{a} + \frac {\log \left (e^{\left (-x\right )} + 1\right )}{a - b} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{a + b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 81, normalized size = 1.23 \begin {gather*} -\frac {b^{2} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} + a b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (a^{2} - a b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{3} - a b^{2}} \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 {\coth {\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 67, normalized size = 1.02 \begin {gather*} -\frac {b^{2} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{3} - a b^{2}} + \frac {\log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{2 \, {\left (a - b\right )}} + \frac {\log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{2 \, {\left (a + b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.72, size = 271, normalized size = 4.11 \begin {gather*} \frac {\ln \left (64\,a\,b^4+32\,a^4\,b+32\,b^5+96\,a^2\,b^3+64\,a^3\,b^2+32\,b^5\,{\mathrm {e}}^x+64\,a\,b^4\,{\mathrm {e}}^x+32\,a^4\,b\,{\mathrm {e}}^x+96\,a^2\,b^3\,{\mathrm {e}}^x+64\,a^3\,b^2\,{\mathrm {e}}^x\right )}{a-b}-\frac {x}{a}+\frac {\ln \left (64\,a\,b^4-32\,a^4\,b-32\,b^5-96\,a^2\,b^3+64\,a^3\,b^2+32\,b^5\,{\mathrm {e}}^x-64\,a\,b^4\,{\mathrm {e}}^x+32\,a^4\,b\,{\mathrm {e}}^x+96\,a^2\,b^3\,{\mathrm {e}}^x-64\,a^3\,b^2\,{\mathrm {e}}^x\right )}{a+b}+\frac {b^2\,\ln \left (4\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+4\,a^5+4\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x+4\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+8\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}+8\,a^2\,b^3\,{\mathrm {e}}^x\right )}{a\,b^2-a^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________