Integrand size = 13, antiderivative size = 95 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {i a \log (i-\sinh (x))}{4 (a-i b)^2}+\frac {i a \log (i+\sinh (x))}{4 (a+i b)^2}-\frac {a^2 b \log (b+a \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {\text {sech}^2(x) (b-a \sinh (x))}{2 \left (a^2+b^2\right )} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3957, 2916, 12, 837, 815} \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {a^2 b \log (a \sinh (x)+b)}{\left (a^2+b^2\right )^2}-\frac {\text {sech}^2(x) (b-a \sinh (x))}{2 \left (a^2+b^2\right )}-\frac {i a \log (-\sinh (x)+i)}{4 (a-i b)^2}+\frac {i a \log (\sinh (x)+i)}{4 (a+i b)^2} \]
[In]
[Out]
Rule 12
Rule 815
Rule 837
Rule 2916
Rule 3957
Rubi steps \begin{align*} \text {integral}& = i \int \frac {\text {sech}^2(x) \tanh (x)}{i b+i a \sinh (x)} \, dx \\ & = -\left (\left (i a^3\right ) \text {Subst}\left (\int \frac {x}{a (i b+x) \left (a^2-x^2\right )^2} \, dx,x,i a \sinh (x)\right )\right ) \\ & = -\left (\left (i a^2\right ) \text {Subst}\left (\int \frac {x}{(i b+x) \left (a^2-x^2\right )^2} \, dx,x,i a \sinh (x)\right )\right ) \\ & = -\frac {\text {sech}^2(x) (b-a \sinh (x))}{2 \left (a^2+b^2\right )}-\frac {i \text {Subst}\left (\int \frac {-i a^2 b+a^2 x}{(i b+x) \left (a^2-x^2\right )} \, dx,x,i a \sinh (x)\right )}{2 \left (a^2+b^2\right )} \\ & = -\frac {\text {sech}^2(x) (b-a \sinh (x))}{2 \left (a^2+b^2\right )}-\frac {i \text {Subst}\left (\int \left (\frac {a (a-i b)}{2 (a+i b) (a-x)}-\frac {2 a^2 b}{\left (a^2+b^2\right ) (b-i x)}+\frac {a (a+i b)}{2 (a-i b) (a+x)}\right ) \, dx,x,i a \sinh (x)\right )}{2 \left (a^2+b^2\right )} \\ & = -\frac {i a \log (i-\sinh (x))}{4 (a-i b)^2}+\frac {i a \log (i+\sinh (x))}{4 (a+i b)^2}-\frac {a^2 b \log (b+a \sinh (x))}{\left (a^2+b^2\right )^2}-\frac {\text {sech}^2(x) (b-a \sinh (x))}{2 \left (a^2+b^2\right )} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.34 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {i \text {csch}(x) (b+a \sinh (x)) \left (\frac {a \log (i-\sinh (x))}{(a-i b)^2}-\frac {a \log (i+\sinh (x))}{(a+i b)^2}-\frac {4 i a^2 b \log (b+a \sinh (x))}{\left (a^2+b^2\right )^2}+\frac {1}{(i a+b) (i-\sinh (x))}+\frac {i}{(a+i b) (i+\sinh (x))}\right )}{4 (a+b \text {csch}(x))} \]
[In]
[Out]
Time = 2.24 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.51
method | result | size |
default | \(\frac {\frac {2 \left (\left (-\frac {1}{2} a^{3}-\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (a^{2} b +b^{3}\right ) \tanh \left (\frac {x}{2}\right )^{2}+\left (\frac {1}{2} a^{3}+\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {x}{2}\right )\right )}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{2}}+a \left (a b \ln \left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )+\left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )\right )}{\left (a^{2}+b^{2}\right )^{2}}-\frac {a^{2} b \ln \left (-\tanh \left (\frac {x}{2}\right )^{2} b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{\left (a^{2}+b^{2}\right )^{2}}\) | \(143\) |
risch | \(\frac {{\mathrm e}^{x} \left (a \,{\mathrm e}^{2 x}-2 \,{\mathrm e}^{x} b -a \right )}{\left (1+{\mathrm e}^{2 x}\right )^{2} \left (a^{2}+b^{2}\right )}-\frac {i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {i a \ln \left ({\mathrm e}^{x}-i\right ) b^{2}}{2 a^{4}+4 a^{2} b^{2}+2 b^{4}}+\frac {a^{2} \ln \left ({\mathrm e}^{x}-i\right ) b}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{2 a^{4}+4 a^{2} b^{2}+2 b^{4}}-\frac {i a \ln \left ({\mathrm e}^{x}+i\right ) b^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {a^{2} \ln \left ({\mathrm e}^{x}+i\right ) b}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {a^{2} b \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}-1\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}\) | \(249\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 675 vs. \(2 (78) = 156\).
Time = 0.27 (sec) , antiderivative size = 675, normalized size of antiderivative = 7.11 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=\frac {{\left (a^{3} + a b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{3} + a b^{2}\right )} \sinh \left (x\right )^{3} - 2 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )^{2} - {\left (2 \, a^{2} b + 2 \, b^{3} - 3 \, {\left (a^{3} + a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left ({\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )^{4} + a^{3} - a b^{2} + 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - a b^{2} + 3 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - {\left (a^{3} + a b^{2}\right )} \cosh \left (x\right ) - {\left (a^{2} b \cosh \left (x\right )^{4} + 4 \, a^{2} b \cosh \left (x\right ) \sinh \left (x\right )^{3} + a^{2} b \sinh \left (x\right )^{4} + 2 \, a^{2} b \cosh \left (x\right )^{2} + a^{2} b + 2 \, {\left (3 \, a^{2} b \cosh \left (x\right )^{2} + a^{2} b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a^{2} b \cosh \left (x\right )^{3} + a^{2} b \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (a \sinh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (a^{2} b \cosh \left (x\right )^{4} + 4 \, a^{2} b \cosh \left (x\right ) \sinh \left (x\right )^{3} + a^{2} b \sinh \left (x\right )^{4} + 2 \, a^{2} b \cosh \left (x\right )^{2} + a^{2} b + 2 \, {\left (3 \, a^{2} b \cosh \left (x\right )^{2} + a^{2} b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a^{2} b \cosh \left (x\right )^{3} + a^{2} b \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left (a^{3} + a b^{2} - 3 \, {\left (a^{3} + a b^{2}\right )} \cosh \left (x\right )^{2} + 4 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{4} + a^{4} + 2 \, a^{2} b^{2} + b^{4} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4} + 3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{3} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]
[In]
[Out]
\[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (78) = 156\).
Time = 0.27 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.69 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {a^{2} b \log \left (-2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} - a\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {a^{2} b \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {{\left (a^{3} - a b^{2}\right )} \arctan \left (e^{\left (-x\right )}\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {a e^{\left (-x\right )} - 2 \, b e^{\left (-2 \, x\right )} - a e^{\left (-3 \, x\right )}}{a^{2} + b^{2} + 2 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, x\right )} + {\left (a^{2} + b^{2}\right )} e^{\left (-4 \, x\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (78) = 156\).
Time = 0.29 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.29 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {a^{3} b \log \left ({\left | -a {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, b \right |}\right )}{a^{5} + 2 \, a^{3} b^{2} + a b^{4}} + \frac {a^{2} b \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} {\left (a^{3} - a b^{2}\right )}}{4 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} - \frac {a^{2} b {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 2 \, a^{3} {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} + 8 \, a^{2} b + 4 \, b^{3}}{2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}} \]
[In]
[Out]
Time = 3.59 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.69 \[ \int \frac {\text {sech}^3(x)}{a+b \text {csch}(x)} \, dx=\frac {\frac {2\,b}{a^2+b^2}-\frac {2\,a\,{\mathrm {e}}^x}{a^2+b^2}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}-\frac {\frac {2\,\left (a^2\,b+b^3\right )}{{\left (a^2+b^2\right )}^2}-\frac {{\mathrm {e}}^x\,\left (a^3+a\,b^2\right )}{{\left (a^2+b^2\right )}^2}}{{\mathrm {e}}^{2\,x}+1}+\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}{2\,\left (-a^2\,1{}\mathrm {i}+2\,a\,b+b^2\,1{}\mathrm {i}\right )}-\frac {a^2\,b\,\ln \left (a^6\,{\mathrm {e}}^{2\,x}-a^6-a^2\,b^4-14\,a^4\,b^2+a^2\,b^4\,{\mathrm {e}}^{2\,x}+14\,a^4\,b^2\,{\mathrm {e}}^{2\,x}+2\,a\,b^5\,{\mathrm {e}}^x+2\,a^5\,b\,{\mathrm {e}}^x+28\,a^3\,b^3\,{\mathrm {e}}^x\right )}{a^4+2\,a^2\,b^2+b^4}+\frac {a\,\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,\left (-a^2+a\,b\,2{}\mathrm {i}+b^2\right )} \]
[In]
[Out]