Optimal. Leaf size=52 \[ -\frac{b \tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}}-\frac{\tanh ^{-1}(\cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.142876, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.454, Rules used = {3518, 3110, 3770, 3074, 206} \[ -\frac{b \tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}}-\frac{\tanh ^{-1}(\cosh (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3518
Rule 3110
Rule 3770
Rule 3074
Rule 206
Rubi steps
\begin{align*} \int \frac{\text{csch}(x)}{a+b \tanh (x)} \, dx &=\int \frac{\coth (x)}{a \cosh (x)+b \sinh (x)} \, dx\\ &=i \int \left (-\frac{i \text{csch}(x)}{a}+\frac{i b}{a (a \cosh (x)+b \sinh (x))}\right ) \, dx\\ &=\frac{\int \text{csch}(x) \, dx}{a}-\frac{b \int \frac{1}{a \cosh (x)+b \sinh (x)} \, dx}{a}\\ &=-\frac{\tanh ^{-1}(\cosh (x))}{a}-\frac{(i b) \operatorname{Subst}\left (\int \frac{1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{a}\\ &=-\frac{b \tan ^{-1}\left (\frac{b \cosh (x)+a \sinh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}}-\frac{\tanh ^{-1}(\cosh (x))}{a}\\ \end{align*}
Mathematica [A] time = 0.0903689, size = 59, normalized size = 1.13 \[ \frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )-\frac{2 b \tan ^{-1}\left (\frac{a \tanh \left (\frac{x}{2}\right )+b}{\sqrt{a-b} \sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b}}}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 53, normalized size = 1. \begin{align*} -2\,{\frac{b}{a\sqrt{{a}^{2}-{b}^{2}}}\arctan \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) +2\,b}{\sqrt{{a}^{2}-{b}^{2}}}} \right ) }+{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.45129, size = 675, normalized size = 12.98 \begin{align*} \left [-\frac{\sqrt{-a^{2} + b^{2}} b \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^{3} - a b^{2}}, \frac{2 \, \sqrt{a^{2} - b^{2}} b \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^{3} - a b^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{csch}{\left (x \right )}}{a + b \tanh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21293, size = 81, normalized size = 1.56 \begin{align*} -\frac{2 \, b \arctan \left (\frac{a e^{x} + b e^{x}}{\sqrt{a^{2} - b^{2}}}\right )}{\sqrt{a^{2} - b^{2}} a} - \frac{\log \left (e^{x} + 1\right )}{a} + \frac{\log \left ({\left | e^{x} - 1 \right |}\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]