Integrand size = 13, antiderivative size = 59 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=-\frac {a x}{b^2}+\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b^2}+\frac {\sinh (x)}{b} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 59, 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.308, Rules used = {2774, 2814, 2738, 214} \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b^2}-\frac {a x}{b^2}+\frac {\sinh (x)}{b} \]
[In]
[Out]
Rule 214
Rule 2738
Rule 2774
Rule 2814
Rubi steps \begin{align*} \text {integral}& = \frac {\sinh (x)}{b}+\frac {\int \frac {-b-a \cosh (x)}{a+b \cosh (x)} \, dx}{b} \\ & = -\frac {a x}{b^2}+\frac {\sinh (x)}{b}-\left (1-\frac {a^2}{b^2}\right ) \int \frac {1}{a+b \cosh (x)} \, dx \\ & = -\frac {a x}{b^2}+\frac {\sinh (x)}{b}-\left (2 \left (1-\frac {a^2}{b^2}\right )\right ) \text {Subst}\left (\int \frac {1}{a+b-(a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right ) \\ & = -\frac {a x}{b^2}+\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b^2}+\frac {\sinh (x)}{b} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.92 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\frac {-a x+2 \sqrt {-a^2+b^2} \arctan \left (\frac {(a-b) \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )+b \sinh (x)}{b^2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(99\) vs. \(2(49)=98\).
Time = 0.67 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.69
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 {2 \left (-a^{2}+b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\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}}\) | \(100\) |
risch | \(-\frac {a x}{b^{2}}+\frac {{\mathrm e}^{x}}{2 b}-\frac {{\mathrm e}^{-x}}{2 b}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}{b^{2}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right )}{b^{2}}\) | \(101\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 105 vs. \(2 (49) = 98\).
Time = 0.28 (sec) , antiderivative size = 279, normalized size of antiderivative = 4.73 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\left [-\frac {2 \, a x \cosh \left (x\right ) - b \cosh \left (x\right )^{2} - b \sinh \left (x\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \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 x - b \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}{2 \, {\left (b^{2} \cosh \left (x\right ) + b^{2} \sinh \left (x\right )\right )}}, -\frac {2 \, a x \cosh \left (x\right ) - b \cosh \left (x\right )^{2} - b \sinh \left (x\right )^{2} + 4 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \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 ) + 2 \, {\left (a x - b \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}{2 \, {\left (b^{2} \cosh \left (x\right ) + b^{2} \sinh \left (x\right )\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 892 vs. \(2 (49) = 98\).
Time = 51.50 (sec) , antiderivative size = 892, normalized size of antiderivative = 15.12 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.15 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=-\frac {a x}{b^{2}} - \frac {e^{\left (-x\right )}}{2 \, b} + \frac {e^{x}}{2 \, b} + \frac {2 \, {\left (a^{2} - b^{2}\right )} \arctan \left (\frac {b e^{x} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} b^{2}} \]
[In]
[Out]
Time = 1.00 (sec) , antiderivative size = 139, normalized size of antiderivative = 2.36 \[ \int \frac {\sinh ^2(x)}{a+b \cosh (x)} \, dx=\frac {{\mathrm {e}}^x}{2\,b}-\frac {{\mathrm {e}}^{-x}}{2\,b}-\frac {a\,x}{b^2}+\frac {\ln \left (-\frac {2\,{\mathrm {e}}^x\,\left (a^2-b^2\right )}{b^3}-\frac {2\,\sqrt {a+b}\,\left (b+a\,{\mathrm {e}}^x\right )\,\sqrt {a-b}}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2}-\frac {\ln \left (\frac {2\,\sqrt {a+b}\,\left (b+a\,{\mathrm {e}}^x\right )\,\sqrt {a-b}}{b^3}-\frac {2\,{\mathrm {e}}^x\,\left (a^2-b^2\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2} \]
[In]
[Out]