Optimal. Leaf size=140 \[ -\frac {\left (a^2-b^2\right )^3 \log (a+b \tanh (x))}{b^7}+\frac {a \left (a^4-3 a^2 b^2+3 b^4\right ) \tanh (x)}{b^6}-\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \tanh ^2(x)}{2 b^5}+\frac {a \left (a^2-3 b^2\right ) \tanh ^3(x)}{3 b^4}-\frac {\left (a^2-3 b^2\right ) \tanh ^4(x)}{4 b^3}+\frac {a \tanh ^5(x)}{5 b^2}-\frac {\tanh ^6(x)}{6 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 140, 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 = {3587, 711}
\begin {gather*} -\frac {\left (a^2-b^2\right )^3 \log (a+b \tanh (x))}{b^7}+\frac {a \left (a^2-3 b^2\right ) \tanh ^3(x)}{3 b^4}-\frac {\left (a^2-3 b^2\right ) \tanh ^4(x)}{4 b^3}+\frac {a \left (a^4-3 a^2 b^2+3 b^4\right ) \tanh (x)}{b^6}-\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \tanh ^2(x)}{2 b^5}+\frac {a \tanh ^5(x)}{5 b^2}-\frac {\tanh ^6(x)}{6 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\text {sech}^8(x)}{a+b \tanh (x)} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1-\frac {x^2}{b^2}\right )^3}{a+x} \, dx,x,b \tanh (x)\right )}{b}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^5-3 a^3 b^2+3 a b^4}{b^6}-\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) x}{b^6}+\frac {a \left (a^2-3 b^2\right ) x^2}{b^6}+\frac {\left (-a^2+3 b^2\right ) x^3}{b^6}+\frac {a x^4}{b^6}-\frac {x^5}{b^6}+\frac {\left (-a^2+b^2\right )^3}{b^6 (a+x)}\right ) \, dx,x,b \tanh (x)\right )}{b}\\ &=-\frac {\left (a^2-b^2\right )^3 \log (a+b \tanh (x))}{b^7}+\frac {a \left (a^4-3 a^2 b^2+3 b^4\right ) \tanh (x)}{b^6}-\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \tanh ^2(x)}{2 b^5}+\frac {a \left (a^2-3 b^2\right ) \tanh ^3(x)}{3 b^4}-\frac {\left (a^2-3 b^2\right ) \tanh ^4(x)}{4 b^3}+\frac {a \tanh ^5(x)}{5 b^2}-\frac {\tanh ^6(x)}{6 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.44, size = 137, normalized size = 0.98 \begin {gather*} \frac {60 \left (a^2-b^2\right )^3 (\log (\cosh (x))-\log (a \cosh (x)+b \sinh (x)))+10 b^6 \text {sech}^6(x)+4 a b \left (15 a^4-40 a^2 b^2+33 b^4\right ) \tanh (x)+3 b^4 \text {sech}^4(x) \left (-5 a^2+5 b^2+4 a b \tanh (x)\right )+2 b^2 \text {sech}^2(x) \left (15 \left (a^2-b^2\right )^2-2 a b \left (5 a^2-9 b^2\right ) \tanh (x)\right )}{60 b^7} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(412\) vs.
\(2(130)=260\).
time = 0.76, size = 413, normalized size = 2.95
method | result | size |
default | \(-\frac {\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 b \tanh \left (\frac {x}{2}\right )+a \right )}{b^{7}}+\frac {\frac {2 \left (\left (a^{5} b -3 a^{3} b^{3}+3 a \,b^{5}\right ) \left (\tanh ^{11}\left (\frac {x}{2}\right )\right )+\left (-a^{4} b^{2}+3 a^{2} b^{4}-3 b^{6}\right ) \left (\tanh ^{10}\left (\frac {x}{2}\right )\right )+\left (5 a^{5} b -\frac {41}{3} a^{3} b^{3}+11 a \,b^{5}\right ) \left (\tanh ^{9}\left (\frac {x}{2}\right )\right )+\left (-4 a^{4} b^{2}+10 a^{2} b^{4}-6 b^{6}\right ) \left (\tanh ^{8}\left (\frac {x}{2}\right )\right )+\left (10 a^{5} b -26 a^{3} b^{3}+\frac {106}{5} a \,b^{5}\right ) \left (\tanh ^{7}\left (\frac {x}{2}\right )\right )+\left (-6 a^{4} b^{2}+14 a^{2} b^{4}-\frac {34}{3} b^{6}\right ) \left (\tanh ^{6}\left (\frac {x}{2}\right )\right )+\left (10 a^{5} b -26 a^{3} b^{3}+\frac {106}{5} a \,b^{5}\right ) \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )+\left (-4 a^{4} b^{2}+10 a^{2} b^{4}-6 b^{6}\right ) \left (\tanh ^{4}\left (\frac {x}{2}\right )\right )+\left (5 a^{5} b -\frac {41}{3} a^{3} b^{3}+11 a \,b^{5}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )+\left (-a^{4} b^{2}+3 a^{2} b^{4}-3 b^{6}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+\left (a^{5} b -3 a^{3} b^{3}+3 a \,b^{5}\right ) \tanh \left (\frac {x}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{6}}+\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{b^{7}}\) | \(413\) |
risch | \(-\frac {2 \left (-40 a^{3} b^{2}+390 a \,b^{4} {\mathrm e}^{4 x}-210 a^{3} b^{2} {\mathrm e}^{2 x}+183 a \,b^{4} {\mathrm e}^{2 x}+15 a^{5}+150 a^{2} b^{3} {\mathrm e}^{4 x}-15 a^{4} b \,{\mathrm e}^{2 x}+30 a^{2} b^{3} {\mathrm e}^{2 x}+33 a \,b^{4}+105 a \,b^{4} {\mathrm e}^{8 x}-400 a^{3} b^{2} {\mathrm e}^{6 x}+330 a \,b^{4} {\mathrm e}^{6 x}-420 a^{3} b^{2} {\mathrm e}^{4 x}+30 a^{2} b^{3} {\mathrm e}^{10 x}+15 a \,b^{4} {\mathrm e}^{10 x}-60 a^{4} b \,{\mathrm e}^{8 x}-180 a^{3} b^{2} {\mathrm e}^{8 x}+150 a^{2} b^{3} {\mathrm e}^{8 x}-90 a^{4} b \,{\mathrm e}^{6 x}+240 a^{2} b^{3} {\mathrm e}^{6 x}-60 a^{4} b \,{\mathrm e}^{4 x}-15 a^{4} b \,{\mathrm e}^{10 x}-30 a^{3} b^{2} {\mathrm e}^{10 x}-230 b^{5} {\mathrm e}^{6 x}-90 b^{5} {\mathrm e}^{4 x}-15 b^{5} {\mathrm e}^{2 x}+75 a^{5} {\mathrm e}^{8 x}-90 b^{5} {\mathrm e}^{8 x}+150 a^{5} {\mathrm e}^{6 x}+15 a^{5} {\mathrm e}^{10 x}-15 b^{5} {\mathrm e}^{10 x}+75 a^{5} {\mathrm e}^{2 x}+150 a^{5} {\mathrm e}^{4 x}\right )}{15 b^{6} \left (1+{\mathrm e}^{2 x}\right )^{6}}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right ) a^{6}}{b^{7}}-\frac {3 \ln \left (1+{\mathrm e}^{2 x}\right ) a^{4}}{b^{5}}+\frac {3 \ln \left (1+{\mathrm e}^{2 x}\right ) a^{2}}{b^{3}}-\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{b}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right ) a^{6}}{b^{7}}+\frac {3 \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right ) a^{4}}{b^{5}}-\frac {3 \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right ) a^{2}}{b^{3}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{b}\) | \(497\) |
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. 386 vs.
\(2 (130) = 260\).
time = 0.49, size = 386, normalized size = 2.76 \begin {gather*} \frac {2 \, {\left (15 \, a^{5} - 40 \, a^{3} b^{2} + 33 \, a b^{4} + 3 \, {\left (25 \, a^{5} + 5 \, a^{4} b - 70 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 61 \, a b^{4} + 5 \, b^{5}\right )} e^{\left (-2 \, x\right )} + 30 \, {\left (5 \, a^{5} + 2 \, a^{4} b - 14 \, a^{3} b^{2} - 5 \, a^{2} b^{3} + 13 \, a b^{4} + 3 \, b^{5}\right )} e^{\left (-4 \, x\right )} + 10 \, {\left (15 \, a^{5} + 9 \, a^{4} b - 40 \, a^{3} b^{2} - 24 \, a^{2} b^{3} + 33 \, a b^{4} + 23 \, b^{5}\right )} e^{\left (-6 \, x\right )} + 15 \, {\left (5 \, a^{5} + 4 \, a^{4} b - 12 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 7 \, a b^{4} + 6 \, b^{5}\right )} e^{\left (-8 \, x\right )} + 15 \, {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} e^{\left (-10 \, x\right )}\right )}}{15 \, {\left (6 \, b^{6} e^{\left (-2 \, x\right )} + 15 \, b^{6} e^{\left (-4 \, x\right )} + 20 \, b^{6} e^{\left (-6 \, x\right )} + 15 \, b^{6} e^{\left (-8 \, x\right )} + 6 \, b^{6} e^{\left (-10 \, x\right )} + b^{6} e^{\left (-12 \, x\right )} + b^{6}\right )}} - \frac {{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{b^{7}} + \frac {{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{b^{7}} \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. 5275 vs.
\(2 (130) = 260\).
time = 0.41, size = 5275, normalized size = 37.68 \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}^{8}{\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 [B] Leaf count of result is larger than twice the leaf count of optimal. 593 vs.
\(2 (130) = 260\).
time = 0.41, size = 593, normalized size = 4.24 \begin {gather*} -\frac {{\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a b^{7} + b^{8}} + \frac {{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \log \left (e^{\left (2 \, x\right )} + 1\right )}{b^{7}} - \frac {147 \, a^{6} e^{\left (12 \, x\right )} - 441 \, a^{4} b^{2} e^{\left (12 \, x\right )} + 441 \, a^{2} b^{4} e^{\left (12 \, x\right )} - 147 \, b^{6} e^{\left (12 \, x\right )} + 882 \, a^{6} e^{\left (10 \, x\right )} + 120 \, a^{5} b e^{\left (10 \, x\right )} - 2766 \, a^{4} b^{2} e^{\left (10 \, x\right )} - 240 \, a^{3} b^{3} e^{\left (10 \, x\right )} + 2886 \, a^{2} b^{4} e^{\left (10 \, x\right )} + 120 \, a b^{5} e^{\left (10 \, x\right )} - 1002 \, b^{6} e^{\left (10 \, x\right )} + 2205 \, a^{6} e^{\left (8 \, x\right )} + 600 \, a^{5} b e^{\left (8 \, x\right )} - 7095 \, a^{4} b^{2} e^{\left (8 \, x\right )} - 1440 \, a^{3} b^{3} e^{\left (8 \, x\right )} + 7815 \, a^{2} b^{4} e^{\left (8 \, x\right )} + 840 \, a b^{5} e^{\left (8 \, x\right )} - 2925 \, b^{6} e^{\left (8 \, x\right )} + 2940 \, a^{6} e^{\left (6 \, x\right )} + 1200 \, a^{5} b e^{\left (6 \, x\right )} - 9540 \, a^{4} b^{2} e^{\left (6 \, x\right )} - 3200 \, a^{3} b^{3} e^{\left (6 \, x\right )} + 10740 \, a^{2} b^{4} e^{\left (6 \, x\right )} + 2640 \, a b^{5} e^{\left (6 \, x\right )} - 4780 \, b^{6} e^{\left (6 \, x\right )} + 2205 \, a^{6} e^{\left (4 \, x\right )} + 1200 \, a^{5} b e^{\left (4 \, x\right )} - 7095 \, a^{4} b^{2} e^{\left (4 \, x\right )} - 3360 \, a^{3} b^{3} e^{\left (4 \, x\right )} + 7815 \, a^{2} b^{4} e^{\left (4 \, x\right )} + 3120 \, a b^{5} e^{\left (4 \, x\right )} - 2925 \, b^{6} e^{\left (4 \, x\right )} + 882 \, a^{6} e^{\left (2 \, x\right )} + 600 \, a^{5} b e^{\left (2 \, x\right )} - 2766 \, a^{4} b^{2} e^{\left (2 \, x\right )} - 1680 \, a^{3} b^{3} e^{\left (2 \, x\right )} + 2886 \, a^{2} b^{4} e^{\left (2 \, x\right )} + 1464 \, a b^{5} e^{\left (2 \, x\right )} - 1002 \, b^{6} e^{\left (2 \, x\right )} + 147 \, a^{6} + 120 \, a^{5} b - 441 \, a^{4} b^{2} - 320 \, a^{3} b^{3} + 441 \, a^{2} b^{4} + 264 \, a b^{5} - 147 \, b^{6}}{60 \, b^{7} {\left (e^{\left (2 \, x\right )} + 1\right )}^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.43, size = 301, normalized size = 2.15 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,{\left (a+b\right )}^3\,{\left (a-b\right )}^3}{b^7}-\frac {32\,\left (a-5\,b\right )}{5\,b^2\,\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 {4\,\left (a^2-4\,a\,b+7\,b^2\right )}{b^3\,\left (4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1\right )}-\frac {\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )\,{\left (a+b\right )}^3\,{\left (a-b\right )}^3}{b^7}-\frac {32}{3\,b\,\left (6\,{\mathrm {e}}^{2\,x}+15\,{\mathrm {e}}^{4\,x}+20\,{\mathrm {e}}^{6\,x}+15\,{\mathrm {e}}^{8\,x}+6\,{\mathrm {e}}^{10\,x}+{\mathrm {e}}^{12\,x}+1\right )}-\frac {8\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}{3\,b^4\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {2\,{\left (a+b\right )}^2\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}{b^6\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {2\,\left (a+b\right )\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}{b^5\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________