Integrand size = 13, antiderivative size = 94 \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\frac {x}{a}+\frac {\left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^3}-\frac {2 (a-b)^{3/2} (a+b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a b^3}-\frac {a \tanh (x)}{b^2}+\frac {\text {sech}(x) \tanh (x)}{2 b} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3983, 2972, 3136, 2738, 211, 3855} \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\frac {\left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^3}-\frac {2 (a-b)^{3/2} (a+b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a b^3}-\frac {a \tanh (x)}{b^2}+\frac {x}{a}+\frac {\tanh (x) \text {sech}(x)}{2 b} \]
[In]
[Out]
Rule 211
Rule 2738
Rule 2972
Rule 3136
Rule 3855
Rule 3983
Rubi steps \begin{align*} \text {integral}& = \int \frac {\sinh (x) \tanh ^3(x)}{b+a \cosh (x)} \, dx \\ & = -\frac {a \tanh (x)}{b^2}+\frac {\text {sech}(x) \tanh (x)}{2 b}-\frac {\int \frac {\left (-2 a^2+3 b^2-a b \cosh (x)-2 b^2 \cosh ^2(x)\right ) \text {sech}(x)}{b+a \cosh (x)} \, dx}{2 b^2} \\ & = \frac {x}{a}-\frac {a \tanh (x)}{b^2}+\frac {\text {sech}(x) \tanh (x)}{2 b}-\frac {\left (a^2-b^2\right )^2 \int \frac {1}{b+a \cosh (x)} \, dx}{a b^3}-\frac {\left (-2 a^2+3 b^2\right ) \int \text {sech}(x) \, dx}{2 b^3} \\ & = \frac {x}{a}+\frac {\left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^3}-\frac {a \tanh (x)}{b^2}+\frac {\text {sech}(x) \tanh (x)}{2 b}-\frac {\left (2 \left (a^2-b^2\right )^2\right ) \text {Subst}\left (\int \frac {1}{a+b-(-a+b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a b^3} \\ & = \frac {x}{a}+\frac {\left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^3}-\frac {2 (a-b)^{3/2} (a+b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a b^3}-\frac {a \tanh (x)}{b^2}+\frac {\text {sech}(x) \tanh (x)}{2 b} \\ \end{align*}
Time = 0.55 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.20 \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\frac {(b+a \cosh (x)) \text {sech}^2(x) \left (2 \left (b^3 x+a \left (2 a^2-3 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+2 \left (a^2-b^2\right )^{3/2} \arctan \left (\frac {(-a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )\right ) \cosh (x)+a b (-2 a \sinh (x)+b \tanh (x))\right )}{2 a b^3 (a+b \text {sech}(x))} \]
[In]
[Out]
Time = 0.73 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.62
method | result | size |
default | \(-\frac {2 \left (a -b \right )^{2} \left (a^{2}+2 a b +b^{2}\right ) \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \,b^{3} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}+\frac {\frac {2 \left (\left (-a b -\frac {1}{2} b^{2}\right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (-a b +\frac {1}{2} b^{2}\right ) \tanh \left (\frac {x}{2}\right )\right )}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{2}}+\left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{b^{3}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}\) | \(152\) |
risch | \(\frac {x}{a}+\frac {{\mathrm e}^{3 x} b +2 a \,{\mathrm e}^{2 x}-{\mathrm e}^{x} b +2 a}{\left (1+{\mathrm e}^{2 x}\right )^{2} b^{2}}+\frac {i \ln \left ({\mathrm e}^{x}+i\right ) a^{2}}{b^{3}}-\frac {3 i \ln \left ({\mathrm e}^{x}+i\right )}{2 b}-\frac {i \ln \left ({\mathrm e}^{x}-i\right ) a^{2}}{b^{3}}+\frac {3 i \ln \left ({\mathrm e}^{x}-i\right )}{2 b}+\frac {\sqrt {-a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}-b}{a}\right )}{b^{3}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}-b}{a}\right )}{b a}-\frac {\sqrt {-a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{x}+\frac {b +\sqrt {-a^{2}+b^{2}}}{a}\right )}{b^{3}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {b +\sqrt {-a^{2}+b^{2}}}{a}\right )}{b a}\) | \(255\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 587 vs. \(2 (80) = 160\).
Time = 0.35 (sec) , antiderivative size = 1254, normalized size of antiderivative = 13.34 \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\int \frac {\tanh ^{4}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.18 \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\frac {x}{a} + \frac {{\left (2 \, a^{2} - 3 \, b^{2}\right )} \arctan \left (e^{x}\right )}{b^{3}} - \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a b^{3}} + \frac {b e^{\left (3 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b e^{x} + 2 \, a}{b^{2} {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]
[In]
[Out]
Time = 7.62 (sec) , antiderivative size = 700, normalized size of antiderivative = 7.45 \[ \int \frac {\tanh ^4(x)}{a+b \text {sech}(x)} \, dx=\frac {\frac {2\,a}{b^2}+\frac {{\mathrm {e}}^x}{b}}{{\mathrm {e}}^{2\,x}+1}+\frac {x}{a}-\frac {\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (a^2\,2{}\mathrm {i}-b^2\,3{}\mathrm {i}\right )}{2\,b^3}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (a^2\,2{}\mathrm {i}-b^2\,3{}\mathrm {i}\right )}{2\,b^3}-\frac {2\,{\mathrm {e}}^x}{b\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {\ln \left (\frac {\left (\frac {64\,a^8+96\,{\mathrm {e}}^x\,a^7\,b-288\,a^6\,b^2-416\,{\mathrm {e}}^x\,a^5\,b^3+456\,a^4\,b^4+600\,{\mathrm {e}}^x\,a^3\,b^5-272\,a^2\,b^6-288\,{\mathrm {e}}^x\,a\,b^7+32\,b^8}{a^6\,b^4}-\frac {\left (\frac {16\,\left (a^2-b^2\right )\,\left (-4\,a^3-7\,{\mathrm {e}}^x\,a^2\,b+4\,a\,b^2+8\,{\mathrm {e}}^x\,b^3\right )}{a^6}+\frac {32\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}\,\left (-2\,a^3-3\,{\mathrm {e}}^x\,a^2\,b+3\,a\,b^2+4\,{\mathrm {e}}^x\,b^3\right )}{a^6\,b}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3}-\frac {8\,{\left (a^2-b^2\right )}^2\,\left (2\,a^2-3\,b^2\right )\,\left (-4\,a^3-7\,{\mathrm {e}}^x\,a^2\,b+6\,a\,b^2+10\,{\mathrm {e}}^x\,b^3\right )}{a^6\,b^6}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3}-\frac {\ln \left (-\frac {\left (\frac {64\,a^8+96\,{\mathrm {e}}^x\,a^7\,b-288\,a^6\,b^2-416\,{\mathrm {e}}^x\,a^5\,b^3+456\,a^4\,b^4+600\,{\mathrm {e}}^x\,a^3\,b^5-272\,a^2\,b^6-288\,{\mathrm {e}}^x\,a\,b^7+32\,b^8}{a^6\,b^4}+\frac {\left (\frac {16\,\left (a^2-b^2\right )\,\left (-4\,a^3-7\,{\mathrm {e}}^x\,a^2\,b+4\,a\,b^2+8\,{\mathrm {e}}^x\,b^3\right )}{a^6}-\frac {32\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}\,\left (-2\,a^3-3\,{\mathrm {e}}^x\,a^2\,b+3\,a\,b^2+4\,{\mathrm {e}}^x\,b^3\right )}{a^6\,b}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3}-\frac {8\,{\left (a^2-b^2\right )}^2\,\left (2\,a^2-3\,b^2\right )\,\left (-4\,a^3-7\,{\mathrm {e}}^x\,a^2\,b+6\,a\,b^2+10\,{\mathrm {e}}^x\,b^3\right )}{a^6\,b^6}\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{a\,b^3} \]
[In]
[Out]