Integrand size = 21, antiderivative size = 73 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d 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 {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}+\frac {\sinh (c+d x)}{b d} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 73, 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.190, Rules used = {2774, 2814, 2738, 211} \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}-\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d} \]
[In]
[Out]
Rule 211
Rule 2738
Rule 2774
Rule 2814
Rubi steps \begin{align*} \text {integral}& = \frac {\sinh (c+d x)}{b d}+\frac {\int \frac {-b-a \cosh (c+d x)}{a+b \cosh (c+d x)} \, dx}{b} \\ & = -\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d}-\left (1-\frac {a^2}{b^2}\right ) \int \frac {1}{a+b \cosh (c+d x)} \, dx \\ & = -\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d}+\frac {\left (2 i \left (1-\frac {a^2}{b^2}\right )\right ) \text {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d} \\ & = -\frac {a x}{b^2}+\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}+\frac {\sinh (c+d x)}{b d} \\ \end{align*}
Time = 0.30 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.95 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\frac {-a (c+d x)+2 \sqrt {-a^2+b^2} \arctan \left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )+b \sinh (c+d x)}{b^2 d} \]
[In]
[Out]
Time = 0.73 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.77
method | result | size |
derivativedivides | \(\frac {-\frac {1}{b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{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 {d x}{2}+\frac {c}{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 (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}}{d}\) | \(129\) |
default | \(\frac {-\frac {1}{b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{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 {d x}{2}+\frac {c}{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 (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}}{d}\) | \(129\) |
risch | \(-\frac {a x}{b^{2}}+\frac {{\mathrm e}^{d x +c}}{2 d b}-\frac {{\mathrm e}^{-d x -c}}{2 d b}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{d x +c}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}{d \,b^{2}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{d x +c}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right )}{d \,b^{2}}\) | \(130\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (64) = 128\).
Time = 0.27 (sec) , antiderivative size = 415, normalized size of antiderivative = 5.68 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\left [-\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) + b}\right ) + 2 \, {\left (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}, -\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} + 4 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{a^{2} - b^{2}}\right ) + 2 \, {\left (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1122 vs. \(2 (61) = 122\).
Time = 67.78 (sec) , antiderivative size = 1122, normalized size of antiderivative = 15.37 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.22 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=-\frac {\frac {2 \, {\left (d x + c\right )} a}{b^{2}} - \frac {e^{\left (d x + c\right )}}{b} + \frac {e^{\left (-d x - c\right )}}{b} - \frac {4 \, {\left (a^{2} - b^{2}\right )} \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} b^{2}}}{2 \, d} \]
[In]
[Out]
Time = 1.90 (sec) , antiderivative size = 176, normalized size of antiderivative = 2.41 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\frac {{\mathrm {e}}^{c+d\,x}}{2\,b\,d}-\frac {{\mathrm {e}}^{-c-d\,x}}{2\,b\,d}-\frac {a\,x}{b^2}+\frac {\ln \left (-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}-\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d}-\frac {\ln \left (\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d} \]
[In]
[Out]