Optimal. Leaf size=51 \[ \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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, 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 = {3110, 3770, 3074, 206} \[ \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} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3110
Rule 3770
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 \operatorname {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.08, size = 59, normalized size = 1.16 \[ \frac {\log \left (\tanh \left (\frac {x}{2}\right )\right )-\frac {2 a \tan ^{-1}\left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-a} \sqrt {a+b}}\right )}{\sqrt {b-a} \sqrt {a+b}}}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 239, normalized size = 4.69 \[ \left [\frac {\sqrt {a^{2} - b^{2}} a \log \left (\frac {{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} + a - b}{{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} - a + b}\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 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 \relax (x) + {\left (a + b\right )} \sinh \relax (x)}\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{2} b - b^{3}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 60, normalized size = 1.18 \[ -\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.30, size = 53, normalized size = 1.04 \[ -\frac {2 a \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.78, size = 177, normalized size = 3.47 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\coth {\relax (x )}}{a \sinh {\relax (x )} + b \cosh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________