Optimal. Leaf size=56 \[ -\frac {\sqrt {a^2-b^2} \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {a \tan ^{-1}(\sinh (x))}{b^2}+\frac {\text {sech}(x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3510, 3486, 3770, 3509, 206} \[ -\frac {\sqrt {a^2-b^2} \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {a \tan ^{-1}(\sinh (x))}{b^2}+\frac {\text {sech}(x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3486
Rule 3509
Rule 3510
Rule 3770
Rubi steps
\begin {align*} \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx &=\frac {\int \text {sech}(x) (a-b \tanh (x)) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{b^2}\\ &=\frac {\text {sech}(x)}{b}+\frac {a \int \text {sech}(x) \, dx}{b^2}-\frac {\left (i \left (a^2-b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,\cosh (x) (-i b-i a \tanh (x))\right )}{b^2}\\ &=\frac {a \tan ^{-1}(\sinh (x))}{b^2}-\frac {\sqrt {a^2-b^2} \tan ^{-1}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {\text {sech}(x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 65, normalized size = 1.16 \[ \frac {-2 \sqrt {a-b} \sqrt {a+b} \tan ^{-1}\left (\frac {a \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a-b} \sqrt {a+b}}\right )+2 a \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+b \text {sech}(x)}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.85, size = 309, normalized size = 5.52 \[ \left [\frac {\sqrt {-a^{2} + b^{2}} {\left (\cosh \relax (x)^{2} + 2 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2} + 1\right )} \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 ) + 2 \, {\left (a \cosh \relax (x)^{2} + 2 \, a \cosh \relax (x) \sinh \relax (x) + a \sinh \relax (x)^{2} + a\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + 2 \, b \cosh \relax (x) + 2 \, b \sinh \relax (x)}{b^{2} \cosh \relax (x)^{2} + 2 \, b^{2} \cosh \relax (x) \sinh \relax (x) + b^{2} \sinh \relax (x)^{2} + b^{2}}, \frac {2 \, {\left (\sqrt {a^{2} - b^{2}} {\left (\cosh \relax (x)^{2} + 2 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2} + 1\right )} \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 \cosh \relax (x)^{2} + 2 \, a \cosh \relax (x) \sinh \relax (x) + a \sinh \relax (x)^{2} + a\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + b \cosh \relax (x) + b \sinh \relax (x)\right )}}{b^{2} \cosh \relax (x)^{2} + 2 \, b^{2} \cosh \relax (x) \sinh \relax (x) + b^{2} \sinh \relax (x)^{2} + b^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 63, normalized size = 1.12 \[ \frac {2 \, a \arctan \left (e^{x}\right )}{b^{2}} - \frac {2 \, \sqrt {a^{2} - b^{2}} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{b^{2}} + \frac {2 \, e^{x}}{b {\left (e^{\left (2 \, x\right )} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.11, size = 110, normalized size = 1.96 \[ -\frac {2 \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right ) a^{2}}{b^{2} \sqrt {a^{2}-b^{2}}}+\frac {2 \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}}+\frac {2}{b \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}+\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right ) a}{b^{2}} \]
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 = 3.81, size = 119, normalized size = 2.12 \[ \frac {\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x-\sqrt {b^2-a^2}\right )\,\sqrt {-\left (a+b\right )\,\left (a-b\right )}}{b^2}-\frac {\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x+\sqrt {b^2-a^2}\right )\,\sqrt {-\left (a+b\right )\,\left (a-b\right )}}{b^2}+\frac {2\,{\mathrm {e}}^x}{b\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}}{b^2}+\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{b^2} \]
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 {\operatorname {sech}^{3}{\relax (x )}}{a + b \tanh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________