Optimal. Leaf size=52 \[ \frac{x}{2 b}-\frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh (x)}{\sqrt{a+b}}\right )}{2 b \sqrt{a-b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.134041, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {1130, 208} \[ \frac{x}{2 b}-\frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh (x)}{\sqrt{a+b}}\right )}{2 b \sqrt{a-b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1130
Rule 208
Rubi steps
\begin{align*} \int \frac{\sinh ^2(x)}{a+b \cosh (2 x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{-a-b+2 a x^2+(-a+b) x^4} \, dx,x,\tanh (x)\right )\\ &=\frac{1}{2} \left (-1+\frac{a}{b}\right ) \operatorname{Subst}\left (\int \frac{1}{a-b+(-a+b) x^2} \, dx,x,\tanh (x)\right )-\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{a+b+(-a+b) x^2} \, dx,x,\tanh (x)\right )}{2 b}\\ &=\frac{x}{2 b}-\frac{\sqrt{a+b} \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh (x)}{\sqrt{a+b}}\right )}{2 \sqrt{a-b} b}\\ \end{align*}
Mathematica [A] time = 0.0774598, size = 48, normalized size = 0.92 \[ \frac{\frac{(a+b) \tan ^{-1}\left (\frac{(a-b) \tanh (x)}{\sqrt{b^2-a^2}}\right )}{\sqrt{b^2-a^2}}+x}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.034, size = 92, normalized size = 1.8 \begin{align*}{\frac{\ln \left ( 1+\tanh \left ( x \right ) \right ) }{4\,b}}-{\frac{a}{2\,b}{\it Artanh} \left ({ \left ( a-b \right ) \tanh \left ( x \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}}-{\frac{1}{2}{\it Artanh} \left ({ \left ( a-b \right ) \tanh \left ( x \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}}-{\frac{\ln \left ( \tanh \left ( x \right ) -1 \right ) }{4\,b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.96352, size = 821, normalized size = 15.79 \begin{align*} \left [\frac{\sqrt{\frac{a + b}{a - b}} \log \left (\frac{b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, a b \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b^{2} \cosh \left (x\right )^{2} + a b\right )} \sinh \left (x\right )^{2} + 2 \, a^{2} - b^{2} + 4 \,{\left (b^{2} \cosh \left (x\right )^{3} + a b \cosh \left (x\right )\right )} \sinh \left (x\right ) + 2 \,{\left ({\left (a b - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a b - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a b - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - a b\right )} \sqrt{\frac{a + b}{a - b}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b \cosh \left (x\right )^{2} + a\right )} \sinh \left (x\right )^{2} + 4 \,{\left (b \cosh \left (x\right )^{3} + a \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 2 \, x}{4 \, b}, -\frac{\sqrt{-\frac{a + b}{a - b}} \arctan \left (\frac{{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + a\right )} \sqrt{-\frac{a + b}{a - b}}}{a + b}\right ) - x}{2 \, b}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sinh ^{2}{\left (x \right )}}{a + b \cosh{\left (2 x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14763, size = 63, normalized size = 1.21 \begin{align*} -\frac{{\left (a + b\right )} \arctan \left (\frac{b e^{\left (2 \, x\right )} + a}{\sqrt{-a^{2} + b^{2}}}\right )}{2 \, \sqrt{-a^{2} + b^{2}} b} + \frac{x}{2 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]