Integrand size = 13, antiderivative size = 35 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\log (\cosh (x))}{a}+\frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\text {sech}(x)}{b} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3970, 908} \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\log (\cosh (x))}{a}+\frac {\text {sech}(x)}{b} \]
[In]
[Out]
Rule 908
Rule 3970
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {b^2-x^2}{x (a+x)} \, dx,x,b \text {sech}(x)\right )}{b^2} \\ & = -\frac {\text {Subst}\left (\int \left (-1+\frac {b^2}{a x}+\frac {a^2-b^2}{a (a+x)}\right ) \, dx,x,b \text {sech}(x)\right )}{b^2} \\ & = \frac {\log (\cosh (x))}{a}+\frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\text {sech}(x)}{b} \\ \end{align*}
Time = 0.11 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.09 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\log (\cosh (x))}{a}+\frac {\log (a+b \text {sech}(x))}{a}-\frac {a \log (a+b \text {sech}(x))}{b^2}+\frac {\text {sech}(x)}{b} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(74\) vs. \(2(35)=70\).
Time = 0.39 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.14
method | result | size |
risch | \(-\frac {x}{a}+\frac {2 \,{\mathrm e}^{x}}{b \left (1+{\mathrm e}^{2 x}\right )}+\frac {a \ln \left (1+{\mathrm e}^{2 x}\right )}{b^{2}}-\frac {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}\) | \(75\) |
default | \(\frac {\frac {2 b}{1+\tanh \left (\frac {x}{2}\right )^{2}}+a \ln \left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )}{b^{2}}-\frac {\left (a -b \right ) \left (a +b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -\tanh \left (\frac {x}{2}\right )^{2} b +a +b \right )}{a \,b^{2}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}\) | \(92\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 200 vs. \(2 (35) = 70\).
Time = 0.29 (sec) , antiderivative size = 200, normalized size of antiderivative = 5.71 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=-\frac {b^{2} x \cosh \left (x\right )^{2} + b^{2} x \sinh \left (x\right )^{2} + b^{2} x - 2 \, a b \cosh \left (x\right ) + {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left (a^{2} \cosh \left (x\right )^{2} + 2 \, a^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a^{2} \sinh \left (x\right )^{2} + a^{2}\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (b^{2} x \cosh \left (x\right ) - a b\right )} \sinh \left (x\right )}{a b^{2} \cosh \left (x\right )^{2} + 2 \, a b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a b^{2} \sinh \left (x\right )^{2} + a b^{2}} \]
[In]
[Out]
\[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\int \frac {\tanh ^{3}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.91 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {x}{a} + \frac {2 \, e^{\left (-x\right )}}{b e^{\left (-2 \, x\right )} + b} + \frac {a \log \left (e^{\left (-2 \, x\right )} + 1\right )}{b^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a b^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (35) = 70\).
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.09 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {a \log \left (e^{\left (-x\right )} + e^{x}\right )}{b^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a b^{2}} - \frac {a {\left (e^{\left (-x\right )} + e^{x}\right )} - 2 \, b}{b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}} \]
[In]
[Out]
Time = 2.32 (sec) , antiderivative size = 260, normalized size of antiderivative = 7.43 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {2\,{\mathrm {e}}^x}{b+b\,{\mathrm {e}}^{2\,x}}-\frac {x}{a}+\frac {\ln \left (16\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+16\,a^5-16\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x-16\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+32\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^2\,b^3\,{\mathrm {e}}^x\right )}{a}-\frac {a\,\ln \left (16\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+16\,a^5-16\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x-16\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+32\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^2\,b^3\,{\mathrm {e}}^x\right )}{b^2}+\frac {a\,\ln \left (16\,a^6\,{\mathrm {e}}^{2\,x}-4\,b^6\,{\mathrm {e}}^{2\,x}+16\,a^6-4\,b^6+20\,a^2\,b^4-32\,a^4\,b^2+20\,a^2\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^4\,b^2\,{\mathrm {e}}^{2\,x}\right )}{b^2} \]
[In]
[Out]