Integrand size = 13, antiderivative size = 77 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\frac {\left (a^2+2 b^2\right ) x}{2 a^3}+\frac {2 b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^3}-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 77, 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.462, Rules used = {3957, 2944, 2814, 2739, 632, 210} \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2}+\frac {2 b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^3}+\frac {x \left (a^2+2 b^2\right )}{2 a^3} \]
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rule 2814
Rule 2944
Rule 3957
Rubi steps \begin{align*} \text {integral}& = i \int \frac {\cosh ^2(x) \sinh (x)}{i b+i a \sinh (x)} \, dx \\ & = -\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2}+\frac {\int \frac {-i a b+i \left (a^2+2 b^2\right ) \sinh (x)}{i b+i a \sinh (x)} \, dx}{2 a^2} \\ & = \frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2}-\frac {\left (i b \left (a^2+b^2\right )\right ) \int \frac {1}{i b+i a \sinh (x)} \, dx}{a^3} \\ & = \frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2}-\frac {\left (2 i b \left (a^2+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{i b+2 i a x-i b x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^3} \\ & = \frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2}+\frac {\left (4 i b \left (a^2+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,2 i a-2 i b \tanh \left (\frac {x}{2}\right )\right )}{a^3} \\ & = \frac {\left (a^2+2 b^2\right ) x}{2 a^3}+\frac {2 b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^3}-\frac {\cosh (x) (2 b-a \sinh (x))}{2 a^2} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.04 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\frac {2 a^2 x+4 b^2 x+8 b \sqrt {-a^2-b^2} \arctan \left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )-4 a b \cosh (x)+a^2 \sinh (2 x)}{4 a^3} \]
[In]
[Out]
Time = 3.48 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.58
method | result | size |
risch | \(\frac {x}{2 a}+\frac {x \,b^{2}}{a^{3}}+\frac {{\mathrm e}^{2 x}}{8 a}-\frac {b \,{\mathrm e}^{x}}{2 a^{2}}-\frac {b \,{\mathrm e}^{-x}}{2 a^{2}}-\frac {{\mathrm e}^{-2 x}}{8 a}+\frac {\sqrt {a^{2}+b^{2}}\, b \ln \left ({\mathrm e}^{x}+\frac {b +\sqrt {a^{2}+b^{2}}}{a}\right )}{a^{3}}-\frac {\sqrt {a^{2}+b^{2}}\, b \ln \left ({\mathrm e}^{x}-\frac {-b +\sqrt {a^{2}+b^{2}}}{a}\right )}{a^{3}}\) | \(122\) |
default | \(\frac {2 b \sqrt {a^{2}+b^{2}}\, \operatorname {arctanh}\left (\frac {-2 b \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{3}}-\frac {1}{2 a \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {-a +2 b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (a^{2}+2 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 a^{3}}+\frac {1}{2 a \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {-a -2 b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (-a^{2}-2 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 a^{3}}\) | \(150\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 304 vs. \(2 (68) = 136\).
Time = 0.26 (sec) , antiderivative size = 304, normalized size of antiderivative = 3.95 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\frac {a^{2} \cosh \left (x\right )^{4} + a^{2} \sinh \left (x\right )^{4} - 4 \, a b \cosh \left (x\right )^{3} + 4 \, {\left (a^{2} + 2 \, b^{2}\right )} x \cosh \left (x\right )^{2} + 4 \, {\left (a^{2} \cosh \left (x\right ) - a b\right )} \sinh \left (x\right )^{3} - 4 \, a b \cosh \left (x\right ) + 2 \, {\left (3 \, a^{2} \cosh \left (x\right )^{2} - 6 \, a b \cosh \left (x\right ) + 2 \, {\left (a^{2} + 2 \, b^{2}\right )} x\right )} \sinh \left (x\right )^{2} + 8 \, {\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2}\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {a^{2} \cosh \left (x\right )^{2} + a^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + b\right )}}{a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + b\right )} \sinh \left (x\right ) - a}\right ) - a^{2} + 4 \, {\left (a^{2} \cosh \left (x\right )^{3} - 3 \, a b \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} + 2 \, b^{2}\right )} x \cosh \left (x\right ) - a b\right )} \sinh \left (x\right )}{8 \, {\left (a^{3} \cosh \left (x\right )^{2} + 2 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right ) + a^{3} \sinh \left (x\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\int \frac {\cosh ^{2}{\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.58 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=-\frac {{\left (4 \, b e^{\left (-x\right )} - a\right )} e^{\left (2 \, x\right )}}{8 \, a^{2}} - \frac {4 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )}}{8 \, a^{2}} + \frac {{\left (a^{2} + 2 \, b^{2}\right )} x}{2 \, a^{3}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left (\frac {a e^{\left (-x\right )} - b - \sqrt {a^{2} + b^{2}}}{a e^{\left (-x\right )} - b + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a^{3}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.57 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\frac {a e^{\left (2 \, x\right )} - 4 \, b e^{x}}{8 \, a^{2}} + \frac {{\left (a^{2} + 2 \, b^{2}\right )} x}{2 \, a^{3}} - \frac {{\left (4 \, a b e^{x} + a^{2}\right )} e^{\left (-2 \, x\right )}}{8 \, a^{3}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left (\frac {{\left | 2 \, a e^{x} + 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a e^{x} + 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a^{3}} \]
[In]
[Out]
Time = 2.33 (sec) , antiderivative size = 159, normalized size of antiderivative = 2.06 \[ \int \frac {\cosh ^2(x)}{a+b \text {csch}(x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{8\,a}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a}-\frac {b\,{\mathrm {e}}^x}{2\,a^2}-\frac {b\,{\mathrm {e}}^{-x}}{2\,a^2}+\frac {x\,\left (a^2+2\,b^2\right )}{2\,a^3}-\frac {b\,\ln \left (\frac {2\,b\,{\mathrm {e}}^x\,\left (a^2+b^2\right )}{a^4}-\frac {2\,b\,\left (a-b\,{\mathrm {e}}^x\right )\,\sqrt {a^2+b^2}}{a^4}\right )\,\sqrt {a^2+b^2}}{a^3}+\frac {b\,\ln \left (\frac {2\,b\,\left (a-b\,{\mathrm {e}}^x\right )\,\sqrt {a^2+b^2}}{a^4}+\frac {2\,b\,{\mathrm {e}}^x\,\left (a^2+b^2\right )}{a^4}\right )\,\sqrt {a^2+b^2}}{a^3} \]
[In]
[Out]