Optimal. Leaf size=83 \[ -\frac {b^2 \tan ^{-1}(\sinh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {b \sqrt {a^2-b^2} \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {\tan ^{-1}(\sinh (x))}{2 a}+\frac {\tanh (x) \text {sech}(x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3518, 3110, 3768, 3770, 3104, 3074, 206} \[ -\frac {b^2 \tan ^{-1}(\sinh (x))}{a^3}+\frac {b \sqrt {a^2-b^2} \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\tan ^{-1}(\sinh (x))}{2 a}+\frac {\tanh (x) \text {sech}(x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3104
Rule 3110
Rule 3518
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx &=-\left (i \int \frac {\text {sech}^2(x) \tanh (x)}{-i b \cosh (x)-i a \sinh (x)} \, dx\right )\\ &=-\int \left (-\frac {\text {sech}^3(x)}{a}+\frac {i b \text {sech}^2(x)}{a (i b \cosh (x)+i a \sinh (x))}\right ) \, dx\\ &=\frac {\int \text {sech}^3(x) \, dx}{a}-\frac {(i b) \int \frac {\text {sech}^2(x)}{i b \cosh (x)+i a \sinh (x)} \, dx}{a}\\ &=-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a}+\frac {\int \text {sech}(x) \, dx}{2 a}-\frac {b^2 \int \text {sech}(x) \, dx}{a^3}-\frac {\left (i b \left (a^2-b^2\right )\right ) \int \frac {1}{i b \cosh (x)+i a \sinh (x)} \, dx}{a^3}\\ &=\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {b^2 \tan ^{-1}(\sinh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a}+\frac {\left (b \left (a^2-b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,a \cosh (x)+b \sinh (x)\right )}{a^3}\\ &=\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {b^2 \tan ^{-1}(\sinh (x))}{a^3}+\frac {b \sqrt {a^2-b^2} \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 85, normalized size = 1.02 \[ \frac {2 \left (a^2-2 b^2\right ) \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+4 b \sqrt {b-a} \sqrt {a+b} \tan ^{-1}\left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-a} \sqrt {a+b}}\right )+a \text {sech}(x) (a \tanh (x)-2 b)}{2 a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 856, normalized size = 10.31 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 102, normalized size = 1.23 \[ \frac {{\left (a^{2} - 2 \, b^{2}\right )} \arctan \left (e^{x}\right )}{a^{3}} - \frac {2 \, {\left (a^{2} b - b^{3}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} a^{3}} + \frac {a e^{\left (3 \, x\right )} - 2 \, b e^{\left (3 \, x\right )} - a e^{x} - 2 \, b e^{x}}{a^{2} {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.18, size = 187, normalized size = 2.25 \[ -\frac {2 b \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{a \sqrt {-a^{2}+b^{2}}}+\frac {2 b^{3} \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{a^{3} \sqrt {-a^{2}+b^{2}}}-\frac {\tanh ^{3}\left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {2 \left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b}{a^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+\frac {\tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {2 b}{a^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+\frac {\arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}-\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right ) b^{2}}{a^{3}} \]
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.94, size = 166, normalized size = 2.00 \[ \frac {{\mathrm {e}}^x\,\left (a-2\,b\right )}{a^2\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}-\frac {\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}+\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x+\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^3}-\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x-\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^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 {\operatorname {sech}^{3}{\relax (x )}}{a + b \coth {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________