Optimal. Leaf size=64 \[ \frac{2 a^2 \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{b^2 \sqrt{a-b} \sqrt{a+b}}-\frac{a \tan ^{-1}(\sinh (x))}{b^2}+\frac{\tanh (x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14027, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {3790, 3789, 3770, 3831, 2659, 205} \[ \frac{2 a^2 \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{b^2 \sqrt{a-b} \sqrt{a+b}}-\frac{a \tan ^{-1}(\sinh (x))}{b^2}+\frac{\tanh (x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3790
Rule 3789
Rule 3770
Rule 3831
Rule 2659
Rule 205
Rubi steps
\begin{align*} \int \frac{\text{sech}^3(x)}{a+b \text{sech}(x)} \, dx &=\frac{\tanh (x)}{b}-\frac{a \int \frac{\text{sech}^2(x)}{a+b \text{sech}(x)} \, dx}{b}\\ &=\frac{\tanh (x)}{b}-\frac{a \int \text{sech}(x) \, dx}{b^2}+\frac{a^2 \int \frac{\text{sech}(x)}{a+b \text{sech}(x)} \, dx}{b^2}\\ &=-\frac{a \tan ^{-1}(\sinh (x))}{b^2}+\frac{\tanh (x)}{b}+\frac{a^2 \int \frac{1}{1+\frac{a \cosh (x)}{b}} \, dx}{b^3}\\ &=-\frac{a \tan ^{-1}(\sinh (x))}{b^2}+\frac{\tanh (x)}{b}+\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{a}{b}-\left (1-\frac{a}{b}\right ) x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{b^3}\\ &=-\frac{a \tan ^{-1}(\sinh (x))}{b^2}+\frac{2 a^2 \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{x}{2}\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} b^2 \sqrt{a+b}}+\frac{\tanh (x)}{b}\\ \end{align*}
Mathematica [A] time = 0.105394, size = 63, normalized size = 0.98 \[ \frac{-\frac{2 a^2 \tan ^{-1}\left (\frac{(b-a) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2}}\right )}{\sqrt{a^2-b^2}}-2 a \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )+b \tanh (x)}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.024, size = 73, normalized size = 1.1 \begin{align*} 2\,{\frac{\tanh \left ( x/2 \right ) }{b \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}-2\,{\frac{a\arctan \left ( \tanh \left ( x/2 \right ) \right ) }{{b}^{2}}}+2\,{\frac{{a}^{2}}{{b}^{2}\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}\arctan \left ({\frac{ \left ( a-b \right ) \tanh \left ( x/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \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 [B] time = 2.70445, size = 1285, normalized size = 20.08 \begin{align*} \text{result too large to display} \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{sech}^{3}{\left (x \right )}}{a + b \operatorname{sech}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16892, size = 82, normalized size = 1.28 \begin{align*} \frac{2 \, a^{2} \arctan \left (\frac{a e^{x} + b}{\sqrt{a^{2} - b^{2}}}\right )}{\sqrt{a^{2} - b^{2}} b^{2}} - \frac{2 \, a \arctan \left (e^{x}\right )}{b^{2}} - \frac{2}{b{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]