Optimal. Leaf size=102 \[ -\frac {a \left (2 a^2-3 b^2\right ) \text {ArcTan}(\sinh (x))}{2 b^4}+\frac {\left (a^2-b^2\right )^{3/2} \text {ArcTan}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^4}-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {\text {sech}^3(x)}{3 b}+\frac {a \text {sech}(x) \tanh (x)}{2 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 109, normalized size of antiderivative = 1.07, number of steps
used = 9, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3591, 3567,
3853, 3855, 3590, 212} \begin {gather*} -\frac {a \left (a^2-b^2\right ) \text {ArcTan}(\sinh (x))}{b^4}+\frac {\left (a^2-b^2\right )^{3/2} \text {ArcTan}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^4}-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {a \text {ArcTan}(\sinh (x))}{2 b^2}+\frac {a \tanh (x) \text {sech}(x)}{2 b^2}+\frac {\text {sech}^3(x)}{3 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3567
Rule 3590
Rule 3591
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx &=\frac {\int \text {sech}^3(x) (a-b \tanh (x)) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx}{b^2}\\ &=\frac {\text {sech}^3(x)}{3 b}+\frac {a \int \text {sech}^3(x) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \text {sech}(x) (a-b \tanh (x)) \, dx}{b^4}+\frac {\left (a^2-b^2\right )^2 \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{b^4}\\ &=-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {\text {sech}^3(x)}{3 b}+\frac {a \text {sech}(x) \tanh (x)}{2 b^2}+\frac {a \int \text {sech}(x) \, dx}{2 b^2}-\frac {\left (a \left (a^2-b^2\right )\right ) \int \text {sech}(x) \, dx}{b^4}+\frac {\left (i \left (a^2-b^2\right )^2\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,\cosh (x) (-i b-i a \tanh (x))\right )}{b^4}\\ &=\frac {a \tan ^{-1}(\sinh (x))}{2 b^2}-\frac {a \left (a^2-b^2\right ) \tan ^{-1}(\sinh (x))}{b^4}+\frac {\left (a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^4}-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {\text {sech}^3(x)}{3 b}+\frac {a \text {sech}(x) \tanh (x)}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 116, normalized size = 1.14 \begin {gather*} \frac {-6 \left (a \left (2 a^2-3 b^2\right ) \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )+2 \sqrt {a-b} \sqrt {a+b} \left (-a^2+b^2\right ) \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )\right )+2 b^3 \text {sech}^3(x)+3 b \text {sech}(x) \left (-2 a^2+2 b^2+a b \tanh (x)\right )}{6 b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.99, size = 164, normalized size = 1.61
method | result | size |
default | \(\frac {2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{4} \sqrt {a^{2}-b^{2}}}-\frac {2 \left (\frac {\frac {a \,b^{2} \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{2}+\left (a^{2} b -2 b^{3}\right ) \left (\tanh ^{4}\left (\frac {x}{2}\right )\right )+\left (2 a^{2} b -2 b^{3}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\frac {a \,b^{2} \tanh \left (\frac {x}{2}\right )}{2}+a^{2} b -\frac {4 b^{3}}{3}}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\right )}{b^{4}}\) | \(164\) |
risch | \(-\frac {{\mathrm e}^{x} \left (6 a^{2} {\mathrm e}^{4 x}-3 a b \,{\mathrm e}^{4 x}-6 b^{2} {\mathrm e}^{4 x}+12 a^{2} {\mathrm e}^{2 x}-20 b^{2} {\mathrm e}^{2 x}+6 a^{2}+3 a b -6 b^{2}\right )}{3 b^{3} \left (1+{\mathrm e}^{2 x}\right )^{3}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}+\frac {i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{b^{4}}-\frac {3 i a \ln \left ({\mathrm e}^{x}-i\right )}{2 b^{2}}-\frac {i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{b^{4}}+\frac {3 i a \ln \left ({\mathrm e}^{x}+i\right )}{2 b^{2}}\) | \(286\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 994 vs.
\(2 (92) = 184\).
time = 0.47, size = 2043, normalized size = 20.03 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}^{5}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 152, normalized size = 1.49 \begin {gather*} -\frac {{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \arctan \left (e^{x}\right )}{b^{4}} + \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{4}} - \frac {6 \, a^{2} e^{\left (5 \, x\right )} - 3 \, a b e^{\left (5 \, x\right )} - 6 \, b^{2} e^{\left (5 \, x\right )} + 12 \, a^{2} e^{\left (3 \, x\right )} - 20 \, b^{2} e^{\left (3 \, x\right )} + 6 \, a^{2} e^{x} + 3 \, a b e^{x} - 6 \, b^{2} e^{x}}{3 \, b^{3} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.22, size = 265, normalized size = 2.60 \begin {gather*} \frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}+a^3\,{\mathrm {e}}^x-b^3\,{\mathrm {e}}^x-a\,b^2\,{\mathrm {e}}^x+a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {8\,{\mathrm {e}}^x}{3\,b\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}-a^3\,{\mathrm {e}}^x+b^3\,{\mathrm {e}}^x+a\,b^2\,{\mathrm {e}}^x-a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {2\,{\mathrm {e}}^x\,\left (3\,a-4\,b\right )}{3\,b^2\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {{\mathrm {e}}^x\,\left (-2\,a^2+a\,b+2\,b^2\right )}{b^3\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4}-\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________