Integrand size = 11, antiderivative size = 54 \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\frac {\arctan (\sinh (x))}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b}} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {2826, 3855, 2738, 214} \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\frac {\arctan (\sinh (x))}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b}} \]
[In]
[Out]
Rule 214
Rule 2738
Rule 2826
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {\int \text {sech}(x) \, dx}{a}-\frac {b \int \frac {1}{a+b \cosh (x)} \, dx}{a} \\ & = \frac {\arctan (\sinh (x))}{a}-\frac {(2 b) \text {Subst}\left (\int \frac {1}{a+b-(a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a} \\ & = \frac {\arctan (\sinh (x))}{a}-\frac {2 b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b}} \\ \end{align*}
Time = 0.07 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00 \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\frac {2 \left (\arctan \left (\tanh \left (\frac {x}{2}\right )\right )+\frac {b \arctan \left (\frac {(a-b) \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}\right )}{a} \]
[In]
[Out]
Time = 0.22 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.94
method | result | size |
default | \(-\frac {2 b \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \sqrt {\left (a +b \right ) \left (a -b \right )}}+\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) | \(51\) |
risch | \(\frac {b \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}+a^{2}-b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, a}-\frac {b \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}-a^{2}+b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, a}+\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{a}-\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{a}\) | \(141\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 227, normalized size of antiderivative = 4.20 \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\left [\frac {\sqrt {a^{2} - b^{2}} b \log \left (\frac {b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + b}\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{a^{3} - a b^{2}}, \frac {2 \, {\left (\sqrt {-a^{2} + b^{2}} b \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{a^{2} - b^{2}}\right ) + {\left (a^{2} - b^{2}\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )\right )}}{a^{3} - a b^{2}}\right ] \]
[In]
[Out]
\[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\int \frac {\operatorname {sech}{\left (x \right )}}{a + b \cosh {\left (x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.83 \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=-\frac {2 \, b \arctan \left (\frac {b e^{x} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} a} + \frac {2 \, \arctan \left (e^{x}\right )}{a} \]
[In]
[Out]
Time = 4.43 (sec) , antiderivative size = 286, normalized size of antiderivative = 5.30 \[ \int \frac {\text {sech}(x)}{a+b \cosh (x)} \, dx=\frac {b\,\ln \left (64\,a^4\,b-64\,a^2\,b^3+128\,a^5\,{\mathrm {e}}^x+32\,a\,b^3\,\sqrt {a^2-b^2}-64\,a^3\,b\,\sqrt {a^2-b^2}+32\,a\,b^4\,{\mathrm {e}}^x-128\,a^4\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}-160\,a^3\,b^2\,{\mathrm {e}}^x+96\,a^2\,b^2\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}\right )}{a\,\sqrt {a^2-b^2}}-\frac {b\,\ln \left (64\,a^4\,b-64\,a^2\,b^3+128\,a^5\,{\mathrm {e}}^x-32\,a\,b^3\,\sqrt {a^2-b^2}+64\,a^3\,b\,\sqrt {a^2-b^2}+32\,a\,b^4\,{\mathrm {e}}^x+128\,a^4\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}-160\,a^3\,b^2\,{\mathrm {e}}^x-96\,a^2\,b^2\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}\right )}{a\,\sqrt {a^2-b^2}}-\frac {\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{a} \]
[In]
[Out]