Integrand size = 15, antiderivative size = 58 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=-\frac {B \text {arctanh}(\cosh (x))}{a}-\frac {2 (a A-b B) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a \sqrt {a^2+b^2}} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 58, 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.400, Rules used = {2907, 3080, 3855, 2739, 632, 212} \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=-\frac {2 (a A-b B) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a \sqrt {a^2+b^2}}-\frac {B \text {arctanh}(\cosh (x))}{a} \]
[In]
[Out]
Rule 212
Rule 632
Rule 2739
Rule 2907
Rule 3080
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\left (i \int \frac {\text {csch}(x) (i B+i A \sinh (x))}{a+b \sinh (x)} \, dx\right ) \\ & = \frac {B \int \text {csch}(x) \, dx}{a}+\frac {(a A-b B) \int \frac {1}{a+b \sinh (x)} \, dx}{a} \\ & = -\frac {B \text {arctanh}(\cosh (x))}{a}+\frac {(2 (a A-b B)) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a} \\ & = -\frac {B \text {arctanh}(\cosh (x))}{a}-\frac {(4 (a A-b B)) \text {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac {x}{2}\right )\right )}{a} \\ & = -\frac {B \text {arctanh}(\cosh (x))}{a}-\frac {2 (a A-b B) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a \sqrt {a^2+b^2}} \\ \end{align*}
Time = 1.13 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.33 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=\frac {\frac {2 (a A-b B) \arctan \left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}+B \left (-\log \left (\cosh \left (\frac {x}{2}\right )\right )+\log \left (\sinh \left (\frac {x}{2}\right )\right )\right )}{a} \]
[In]
[Out]
Time = 0.93 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00
method | result | size |
default | \(-\frac {\left (-2 A a +2 B b \right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \sqrt {a^{2}+b^{2}}}+\frac {B \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) | \(58\) |
parts | \(\frac {2 A \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}+\frac {B \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a}-\frac {2 B b \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \sqrt {a^{2}+b^{2}}}\) | \(86\) |
risch | \(\frac {B \ln \left ({\mathrm e}^{x}-1\right )}{a}-\frac {B \ln \left ({\mathrm e}^{x}+1\right )}{a}+\frac {\ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right ) A}{\sqrt {a^{2}+b^{2}}}-\frac {\ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right ) B b}{\sqrt {a^{2}+b^{2}}\, a}-\frac {\ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right ) A}{\sqrt {a^{2}+b^{2}}}+\frac {B b \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, a}\) | \(225\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (54) = 108\).
Time = 0.50 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.97 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=-\frac {{\left (A a - B b\right )} \sqrt {a^{2} + b^{2}} \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 ) + {\left (B a^{2} + B b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (B a^{2} + B b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{3} + a b^{2}} \]
[In]
[Out]
\[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=\int \frac {A + B \operatorname {csch}{\left (x \right )}}{a + b \sinh {\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (54) = 108\).
Time = 0.33 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.43 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=-B {\left (\frac {b \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a} + \frac {\log \left (e^{\left (-x\right )} + 1\right )}{a} - \frac {\log \left (e^{\left (-x\right )} - 1\right )}{a}\right )} + \frac {A \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.55 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=-\frac {B \log \left (e^{x} + 1\right )}{a} + \frac {B \log \left ({\left | e^{x} - 1 \right |}\right )}{a} + \frac {{\left (A a - B b\right )} \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a} \]
[In]
[Out]
Time = 2.22 (sec) , antiderivative size = 539, normalized size of antiderivative = 9.29 \[ \int \frac {A+B \text {csch}(x)}{a+b \sinh (x)} \, dx=\frac {B\,\ln \left ({\mathrm {e}}^x-1\right )}{a}-\frac {B\,\ln \left ({\mathrm {e}}^x+1\right )}{a}-\frac {\ln \left (\frac {\left (A\,a-B\,b\right )\,\left (\frac {32\,\left (A^2\,a^2\,b-2\,A\,B\,a\,b^2-4\,{\mathrm {e}}^x\,B^2\,a^3+2\,B^2\,a^2\,b-3\,{\mathrm {e}}^x\,B^2\,a\,b^2+2\,B^2\,b^3\right )}{b^5}-\frac {\left (A\,a-B\,b\right )\,\left (\frac {32\,a^2\,\left (2\,B\,b^2+4\,A\,a^2\,{\mathrm {e}}^x+A\,b^2\,{\mathrm {e}}^x-2\,A\,a\,b-3\,B\,a\,b\,{\mathrm {e}}^x\right )}{b^5}+\frac {32\,a\,\left (A\,a-B\,b\right )\,\left (-4\,{\mathrm {e}}^x\,a^3+3\,a^2\,b-3\,{\mathrm {e}}^x\,a\,b^2+2\,b^3\right )}{b^5\,\sqrt {a^2+b^2}}\right )}{a\,\sqrt {a^2+b^2}}\right )}{a\,\sqrt {a^2+b^2}}+\frac {32\,B\,\left (A\,a-B\,b\right )\,\left (A\,b\,{\mathrm {e}}^x-2\,B\,b+4\,B\,a\,{\mathrm {e}}^x\right )}{b^5}\right )\,\left (A\,a-B\,b\right )\,\sqrt {a^2+b^2}}{a^3+a\,b^2}+\frac {\ln \left (\frac {32\,B\,\left (A\,a-B\,b\right )\,\left (A\,b\,{\mathrm {e}}^x-2\,B\,b+4\,B\,a\,{\mathrm {e}}^x\right )}{b^5}-\frac {\left (A\,a-B\,b\right )\,\left (\frac {32\,\left (A^2\,a^2\,b-2\,A\,B\,a\,b^2-4\,{\mathrm {e}}^x\,B^2\,a^3+2\,B^2\,a^2\,b-3\,{\mathrm {e}}^x\,B^2\,a\,b^2+2\,B^2\,b^3\right )}{b^5}+\frac {\left (A\,a-B\,b\right )\,\left (\frac {32\,a^2\,\left (2\,B\,b^2+4\,A\,a^2\,{\mathrm {e}}^x+A\,b^2\,{\mathrm {e}}^x-2\,A\,a\,b-3\,B\,a\,b\,{\mathrm {e}}^x\right )}{b^5}-\frac {32\,a\,\left (A\,a-B\,b\right )\,\left (-4\,{\mathrm {e}}^x\,a^3+3\,a^2\,b-3\,{\mathrm {e}}^x\,a\,b^2+2\,b^3\right )}{b^5\,\sqrt {a^2+b^2}}\right )}{a\,\sqrt {a^2+b^2}}\right )}{a\,\sqrt {a^2+b^2}}\right )\,\left (A\,a-B\,b\right )\,\sqrt {a^2+b^2}}{a^3+a\,b^2} \]
[In]
[Out]