Optimal. Leaf size=51 \[ -\frac {\tanh ^{-1}(\cosh (x))}{b}+\frac {a \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3189, 3855,
3153, 212} \begin {gather*} \frac {a \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2}}-\frac {\tanh ^{-1}(\cosh (x))}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3153
Rule 3189
Rule 3855
Rubi steps
\begin {align*} \int \frac {\coth (x)}{b \cosh (x)+a \sinh (x)} \, dx &=i \int \left (-\frac {i \text {csch}(x)}{b}-\frac {a}{b (i b \cosh (x)+i a \sinh (x))}\right ) \, dx\\ &=\frac {\int \text {csch}(x) \, dx}{b}-\frac {(i a) \int \frac {1}{i b \cosh (x)+i a \sinh (x)} \, dx}{b}\\ &=-\frac {\tanh ^{-1}(\cosh (x))}{b}+\frac {a \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,a \cosh (x)+b \sinh (x)\right )}{b}\\ &=-\frac {\tanh ^{-1}(\cosh (x))}{b}+\frac {a \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 59, normalized size = 1.16 \begin {gather*} \frac {-\frac {2 a \text {ArcTan}\left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a+b} \sqrt {a+b}}\right )}{\sqrt {-a+b} \sqrt {a+b}}+\log \left (\tanh \left (\frac {x}{2}\right )\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.72, size = 53, normalized size = 1.04
method | result | size |
default | \(-\frac {2 a \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{b \sqrt {-a^{2}+b^{2}}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{b}\) | \(53\) |
risch | \(\frac {\ln \left ({\mathrm e}^{x}-1\right )}{b}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{b}+\frac {a \ln \left ({\mathrm e}^{x}+\frac {a -b}{\sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, b}-\frac {a \ln \left ({\mathrm e}^{x}-\frac {a -b}{\sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, b}\) | \(97\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 239, normalized size = 4.69 \begin {gather*} \left [\frac {\sqrt {a^{2} - b^{2}} a \log \left (\frac {{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} + a - b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} - a + b}\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{2} b - b^{3}}, -\frac {2 \, \sqrt {-a^{2} + b^{2}} a \arctan \left (\frac {\sqrt {-a^{2} + b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )}\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{2} b - b^{3}}\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 {\coth {\left (x \right )}}{a \sinh {\left (x \right )} + b \cosh {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 60, normalized size = 1.18 \begin {gather*} -\frac {2 \, a \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} b} - \frac {\log \left (e^{x} + 1\right )}{b} + \frac {\log \left ({\left | e^{x} - 1 \right |}\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.78, size = 177, normalized size = 3.47 \begin {gather*} \frac {\ln \left (32\,a\,b-32\,b^2+32\,b^2\,{\mathrm {e}}^x-32\,a\,b\,{\mathrm {e}}^x\right )}{b}-\frac {\ln \left (32\,a\,b-32\,b^2-32\,b^2\,{\mathrm {e}}^x+32\,a\,b\,{\mathrm {e}}^x\right )}{b}-\frac {a\,\ln \left (32\,a\,b^2\,{\mathrm {e}}^x+32\,a^2\,b\,{\mathrm {e}}^x-32\,a\,b\,\sqrt {a^2-b^2}\right )\,\sqrt {a^2-b^2}}{a^2\,b-b^3}+\frac {a\,\ln \left (32\,a\,b^2\,{\mathrm {e}}^x+32\,a^2\,b\,{\mathrm {e}}^x+32\,a\,b\,\sqrt {a^2-b^2}\right )\,\sqrt {a^2-b^2}}{a^2\,b-b^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________