Optimal. Leaf size=157 \[ \frac {a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \text {ArcTan}(\sinh (x))}{8 b^6}-\frac {\left (a^2-b^2\right )^{5/2} \text {ArcTan}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^6}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}-\frac {a \left (4 a^2-7 b^2\right ) \text {sech}(x) \tanh (x)}{8 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 187, normalized size of antiderivative = 1.19, number of steps
used = 14, 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 )^2 \text {ArcTan}(\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \text {ArcTan}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^6}-\frac {a \left (a^2-b^2\right ) \text {ArcTan}(\sinh (x))}{2 b^4}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {a \left (a^2-b^2\right ) \tanh (x) \text {sech}(x)}{2 b^4}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {3 a \text {ArcTan}(\sinh (x))}{8 b^2}+\frac {a \tanh (x) \text {sech}^3(x)}{4 b^2}+\frac {3 a \tanh (x) \text {sech}(x)}{8 b^2}+\frac {\text {sech}^5(x)}{5 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}^7(x)}{a+b \tanh (x)} \, dx &=\frac {\int \text {sech}^5(x) (a-b \tanh (x)) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx}{b^2}\\ &=\frac {\text {sech}^5(x)}{5 b}+\frac {a \int \text {sech}^5(x) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \text {sech}^3(x) (a-b \tanh (x)) \, dx}{b^4}+\frac {\left (a^2-b^2\right )^2 \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx}{b^4}\\ &=-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2}+\frac {(3 a) \int \text {sech}^3(x) \, dx}{4 b^2}-\frac {\left (a \left (a^2-b^2\right )\right ) \int \text {sech}^3(x) \, dx}{b^4}+\frac {\left (a^2-b^2\right )^2 \int \text {sech}(x) (a-b \tanh (x)) \, dx}{b^6}-\frac {\left (a^2-b^2\right )^3 \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{b^6}\\ &=\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {3 a \text {sech}(x) \tanh (x)}{8 b^2}-\frac {a \left (a^2-b^2\right ) \text {sech}(x) \tanh (x)}{2 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2}+\frac {(3 a) \int \text {sech}(x) \, dx}{8 b^2}-\frac {\left (a \left (a^2-b^2\right )\right ) \int \text {sech}(x) \, dx}{2 b^4}+\frac {\left (a \left (a^2-b^2\right )^2\right ) \int \text {sech}(x) \, dx}{b^6}-\frac {\left (i \left (a^2-b^2\right )^3\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^6}\\ &=\frac {3 a \tan ^{-1}(\sinh (x))}{8 b^2}-\frac {a \left (a^2-b^2\right ) \tan ^{-1}(\sinh (x))}{2 b^4}+\frac {a \left (a^2-b^2\right )^2 \tan ^{-1}(\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^6}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {3 a \text {sech}(x) \tanh (x)}{8 b^2}-\frac {a \left (a^2-b^2\right ) \text {sech}(x) \tanh (x)}{2 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 166, normalized size = 1.06 \begin {gather*} \frac {30 \left (a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )-8 \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )^2 \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )\right )+24 b^5 \text {sech}^5(x)+10 b^3 \text {sech}^3(x) \left (-4 a^2+4 b^2+3 a b \tanh (x)\right )+15 b \text {sech}(x) \left (8 \left (a^2-b^2\right )^2+\left (-4 a^3 b+7 a b^3\right ) \tanh (x)\right )}{120 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. \(322\) vs.
\(2(143)=286\).
time = 1.07, size = 323, normalized size = 2.06
method | result | size |
default | \(\frac {\frac {2 \left (\left (\frac {1}{2} a^{3} b^{2}-\frac {9}{8} a \,b^{4}\right ) \left (\tanh ^{9}\left (\frac {x}{2}\right )\right )+\left (a^{4} b -3 a^{2} b^{3}+3 b^{5}\right ) \left (\tanh ^{8}\left (\frac {x}{2}\right )\right )+\left (a^{3} b^{2}-\frac {5}{4} a \,b^{4}\right ) \left (\tanh ^{7}\left (\frac {x}{2}\right )\right )+\left (4 a^{4} b -10 a^{2} b^{3}+6 b^{5}\right ) \left (\tanh ^{6}\left (\frac {x}{2}\right )\right )+\left (6 a^{4} b -\frac {40}{3} a^{2} b^{3}+\frac {28}{3} b^{5}\right ) \left (\tanh ^{4}\left (\frac {x}{2}\right )\right )+\left (-a^{3} b^{2}+\frac {5}{4} a \,b^{4}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )+\left (4 a^{4} b -\frac {26}{3} a^{2} b^{3}+\frac {14}{3} b^{5}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+\left (-\frac {1}{2} a^{3} b^{2}+\frac {9}{8} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )+a^{4} b -\frac {7 a^{2} b^{3}}{3}+\frac {23 b^{5}}{15}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{5}}+\frac {a \left (8 a^{4}-20 a^{2} b^{2}+15 b^{4}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{4}}{b^{6}}+\frac {2 \left (-a^{6}+3 a^{4} b^{2}-3 a^{2} b^{4}+b^{6}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{6} \sqrt {a^{2}-b^{2}}}\) | \(323\) |
risch | \(\frac {{\mathrm e}^{x} \left (120 a^{4} {\mathrm e}^{8 x}-60 a^{3} b \,{\mathrm e}^{8 x}-240 a^{2} b^{2} {\mathrm e}^{8 x}+105 a \,b^{3} {\mathrm e}^{8 x}+120 b^{4} {\mathrm e}^{8 x}+480 a^{4} {\mathrm e}^{6 x}-120 a^{3} b \,{\mathrm e}^{6 x}-1120 a^{2} b^{2} {\mathrm e}^{6 x}+330 a \,b^{3} {\mathrm e}^{6 x}+640 b^{4} {\mathrm e}^{6 x}+720 a^{4} {\mathrm e}^{4 x}-1760 a^{2} b^{2} {\mathrm e}^{4 x}+1424 b^{4} {\mathrm e}^{4 x}+480 a^{4} {\mathrm e}^{2 x}+120 a^{3} b \,{\mathrm e}^{2 x}-1120 a^{2} b^{2} {\mathrm e}^{2 x}-330 a \,b^{3} {\mathrm e}^{2 x}+640 b^{4} {\mathrm e}^{2 x}+120 a^{4}+60 a^{3} b -240 a^{2} b^{2}-105 a \,b^{3}+120 b^{4}\right )}{60 b^{5} \left (1+{\mathrm e}^{2 x}\right )^{5}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{4}}{b^{6}}-\frac {2 \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^{4}}{b^{6}}+\frac {2 \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^{5} \ln \left ({\mathrm e}^{x}+i\right )}{b^{6}}-\frac {5 i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{2 b^{4}}+\frac {15 i a \ln \left ({\mathrm e}^{x}+i\right )}{8 b^{2}}-\frac {i a^{5} \ln \left ({\mathrm e}^{x}-i\right )}{b^{6}}+\frac {5 i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{2 b^{4}}-\frac {15 i a \ln \left ({\mathrm e}^{x}-i\right )}{8 b^{2}}\) | \(549\) |
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. 3227 vs.
\(2 (143) = 286\).
time = 0.51, size = 6509, normalized size = 41.46 \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}^{7}{\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. 326 vs.
\(2 (143) = 286\).
time = 0.41, size = 326, normalized size = 2.08 \begin {gather*} \frac {{\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \arctan \left (e^{x}\right )}{4 \, b^{6}} - \frac {2 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{6}} + \frac {120 \, a^{4} e^{\left (9 \, x\right )} - 60 \, a^{3} b e^{\left (9 \, x\right )} - 240 \, a^{2} b^{2} e^{\left (9 \, x\right )} + 105 \, a b^{3} e^{\left (9 \, x\right )} + 120 \, b^{4} e^{\left (9 \, x\right )} + 480 \, a^{4} e^{\left (7 \, x\right )} - 120 \, a^{3} b e^{\left (7 \, x\right )} - 1120 \, a^{2} b^{2} e^{\left (7 \, x\right )} + 330 \, a b^{3} e^{\left (7 \, x\right )} + 640 \, b^{4} e^{\left (7 \, x\right )} + 720 \, a^{4} e^{\left (5 \, x\right )} - 1760 \, a^{2} b^{2} e^{\left (5 \, x\right )} + 1424 \, b^{4} e^{\left (5 \, x\right )} + 480 \, a^{4} e^{\left (3 \, x\right )} + 120 \, a^{3} b e^{\left (3 \, x\right )} - 1120 \, a^{2} b^{2} e^{\left (3 \, x\right )} - 330 \, a b^{3} e^{\left (3 \, x\right )} + 640 \, b^{4} e^{\left (3 \, x\right )} + 120 \, a^{4} e^{x} + 60 \, a^{3} b e^{x} - 240 \, a^{2} b^{2} e^{x} - 105 \, a b^{3} e^{x} + 120 \, b^{4} e^{x}}{60 \, b^{5} {\left (e^{\left (2 \, x\right )} + 1\right )}^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.29, size = 447, normalized size = 2.85 \begin {gather*} \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 (\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}+a^5\,{\mathrm {e}}^x+b^5\,{\mathrm {e}}^x+a\,b^4\,{\mathrm {e}}^x+a^4\,b\,{\mathrm {e}}^x-2\,a^2\,b^3\,{\mathrm {e}}^x-2\,a^3\,b^2\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}}{b^6}+\frac {\ln \left (a^5\,{\mathrm {e}}^x-\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}+b^5\,{\mathrm {e}}^x+a\,b^4\,{\mathrm {e}}^x+a^4\,b\,{\mathrm {e}}^x-2\,a^2\,b^3\,{\mathrm {e}}^x-2\,a^3\,b^2\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}}{b^6}-\frac {{\mathrm {e}}^x\,\left (-12\,a^3+16\,a^2\,b+9\,a\,b^2-16\,b^3\right )}{6\,b^4\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {{\mathrm {e}}^x\,\left (8\,a^4-4\,a^3\,b-16\,a^2\,b^2+7\,a\,b^3+8\,b^4\right )}{4\,b^5\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {4\,{\mathrm {e}}^x\,\left (5\,a-16\,b\right )}{5\,b^2\,\left (4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1\right )}+\frac {2\,{\mathrm {e}}^x\,\left (20\,a^2-45\,a\,b+28\,b^2\right )}{15\,b^3\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (8\,a^4-20\,a^2\,b^2+15\,b^4\right )\,1{}\mathrm {i}}{8\,b^6}+\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (8\,a^4-20\,a^2\,b^2+15\,b^4\right )\,1{}\mathrm {i}}{8\,b^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________