Integrand size = 13, antiderivative size = 64 \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=-\frac {a \arctan (\sinh (x))}{b^2}+\frac {2 a^2 \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^2 \sqrt {a+b}}+\frac {\tanh (x)}{b} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 64, 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 = {3875, 3874, 3855, 3916, 2738, 211} \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\frac {2 a^2 \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b^2 \sqrt {a-b} \sqrt {a+b}}-\frac {a \arctan (\sinh (x))}{b^2}+\frac {\tanh (x)}{b} \]
[In]
[Out]
Rule 211
Rule 2738
Rule 3855
Rule 3874
Rule 3875
Rule 3916
Rubi steps \begin{align*} \text {integral}& = \frac {\tanh (x)}{b}-\frac {a \int \frac {\text {sech}^2(x)}{a+b \text {sech}(x)} \, dx}{b} \\ & = \frac {\tanh (x)}{b}-\frac {a \int \text {sech}(x) \, dx}{b^2}+\frac {a^2 \int \frac {\text {sech}(x)}{a+b \text {sech}(x)} \, dx}{b^2} \\ & = -\frac {a \arctan (\sinh (x))}{b^2}+\frac {\tanh (x)}{b}+\frac {a^2 \int \frac {1}{1+\frac {a \cosh (x)}{b}} \, dx}{b^3} \\ & = -\frac {a \arctan (\sinh (x))}{b^2}+\frac {\tanh (x)}{b}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^3} \\ & = -\frac {a \arctan (\sinh (x))}{b^2}+\frac {2 a^2 \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^2 \sqrt {a+b}}+\frac {\tanh (x)}{b} \\ \end{align*}
Time = 0.17 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.98 \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\frac {-2 a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-\frac {2 a^2 \arctan \left (\frac {(-a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+b \tanh (x)}{b^2} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.14
method | result | size |
default | \(\frac {2 a^{2} \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {2 \left (-\frac {b \tanh \left (\frac {x}{2}\right )}{1+\tanh \left (\frac {x}{2}\right )^{2}}+a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )\right )}{b^{2}}\) | \(73\) |
risch | \(-\frac {2}{b \left (1+{\mathrm e}^{2 x}\right )}-\frac {a^{2} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, b^{2}}+\frac {a^{2} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, b^{2}}+\frac {i a \ln \left ({\mathrm e}^{x}-i\right )}{b^{2}}-\frac {i a \ln \left ({\mathrm e}^{x}+i\right )}{b^{2}}\) | \(160\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (54) = 108\).
Time = 0.28 (sec) , antiderivative size = 504, normalized size of antiderivative = 7.88 \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\left [-\frac {2 \, a^{2} b - 2 \, b^{3} + {\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 )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {a^{2} \cosh \left (x\right )^{2} + a^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) - a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) - 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + b\right )}}{a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + b\right )} \sinh \left (x\right ) + a}\right ) + 2 \, {\left (a^{3} - a b^{2} + {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )^{2}\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{a^{2} b^{2} - b^{4} + {\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} b^{2} - b^{4}\right )} \sinh \left (x\right )^{2}}, -\frac {2 \, {\left (a^{2} b - b^{3} + {\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 )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cosh \left (x\right ) + a \sinh \left (x\right ) + b}{\sqrt {a^{2} - b^{2}}}\right ) + {\left (a^{3} - a b^{2} + {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )^{2}\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )\right )}}{a^{2} b^{2} - b^{4} + {\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} b^{2} - b^{4}\right )} \sinh \left (x\right )^{2}}\right ] \]
[In]
[Out]
\[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.95 \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\frac {2 \, a^{2} \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{2}} - \frac {2 \, a \arctan \left (e^{x}\right )}{b^{2}} - \frac {2}{b {\left (e^{\left (2 \, x\right )} + 1\right )}} \]
[In]
[Out]
Time = 4.35 (sec) , antiderivative size = 294, normalized size of antiderivative = 4.59 \[ \int \frac {\text {sech}^3(x)}{a+b \text {sech}(x)} \, dx=\frac {a^2\,\ln \left (64\,a^3\,b-64\,a\,b^3+32\,a^3\,\sqrt {b^2-a^2}-32\,a^4\,{\mathrm {e}}^x-128\,b^4\,{\mathrm {e}}^x-64\,a\,b^2\,\sqrt {b^2-a^2}-128\,b^3\,{\mathrm {e}}^x\,\sqrt {b^2-a^2}+160\,a^2\,b^2\,{\mathrm {e}}^x+96\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {b^2-a^2}\right )}{b^2\,\sqrt {b^2-a^2}}+\frac {a\,\left (\ln \left (32\,{\mathrm {e}}^x-32{}\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left (32\,{\mathrm {e}}^x+32{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{b^2}-\frac {2}{b+b\,{\mathrm {e}}^{2\,x}}-\frac {a^2\,\ln \left (64\,a\,b^3-64\,a^3\,b+32\,a^3\,\sqrt {b^2-a^2}+32\,a^4\,{\mathrm {e}}^x+128\,b^4\,{\mathrm {e}}^x-64\,a\,b^2\,\sqrt {b^2-a^2}-128\,b^3\,{\mathrm {e}}^x\,\sqrt {b^2-a^2}-160\,a^2\,b^2\,{\mathrm {e}}^x+96\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {b^2-a^2}\right )}{b^2\,\sqrt {b^2-a^2}} \]
[In]
[Out]