Optimal. Leaf size=72 \[ \frac {\log (\cosh (x))}{a}+\frac {\left (a^2-b^2\right )^2 \log (a+b \text {sech}(x))}{a b^4}-\frac {\left (a^2-2 b^2\right ) \text {sech}(x)}{b^3}+\frac {a \text {sech}^2(x)}{2 b^2}-\frac {\text {sech}^3(x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3970, 908}
\begin {gather*} \frac {\left (a^2-b^2\right )^2 \log (a+b \text {sech}(x))}{a b^4}-\frac {\left (a^2-2 b^2\right ) \text {sech}(x)}{b^3}+\frac {a \text {sech}^2(x)}{2 b^2}+\frac {\log (\cosh (x))}{a}-\frac {\text {sech}^3(x)}{3 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 908
Rule 3970
Rubi steps
\begin {align*} \int \frac {\tanh ^5(x)}{a+b \text {sech}(x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x (a+x)} \, dx,x,b \text {sech}(x)\right )}{b^4}\\ &=-\frac {\text {Subst}\left (\int \left (a^2 \left (1-\frac {2 b^2}{a^2}\right )+\frac {b^4}{a x}-a x+x^2-\frac {\left (a^2-b^2\right )^2}{a (a+x)}\right ) \, dx,x,b \text {sech}(x)\right )}{b^4}\\ &=\frac {\log (\cosh (x))}{a}+\frac {\left (a^2-b^2\right )^2 \log (a+b \text {sech}(x))}{a b^4}-\frac {\left (a^2-2 b^2\right ) \text {sech}(x)}{b^3}+\frac {a \text {sech}^2(x)}{2 b^2}-\frac {\text {sech}^3(x)}{3 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 85, normalized size = 1.18 \begin {gather*} \frac {-6 a^2 \left (a^2-2 b^2\right ) \log (\cosh (x))+6 \left (a^2-b^2\right )^2 \log (b+a \cosh (x))-6 a b \left (a^2-2 b^2\right ) \text {sech}(x)+3 a^2 b^2 \text {sech}^2(x)-2 a b^3 \text {sech}^3(x)}{6 a b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(157\) vs.
\(2(68)=136\).
time = 0.71, size = 158, normalized size = 2.19
method | result | size |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {a \left (a^{2}-2 b^{2}\right ) \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )+\frac {2 b \left (a^{2}+a b -b^{2}\right )}{\tanh ^{2}\left (\frac {x}{2}\right )+1}+\frac {8 b^{3}}{3 \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2 b^{2} \left (2 b +a \right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}}{b^{4}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}+\frac {\left (a -b \right )^{2} \left (a^{2}+2 a b +b^{2}\right ) \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{a \,b^{4}}\) | \(158\) |
risch | \(-\frac {x}{a}-\frac {2 \,{\mathrm e}^{x} \left (3 a^{2} {\mathrm e}^{4 x}-6 b^{2} {\mathrm e}^{4 x}-3 a b \,{\mathrm e}^{3 x}+6 a^{2} {\mathrm e}^{2 x}-8 b^{2} {\mathrm e}^{2 x}-3 b \,{\mathrm e}^{x} a +3 a^{2}-6 b^{2}\right )}{3 b^{3} \left (1+{\mathrm e}^{2 x}\right )^{3}}-\frac {a^{3} \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{4}}+\frac {2 a \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{2}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{b^{4}}-\frac {2 a \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{b^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a}\) | \(174\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 164 vs.
\(2 (68) = 136\).
time = 0.51, size = 164, normalized size = 2.28 \begin {gather*} \frac {2 \, {\left (3 \, a b e^{\left (-2 \, x\right )} + 3 \, a b e^{\left (-4 \, x\right )} - 3 \, {\left (a^{2} - 2 \, b^{2}\right )} e^{\left (-x\right )} - 2 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} e^{\left (-3 \, x\right )} - 3 \, {\left (a^{2} - 2 \, b^{2}\right )} e^{\left (-5 \, x\right )}\right )}}{3 \, {\left (3 \, b^{3} e^{\left (-2 \, x\right )} + 3 \, b^{3} e^{\left (-4 \, x\right )} + b^{3} e^{\left (-6 \, x\right )} + b^{3}\right )}} + \frac {x}{a} - \frac {{\left (a^{3} - 2 \, a b^{2}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{b^{4}} + \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a b^{4}} \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. 1280 vs.
\(2 (68) = 136\).
time = 0.37, size = 1280, normalized size = 17.78 \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 {\tanh ^{5}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 152 vs.
\(2 (68) = 136\).
time = 0.39, size = 152, normalized size = 2.11 \begin {gather*} -\frac {{\left (a^{3} - 2 \, a b^{2}\right )} \log \left (e^{\left (-x\right )} + e^{x}\right )}{b^{4}} + \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a b^{4}} + \frac {11 \, a^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 22 \, a b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 12 \, a^{2} b {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 24 \, b^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 12 \, a b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )} - 16 \, b^{3}}{6 \, b^{4} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.80, size = 155, normalized size = 2.15 \begin {gather*} \frac {\frac {2\,a}{b^2}-\frac {2\,{\mathrm {e}}^x\,\left (a^2-2\,b^2\right )}{b^3}}{{\mathrm {e}}^{2\,x}+1}-\frac {x}{a}-\frac {\frac {2\,a}{b^2}+\frac {8\,{\mathrm {e}}^x}{3\,b}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}+\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,\left (2\,a\,b^2-a^3\right )}{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 (a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )}{a\,b^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________