Integrand size = 13, antiderivative size = 57 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=-\frac {a x}{b^2}-\frac {2 a^2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^2 \sqrt {a^2+b^2}}+\frac {\cosh (x)}{b} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 57, 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 = {2825, 12, 2814, 2739, 632, 212} \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=-\frac {2 a^2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^2 \sqrt {a^2+b^2}}-\frac {a x}{b^2}+\frac {\cosh (x)}{b} \]
[In]
[Out]
Rule 12
Rule 212
Rule 632
Rule 2739
Rule 2814
Rule 2825
Rubi steps \begin{align*} \text {integral}& = \frac {\cosh (x)}{b}-\frac {\int \frac {a \sinh (x)}{a+b \sinh (x)} \, dx}{b} \\ & = \frac {\cosh (x)}{b}-\frac {a \int \frac {\sinh (x)}{a+b \sinh (x)} \, dx}{b} \\ & = -\frac {a x}{b^2}+\frac {\cosh (x)}{b}+\frac {a^2 \int \frac {1}{a+b \sinh (x)} \, dx}{b^2} \\ & = -\frac {a x}{b^2}+\frac {\cosh (x)}{b}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^2} \\ & = -\frac {a x}{b^2}+\frac {\cosh (x)}{b}-\frac {\left (4 a^2\right ) \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 )}{b^2} \\ & = -\frac {a x}{b^2}-\frac {2 a^2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^2 \sqrt {a^2+b^2}}+\frac {\cosh (x)}{b} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.07 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\frac {a \left (-x+\frac {2 a \arctan \left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}\right )+b \cosh (x)}{b^2} \]
[In]
[Out]
Time = 0.53 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.61
method | result | size |
default | \(-\frac {1}{b \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b^{2}}+\frac {1}{b \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {a \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b^{2}}+\frac {2 a^{2} \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{2} \sqrt {a^{2}+b^{2}}}\) | \(92\) |
risch | \(-\frac {a x}{b^{2}}+\frac {{\mathrm e}^{x}}{2 b}+\frac {{\mathrm e}^{-x}}{2 b}+\frac {a^{2} \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}}\, b^{2}}-\frac {a^{2} \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}}\, b^{2}}\) | \(132\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (53) = 106\).
Time = 0.35 (sec) , antiderivative size = 238, normalized size of antiderivative = 4.18 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\frac {a^{2} b + b^{3} - 2 \, {\left (a^{3} + a b^{2}\right )} x \cosh \left (x\right ) + {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )^{2} + {\left (a^{2} b + b^{3}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) + a^{2} \sinh \left (x\right )\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 ) - 2 \, {\left ({\left (a^{3} + a b^{2}\right )} x - {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{2 \, {\left ({\left (a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) + {\left (a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1253 vs. \(2 (49) = 98\).
Time = 110.09 (sec) , antiderivative size = 1253, normalized size of antiderivative = 21.98 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.47 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\frac {a^{2} \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}} b^{2}} - \frac {a x}{b^{2}} + \frac {e^{\left (-x\right )}}{2 \, b} + \frac {e^{x}}{2 \, b} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.51 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\frac {a^{2} \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}} b^{2}} - \frac {a x}{b^{2}} + \frac {e^{\left (-x\right )}}{2 \, b} + \frac {e^{x}}{2 \, b} \]
[In]
[Out]
Time = 1.27 (sec) , antiderivative size = 129, normalized size of antiderivative = 2.26 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (x)} \, dx=\frac {{\mathrm {e}}^{-x}}{2\,b}+\frac {{\mathrm {e}}^x}{2\,b}-\frac {a\,x}{b^2}-\frac {a^2\,\ln \left (-\frac {2\,a^2\,{\mathrm {e}}^x}{b^3}-\frac {2\,a^2\,\left (b-a\,{\mathrm {e}}^x\right )}{b^3\,\sqrt {a^2+b^2}}\right )}{b^2\,\sqrt {a^2+b^2}}+\frac {a^2\,\ln \left (\frac {2\,a^2\,\left (b-a\,{\mathrm {e}}^x\right )}{b^3\,\sqrt {a^2+b^2}}-\frac {2\,a^2\,{\mathrm {e}}^x}{b^3}\right )}{b^2\,\sqrt {a^2+b^2}} \]
[In]
[Out]