Integrand size = 13, antiderivative size = 157 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \arctan (\sinh (x))}{8 b^6}-\frac {\left (a^2-b^2\right )^{5/2} \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]
Time = 0.21 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.19, number of steps used = 14, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3591, 3567, 3853, 3855, 3590, 212} \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {a \left (a^2-b^2\right )^2 \arctan (\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \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 ) \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 \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} \]
[In]
[Out]
Rule 212
Rule 3567
Rule 3590
Rule 3591
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \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 \arctan (\sinh (x))}{8 b^2}-\frac {a \left (a^2-b^2\right ) \arctan (\sinh (x))}{2 b^4}+\frac {a \left (a^2-b^2\right )^2 \arctan (\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \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 {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*}
Time = 0.47 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.06 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {30 \left (a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-8 \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )^2 \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} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(322\) vs. \(2(143)=286\).
Time = 134.96 (sec) , antiderivative size = 323, normalized size of antiderivative = 2.06
method | result | size |
default | \(\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}}}+\frac {\frac {2 \left (\left (\frac {1}{2} a^{3} b^{2}-\frac {9}{8} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{9}+\left (a^{4} b -3 a^{2} b^{3}+3 b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{8}+\left (a^{3} b^{2}-\frac {5}{4} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{7}+\left (4 a^{4} b -10 a^{2} b^{3}+6 b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{6}+\left (6 a^{4} b -\frac {40}{3} a^{2} b^{3}+\frac {28}{3} b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{4}+\left (-a^{3} b^{2}+\frac {5}{4} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (4 a^{4} b -\frac {26}{3} a^{2} b^{3}+\frac {14}{3} b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{2}+\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 (1+\tanh \left (\frac {x}{2}\right )^{2}\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}}\) | \(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 \,{\mathrm e}^{4 x} a^{4}-1760 \,{\mathrm e}^{4 x} a^{2} b^{2}+1424 b^{4} {\mathrm e}^{4 x}+480 \,{\mathrm e}^{2 x} a^{4}+120 \,{\mathrm e}^{2 x} a^{3} b -1120 \,{\mathrm e}^{2 x} a^{2} b^{2}-330 \,{\mathrm e}^{2 x} a \,b^{3}+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\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 3227 vs. \(2 (143) = 286\).
Time = 0.41 (sec) , antiderivative size = 6509, normalized size of antiderivative = 41.46 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\int \frac {\operatorname {sech}^{7}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (143) = 286\).
Time = 0.27 (sec) , antiderivative size = 326, normalized size of antiderivative = 2.08 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\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}} \]
[In]
[Out]
Time = 7.59 (sec) , antiderivative size = 447, normalized size of antiderivative = 2.85 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\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} \]
[In]
[Out]