Optimal. Leaf size=80 \[ -\frac{2 \left (a^2+2 b^2\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^3 \sqrt{a^2+b^2}}+\frac{2 b \tanh ^{-1}(\cosh (x))}{a^3}-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.402169, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {2723, 3056, 3001, 3770, 2660, 618, 206} \[ -\frac{2 \left (a^2+2 b^2\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^3 \sqrt{a^2+b^2}}+\frac{2 b \tanh ^{-1}(\cosh (x))}{a^3}-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2723
Rule 3056
Rule 3001
Rule 3770
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{\coth ^2(x)}{(a+b \sinh (x))^2} \, dx &=\int \frac{\text{csch}^2(x) \left (1+\sinh ^2(x)\right )}{(a+b \sinh (x))^2} \, dx\\ &=\frac{\coth (x)}{a (a+b \sinh (x))}+\frac{\int \frac{\text{csch}^2(x) \left (2 \left (a^2+b^2\right )+\left (a^2+b^2\right ) \sinh ^2(x)\right )}{a+b \sinh (x)} \, dx}{a \left (a^2+b^2\right )}\\ &=-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))}+\frac{i \int \frac{\text{csch}(x) \left (2 i b \left (a^2+b^2\right )-i a \left (a^2+b^2\right ) \sinh (x)\right )}{a+b \sinh (x)} \, dx}{a^2 \left (a^2+b^2\right )}\\ &=-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))}-\frac{(2 b) \int \text{csch}(x) \, dx}{a^3}+\frac{\left (a^2+2 b^2\right ) \int \frac{1}{a+b \sinh (x)} \, dx}{a^3}\\ &=\frac{2 b \tanh ^{-1}(\cosh (x))}{a^3}-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))}+\frac{\left (2 \left (a^2+2 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{a^3}\\ &=\frac{2 b \tanh ^{-1}(\cosh (x))}{a^3}-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))}-\frac{\left (4 \left (a^2+2 b^2\right )\right ) \operatorname{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 )}{a^3}\\ &=\frac{2 b \tanh ^{-1}(\cosh (x))}{a^3}-\frac{2 \left (a^2+2 b^2\right ) \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^3 \sqrt{a^2+b^2}}-\frac{2 \coth (x)}{a^2}+\frac{\coth (x)}{a (a+b \sinh (x))}\\ \end{align*}
Mathematica [A] time = 0.477892, size = 102, normalized size = 1.27 \[ -\frac{-\frac{4 \left (a^2+2 b^2\right ) \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )}{\sqrt{-a^2-b^2}}+\frac{2 a b \cosh (x)}{a+b \sinh (x)}+a \tanh \left (\frac{x}{2}\right )+a \coth \left (\frac{x}{2}\right )+4 b \log \left (\tanh \left (\frac{x}{2}\right )\right )}{2 a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.041, size = 170, normalized size = 2.1 \begin{align*} -{\frac{1}{2\,{a}^{2}}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{1}{2\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-2\,{\frac{b\ln \left ( \tanh \left ( x/2 \right ) \right ) }{{a}^{3}}}+2\,{\frac{{b}^{2}\tanh \left ( x/2 \right ) }{{a}^{3} \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a \right ) }}+2\,{\frac{b}{{a}^{2} \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a \right ) }}+2\,{\frac{1}{a\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }+4\,{\frac{{b}^{2}}{{a}^{3}\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) } \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 [B] time = 2.74811, size = 3102, normalized size = 38.78 \begin{align*} \text{result too large to display} \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{\coth ^{2}{\left (x \right )}}{\left (a + b \sinh{\left (x \right )}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18626, size = 200, normalized size = 2.5 \begin{align*} \frac{2 \, b \log \left (e^{x} + 1\right )}{a^{3}} - \frac{2 \, b \log \left ({\left | e^{x} - 1 \right |}\right )}{a^{3}} + \frac{{\left (a^{2} + 2 \, b^{2}\right )} \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}} a^{3}} + \frac{2 \,{\left (a e^{\left (3 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} - 3 \, a e^{x} + 2 \, b\right )}}{{\left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (3 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right )} a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]