Integrand size = 13, antiderivative size = 83 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {\arctan (\sinh (x))}{2 a}-\frac {b^2 \arctan (\sinh (x))}{a^3}+\frac {b \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3599, 3189, 3853, 3855, 3183, 3153, 212} \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=-\frac {b^2 \arctan (\sinh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {b \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {\arctan (\sinh (x))}{2 a}+\frac {\tanh (x) \text {sech}(x)}{2 a} \]
[In]
[Out]
Rule 212
Rule 3153
Rule 3183
Rule 3189
Rule 3599
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\left (i \int \frac {\text {sech}^2(x) \tanh (x)}{-i b \cosh (x)-i a \sinh (x)} \, dx\right ) \\ & = -\int \left (-\frac {\text {sech}^3(x)}{a}+\frac {i b \text {sech}^2(x)}{a (i b \cosh (x)+i a \sinh (x))}\right ) \, dx \\ & = \frac {\int \text {sech}^3(x) \, dx}{a}-\frac {(i b) \int \frac {\text {sech}^2(x)}{i b \cosh (x)+i a \sinh (x)} \, dx}{a} \\ & = -\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a}+\frac {\int \text {sech}(x) \, dx}{2 a}-\frac {b^2 \int \text {sech}(x) \, dx}{a^3}-\frac {\left (i b \left (a^2-b^2\right )\right ) \int \frac {1}{i b \cosh (x)+i a \sinh (x)} \, dx}{a^3} \\ & = \frac {\arctan (\sinh (x))}{2 a}-\frac {b^2 \arctan (\sinh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a}+\frac {\left (b \left (a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,a \cosh (x)+b \sinh (x)\right )}{a^3} \\ & = \frac {\arctan (\sinh (x))}{2 a}-\frac {b^2 \arctan (\sinh (x))}{a^3}+\frac {b \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a} \\ \end{align*}
Time = 0.70 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.02 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {2 \left (a^2-2 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+4 b \sqrt {-a+b} \sqrt {a+b} \arctan \left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a+b} \sqrt {a+b}}\right )+a \text {sech}(x) (-2 b+a \tanh (x))}{2 a^3} \]
[In]
[Out]
Time = 4.43 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.46
method | result | size |
default | \(\frac {\frac {2 \left (-\frac {a^{2} \tanh \left (\frac {x}{2}\right )^{3}}{2}-\tanh \left (\frac {x}{2}\right )^{2} a b +\frac {a^{2} \tanh \left (\frac {x}{2}\right )}{2}-a b \right )}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{2}}+\left (a^{2}-2 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a^{3}}-\frac {2 b \left (a^{2}-b^{2}\right ) \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{a^{3} \sqrt {-a^{2}+b^{2}}}\) | \(121\) |
risch | \(\frac {{\mathrm e}^{x} \left (a \,{\mathrm e}^{2 x}-2 b \,{\mathrm e}^{2 x}-a -2 b \right )}{\left (1+{\mathrm e}^{2 x}\right )^{2} a^{2}}+\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{x}+\frac {\sqrt {a^{2}-b^{2}}}{a +b}\right )}{a^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{x}-\frac {\sqrt {a^{2}-b^{2}}}{a +b}\right )}{a^{3}}+\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{2 a}-\frac {i \ln \left ({\mathrm e}^{x}+i\right ) b^{2}}{a^{3}}-\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{2 a}+\frac {i \ln \left ({\mathrm e}^{x}-i\right ) b^{2}}{a^{3}}\) | \(166\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 401 vs. \(2 (75) = 150\).
Time = 0.34 (sec) , antiderivative size = 856, normalized size of antiderivative = 10.31 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.23 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {{\left (a^{2} - 2 \, b^{2}\right )} \arctan \left (e^{x}\right )}{a^{3}} - \frac {2 \, {\left (a^{2} b - b^{3}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} a^{3}} + \frac {a e^{\left (3 \, x\right )} - 2 \, b e^{\left (3 \, x\right )} - a e^{x} - 2 \, b e^{x}}{a^{2} {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]
[In]
[Out]
Time = 4.77 (sec) , antiderivative size = 166, normalized size of antiderivative = 2.00 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {{\mathrm {e}}^x\,\left (a-2\,b\right )}{a^2\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}-\frac {\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}+\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x+\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^3}-\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x-\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^3} \]
[In]
[Out]