Optimal. Leaf size=121 \[ \frac {\log (\cosh (x))}{a}-\frac {\left (a^2-b^2\right )^3 \log (a+b \text {sech}(x))}{a b^6}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \text {sech}(x)}{b^5}-\frac {a \left (a^2-3 b^2\right ) \text {sech}^2(x)}{2 b^4}+\frac {\left (a^2-3 b^2\right ) \text {sech}^3(x)}{3 b^3}-\frac {a \text {sech}^4(x)}{4 b^2}+\frac {\text {sech}^5(x)}{5 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 121, 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 )^3 \log (a+b \text {sech}(x))}{a b^6}-\frac {a \left (a^2-3 b^2\right ) \text {sech}^2(x)}{2 b^4}+\frac {\left (a^2-3 b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \text {sech}(x)}{b^5}-\frac {a \text {sech}^4(x)}{4 b^2}+\frac {\log (\cosh (x))}{a}+\frac {\text {sech}^5(x)}{5 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 908
Rule 3970
Rubi steps
\begin {align*} \int \frac {\tanh ^7(x)}{a+b \text {sech}(x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^3}{x (a+x)} \, dx,x,b \text {sech}(x)\right )}{b^6}\\ &=-\frac {\text {Subst}\left (\int \left (-a^4 \left (1+\frac {3 b^2 \left (-a^2+b^2\right )}{a^4}\right )+\frac {b^6}{a x}+a \left (a^2-3 b^2\right ) x-\left (a^2-3 b^2\right ) x^2+a x^3-x^4+\frac {\left (a^2-b^2\right )^3}{a (a+x)}\right ) \, dx,x,b \text {sech}(x)\right )}{b^6}\\ &=\frac {\log (\cosh (x))}{a}-\frac {\left (a^2-b^2\right )^3 \log (a+b \text {sech}(x))}{a b^6}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \text {sech}(x)}{b^5}-\frac {a \left (a^2-3 b^2\right ) \text {sech}^2(x)}{2 b^4}+\frac {\left (a^2-3 b^2\right ) \text {sech}^3(x)}{3 b^3}-\frac {a \text {sech}^4(x)}{4 b^2}+\frac {\text {sech}^5(x)}{5 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 132, normalized size = 1.09 \begin {gather*} \frac {60 a \left (a^4-3 a^2 b^2+3 b^4\right ) \log (\cosh (x))-\frac {60 \left (a^2-b^2\right )^3 \log (b+a \cosh (x))}{a}+60 b \left (a^4-3 a^2 b^2+3 b^4\right ) \text {sech}(x)-30 a b^2 \left (a^2-3 b^2\right ) \text {sech}^2(x)+20 b^3 \left (a^2-3 b^2\right ) \text {sech}^3(x)-15 a b^4 \text {sech}^4(x)+12 b^5 \text {sech}^5(x)}{60 b^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(245\) vs.
\(2(113)=226\).
time = 0.74, size = 246, normalized size = 2.03
method | result | size |
default | \(-\frac {\left (a -b \right )^{3} \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\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^{6}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}+\frac {\frac {32 b^{5}}{5 \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{5}}+\frac {8 b^{3} \left (a^{2}+3 a b +3 b^{2}\right )}{3 \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+a \left (a^{4}-3 a^{2} b^{2}+3 b^{4}\right ) \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )-\frac {2 b^{2} \left (a^{3}+2 a^{2} b -2 b^{3}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {4 b^{4} \left (a +4 b \right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{4}}+\frac {2 b \left (a^{4}+a^{3} b -2 a^{2} b^{2}-2 a \,b^{3}+b^{4}\right )}{\tanh ^{2}\left (\frac {x}{2}\right )+1}}{b^{6}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}\) | \(246\) |
risch | \(-\frac {x}{a}+\frac {2 \,{\mathrm e}^{x} \left (15 a^{4} {\mathrm e}^{8 x}-45 a^{2} b^{2} {\mathrm e}^{8 x}+45 b^{4} {\mathrm e}^{8 x}-15 a^{3} b \,{\mathrm e}^{7 x}+45 a \,b^{3} {\mathrm e}^{7 x}+60 a^{4} {\mathrm e}^{6 x}-160 a^{2} b^{2} {\mathrm e}^{6 x}+120 b^{4} {\mathrm e}^{6 x}-45 a^{3} b \,{\mathrm e}^{5 x}+105 a \,b^{3} {\mathrm e}^{5 x}+90 a^{4} {\mathrm e}^{4 x}-230 a^{2} b^{2} {\mathrm e}^{4 x}+198 b^{4} {\mathrm e}^{4 x}-45 a^{3} b \,{\mathrm e}^{3 x}+105 a \,b^{3} {\mathrm e}^{3 x}+60 a^{4} {\mathrm e}^{2 x}-160 a^{2} b^{2} {\mathrm e}^{2 x}+120 b^{4} {\mathrm e}^{2 x}-15 a^{3} b \,{\mathrm e}^{x}+45 b^{3} {\mathrm e}^{x} a +15 a^{4}-45 a^{2} b^{2}+45 b^{4}\right )}{15 b^{5} \left (1+{\mathrm e}^{2 x}\right )^{5}}+\frac {a^{5} \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{6}}-\frac {3 a^{3} \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{4}}+\frac {3 a \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{2}}-\frac {a^{5} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{b^{6}}+\frac {3 a^{3} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{b^{4}}-\frac {3 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}\) | \(366\) |
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. 332 vs.
\(2 (113) = 226\).
time = 0.49, size = 332, normalized size = 2.74 \begin {gather*} \frac {2 \, {\left (15 \, {\left (a^{4} - 3 \, a^{2} b^{2} + 3 \, b^{4}\right )} e^{\left (-x\right )} - 15 \, {\left (a^{3} b - 3 \, a b^{3}\right )} e^{\left (-2 \, x\right )} + 20 \, {\left (3 \, a^{4} - 8 \, a^{2} b^{2} + 6 \, b^{4}\right )} e^{\left (-3 \, x\right )} - 15 \, {\left (3 \, a^{3} b - 7 \, a b^{3}\right )} e^{\left (-4 \, x\right )} + 2 \, {\left (45 \, a^{4} - 115 \, a^{2} b^{2} + 99 \, b^{4}\right )} e^{\left (-5 \, x\right )} - 15 \, {\left (3 \, a^{3} b - 7 \, a b^{3}\right )} e^{\left (-6 \, x\right )} + 20 \, {\left (3 \, a^{4} - 8 \, a^{2} b^{2} + 6 \, b^{4}\right )} e^{\left (-7 \, x\right )} - 15 \, {\left (a^{3} b - 3 \, a b^{3}\right )} e^{\left (-8 \, x\right )} + 15 \, {\left (a^{4} - 3 \, a^{2} b^{2} + 3 \, b^{4}\right )} e^{\left (-9 \, x\right )}\right )}}{15 \, {\left (5 \, b^{5} e^{\left (-2 \, x\right )} + 10 \, b^{5} e^{\left (-4 \, x\right )} + 10 \, b^{5} e^{\left (-6 \, x\right )} + 5 \, b^{5} e^{\left (-8 \, x\right )} + b^{5} e^{\left (-10 \, x\right )} + b^{5}\right )}} + \frac {x}{a} + \frac {{\left (a^{5} - 3 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{b^{6}} - \frac {{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a b^{6}} \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. 4077 vs.
\(2 (113) = 226\).
time = 0.44, size = 4077, normalized size = 33.69 \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 ^{7}{\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. 267 vs.
\(2 (113) = 226\).
time = 0.41, size = 267, normalized size = 2.21 \begin {gather*} \frac {{\left (a^{5} - 3 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \log \left (e^{\left (-x\right )} + e^{x}\right )}{b^{6}} - \frac {{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a b^{6}} - \frac {137 \, a^{5} {\left (e^{\left (-x\right )} + e^{x}\right )}^{5} - 411 \, a^{3} b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{5} + 411 \, a b^{4} {\left (e^{\left (-x\right )} + e^{x}\right )}^{5} - 120 \, a^{4} b {\left (e^{\left (-x\right )} + e^{x}\right )}^{4} + 360 \, a^{2} b^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{4} - 360 \, b^{5} {\left (e^{\left (-x\right )} + e^{x}\right )}^{4} + 120 \, a^{3} b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 360 \, a b^{4} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 160 \, a^{2} b^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 480 \, b^{5} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 240 \, a b^{4} {\left (e^{\left (-x\right )} + e^{x}\right )} - 384 \, b^{5}}{60 \, b^{6} {\left (e^{\left (-x\right )} + e^{x}\right )}^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.99, size = 316, normalized size = 2.61 \begin {gather*} \frac {\frac {8\,a}{b^2}-\frac {8\,{\mathrm {e}}^x\,\left (5\,a^2-27\,b^2\right )}{15\,b^3}}{3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1}-\frac {\frac {4\,a}{b^2}+\frac {64\,{\mathrm {e}}^x}{5\,b}}{4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1}+\frac {\frac {8\,{\mathrm {e}}^x\,\left (a^2-3\,b^2\right )}{3\,b^3}+\frac {2\,\left (a^4-5\,a^2\,b^2\right )}{a\,b^4}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}-\frac {x}{a}+\frac {\frac {2\,{\mathrm {e}}^x\,\left (a^4-3\,a^2\,b^2+3\,b^4\right )}{b^5}-\frac {2\,\left (a^4-3\,a^2\,b^2\right )}{a\,b^4}}{{\mathrm {e}}^{2\,x}+1}+\frac {32\,{\mathrm {e}}^x}{5\,b\,\left (5\,{\mathrm {e}}^{2\,x}+10\,{\mathrm {e}}^{4\,x}+10\,{\mathrm {e}}^{6\,x}+5\,{\mathrm {e}}^{8\,x}+{\mathrm {e}}^{10\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,\left (a^5-3\,a^3\,b^2+3\,a\,b^4\right )}{b^6}-\frac {\ln \left (a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}\right )\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )}{a\,b^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________