Integrand size = 15, antiderivative size = 58 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=-\frac {b \text {arctanh}(\cosh (x))}{c}-\frac {2 (a c-b d) \text {arctanh}\left (\frac {d-c \tanh \left (\frac {x}{2}\right )}{\sqrt {c^2+d^2}}\right )}{c \sqrt {c^2+d^2}} \]
[Out]
Time = 0.13 (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)}{c+d \sinh (x)} \, dx=-\frac {2 (a c-b d) \text {arctanh}\left (\frac {d-c \tanh \left (\frac {x}{2}\right )}{\sqrt {c^2+d^2}}\right )}{c \sqrt {c^2+d^2}}-\frac {b \text {arctanh}(\cosh (x))}{c} \]
[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))}{c+d \sinh (x)} \, dx\right ) \\ & = \frac {b \int \text {csch}(x) \, dx}{c}+\frac {(a c-b d) \int \frac {1}{c+d \sinh (x)} \, dx}{c} \\ & = -\frac {b \text {arctanh}(\cosh (x))}{c}+\frac {(2 (a c-b d)) \text {Subst}\left (\int \frac {1}{c+2 d x-c x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{c} \\ & = -\frac {b \text {arctanh}(\cosh (x))}{c}-\frac {(4 (a c-b d)) \text {Subst}\left (\int \frac {1}{4 \left (c^2+d^2\right )-x^2} \, dx,x,2 d-2 c \tanh \left (\frac {x}{2}\right )\right )}{c} \\ & = -\frac {b \text {arctanh}(\cosh (x))}{c}-\frac {2 (a c-b d) \text {arctanh}\left (\frac {d-c \tanh \left (\frac {x}{2}\right )}{\sqrt {c^2+d^2}}\right )}{c \sqrt {c^2+d^2}} \\ \end{align*}
Time = 1.20 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.33 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=\frac {\frac {2 (a c-b d) \arctan \left (\frac {d-c \tanh \left (\frac {x}{2}\right )}{\sqrt {-c^2-d^2}}\right )}{\sqrt {-c^2-d^2}}+b \left (-\log \left (\cosh \left (\frac {x}{2}\right )\right )+\log \left (\sinh \left (\frac {x}{2}\right )\right )\right )}{c} \]
[In]
[Out]
Time = 0.68 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00
method | result | size |
default | \(\frac {b \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{c}-\frac {\left (-2 a c +2 b d \right ) \operatorname {arctanh}\left (\frac {2 c \tanh \left (\frac {x}{2}\right )-2 d}{2 \sqrt {c^{2}+d^{2}}}\right )}{c \sqrt {c^{2}+d^{2}}}\) | \(58\) |
parts | \(\frac {2 a \,\operatorname {arctanh}\left (\frac {2 c \tanh \left (\frac {x}{2}\right )-2 d}{2 \sqrt {c^{2}+d^{2}}}\right )}{\sqrt {c^{2}+d^{2}}}+\frac {b \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{c}-\frac {2 b d \,\operatorname {arctanh}\left (\frac {2 c \tanh \left (\frac {x}{2}\right )-2 d}{2 \sqrt {c^{2}+d^{2}}}\right )}{c \sqrt {c^{2}+d^{2}}}\) | \(86\) |
risch | \(\frac {b \ln \left ({\mathrm e}^{x}-1\right )}{c}-\frac {b \ln \left ({\mathrm e}^{x}+1\right )}{c}+\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {c^{2}+d^{2}}\, c -c^{2}-d^{2}}{\sqrt {c^{2}+d^{2}}\, d}\right ) a}{\sqrt {c^{2}+d^{2}}}-\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {c^{2}+d^{2}}\, c -c^{2}-d^{2}}{\sqrt {c^{2}+d^{2}}\, d}\right ) b d}{\sqrt {c^{2}+d^{2}}\, c}-\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}}{\sqrt {c^{2}+d^{2}}\, d}\right ) a}{\sqrt {c^{2}+d^{2}}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}}{\sqrt {c^{2}+d^{2}}\, d}\right ) b d}{\sqrt {c^{2}+d^{2}}\, c}\) | \(225\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (54) = 108\).
Time = 0.47 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.97 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=-\frac {{\left (a c - b d\right )} \sqrt {c^{2} + d^{2}} \log \left (\frac {d^{2} \cosh \left (x\right )^{2} + d^{2} \sinh \left (x\right )^{2} + 2 \, c d \cosh \left (x\right ) + 2 \, c^{2} + d^{2} + 2 \, {\left (d^{2} \cosh \left (x\right ) + c d\right )} \sinh \left (x\right ) + 2 \, \sqrt {c^{2} + d^{2}} {\left (d \cosh \left (x\right ) + d \sinh \left (x\right ) + c\right )}}{d \cosh \left (x\right )^{2} + d \sinh \left (x\right )^{2} + 2 \, c \cosh \left (x\right ) + 2 \, {\left (d \cosh \left (x\right ) + c\right )} \sinh \left (x\right ) - d}\right ) + {\left (b c^{2} + b d^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - {\left (b c^{2} + b d^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{c^{3} + c d^{2}} \]
[In]
[Out]
\[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=\int \frac {a + b \operatorname {csch}{\left (x \right )}}{c + d \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.28 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.43 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=-b {\left (\frac {d \log \left (\frac {d e^{\left (-x\right )} - c - \sqrt {c^{2} + d^{2}}}{d e^{\left (-x\right )} - c + \sqrt {c^{2} + d^{2}}}\right )}{\sqrt {c^{2} + d^{2}} c} + \frac {\log \left (e^{\left (-x\right )} + 1\right )}{c} - \frac {\log \left (e^{\left (-x\right )} - 1\right )}{c}\right )} + \frac {a \log \left (\frac {d e^{\left (-x\right )} - c - \sqrt {c^{2} + d^{2}}}{d e^{\left (-x\right )} - c + \sqrt {c^{2} + d^{2}}}\right )}{\sqrt {c^{2} + d^{2}}} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.55 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=-\frac {b \log \left (e^{x} + 1\right )}{c} + \frac {b \log \left ({\left | e^{x} - 1 \right |}\right )}{c} + \frac {{\left (a c - b d\right )} \log \left (\frac {{\left | 2 \, d e^{x} + 2 \, c - 2 \, \sqrt {c^{2} + d^{2}} \right |}}{{\left | 2 \, d e^{x} + 2 \, c + 2 \, \sqrt {c^{2} + d^{2}} \right |}}\right )}{\sqrt {c^{2} + d^{2}} c} \]
[In]
[Out]
Time = 4.29 (sec) , antiderivative size = 539, normalized size of antiderivative = 9.29 \[ \int \frac {a+b \text {csch}(x)}{c+d \sinh (x)} \, dx=\frac {b\,\ln \left ({\mathrm {e}}^x-1\right )}{c}-\frac {b\,\ln \left ({\mathrm {e}}^x+1\right )}{c}-\frac {\ln \left (\frac {\left (\frac {32\,\left (a^2\,c^2\,d-2\,a\,b\,c\,d^2-4\,{\mathrm {e}}^x\,b^2\,c^3+2\,b^2\,c^2\,d-3\,{\mathrm {e}}^x\,b^2\,c\,d^2+2\,b^2\,d^3\right )}{d^5}-\frac {\left (a\,c-b\,d\right )\,\left (\frac {32\,c^2\,\left (2\,b\,d^2+4\,a\,c^2\,{\mathrm {e}}^x+a\,d^2\,{\mathrm {e}}^x-2\,a\,c\,d-3\,b\,c\,d\,{\mathrm {e}}^x\right )}{d^5}+\frac {32\,c\,\left (a\,c-b\,d\right )\,\left (-4\,{\mathrm {e}}^x\,c^3+3\,c^2\,d-3\,{\mathrm {e}}^x\,c\,d^2+2\,d^3\right )}{d^5\,\sqrt {c^2+d^2}}\right )}{c\,\sqrt {c^2+d^2}}\right )\,\left (a\,c-b\,d\right )}{c\,\sqrt {c^2+d^2}}+\frac {32\,b\,\left (a\,c-b\,d\right )\,\left (a\,d\,{\mathrm {e}}^x-2\,b\,d+4\,b\,c\,{\mathrm {e}}^x\right )}{d^5}\right )\,\left (a\,c-b\,d\right )\,\sqrt {c^2+d^2}}{c^3+c\,d^2}+\frac {\ln \left (\frac {32\,b\,\left (a\,c-b\,d\right )\,\left (a\,d\,{\mathrm {e}}^x-2\,b\,d+4\,b\,c\,{\mathrm {e}}^x\right )}{d^5}-\frac {\left (\frac {32\,\left (a^2\,c^2\,d-2\,a\,b\,c\,d^2-4\,{\mathrm {e}}^x\,b^2\,c^3+2\,b^2\,c^2\,d-3\,{\mathrm {e}}^x\,b^2\,c\,d^2+2\,b^2\,d^3\right )}{d^5}+\frac {\left (a\,c-b\,d\right )\,\left (\frac {32\,c^2\,\left (2\,b\,d^2+4\,a\,c^2\,{\mathrm {e}}^x+a\,d^2\,{\mathrm {e}}^x-2\,a\,c\,d-3\,b\,c\,d\,{\mathrm {e}}^x\right )}{d^5}-\frac {32\,c\,\left (a\,c-b\,d\right )\,\left (-4\,{\mathrm {e}}^x\,c^3+3\,c^2\,d-3\,{\mathrm {e}}^x\,c\,d^2+2\,d^3\right )}{d^5\,\sqrt {c^2+d^2}}\right )}{c\,\sqrt {c^2+d^2}}\right )\,\left (a\,c-b\,d\right )}{c\,\sqrt {c^2+d^2}}\right )\,\left (a\,c-b\,d\right )\,\sqrt {c^2+d^2}}{c^3+c\,d^2} \]
[In]
[Out]