Optimal. Leaf size=108 \[ -\frac{2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^4}-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.413013, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {2725, 3055, 3001, 3770, 2660, 618, 206} \[ -\frac{2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^4}-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2725
Rule 3055
Rule 3001
Rule 3770
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{\coth ^4(x)}{a+b \sinh (x)} \, dx &=\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}+\frac{\int \frac{\text{csch}^2(x) \left (2 \left (4 a^2+3 b^2\right )-a b \sinh (x)+3 \left (2 a^2+b^2\right ) \sinh ^2(x)\right )}{a+b \sinh (x)} \, dx}{6 a^2}\\ &=-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}+\frac{i \int \frac{\text{csch}(x) \left (3 i b \left (3 a^2+2 b^2\right )-3 i a \left (2 a^2+b^2\right ) \sinh (x)\right )}{a+b \sinh (x)} \, dx}{6 a^3}\\ &=-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}+\frac{\left (a^2+b^2\right )^2 \int \frac{1}{a+b \sinh (x)} \, dx}{a^4}-\frac{\left (b \left (3 a^2+2 b^2\right )\right ) \int \text{csch}(x) \, dx}{2 a^4}\\ &=\frac{b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}+\frac{\left (2 \left (a^2+b^2\right )^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{a^4}\\ &=\frac{b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}-\frac{\left (4 \left (a^2+b^2\right )^2\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^4}\\ &=\frac{b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac{2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{a^4}-\frac{\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac{b \coth (x) \text{csch}(x)}{2 a^2}-\frac{\coth (x) \text{csch}^2(x)}{3 a}\\ \end{align*}
Mathematica [A] time = 0.422632, size = 176, normalized size = 1.63 \[ \frac{-4 a \left (4 a^2+3 b^2\right ) \tanh \left (\frac{x}{2}\right )-4 a \left (4 a^2+3 b^2\right ) \coth \left (\frac{x}{2}\right )-12 b \left (3 a^2+2 b^2\right ) \log \left (\tanh \left (\frac{x}{2}\right )\right )+48 \left (-a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )+3 a^2 b \text{csch}^2\left (\frac{x}{2}\right )+3 a^2 b \text{sech}^2\left (\frac{x}{2}\right )+8 a^3 \sinh ^4\left (\frac{x}{2}\right ) \text{csch}^3(x)-\frac{1}{2} a^3 \sinh (x) \text{csch}^4\left (\frac{x}{2}\right )}{24 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 232, normalized size = 2.2 \begin{align*} -{\frac{1}{24\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3}}-{\frac{b}{8\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}}-{\frac{5}{8\,a}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{{b}^{2}}{2\,{a}^{3}}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{1}{24\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-3}}-{\frac{5}{8\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{{b}^{2}}{2\,{a}^{3}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{b}{8\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-2}}-{\frac{3\,b}{2\,{a}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }-{\frac{{b}^{3}}{{a}^{4}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+2\,{\frac{1}{\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}^{2}\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 ) }+2\,{\frac{{b}^{4}}{{a}^{4}\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 = 3.47033, size = 3380, normalized size = 31.3 \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 ^{4}{\left (x \right )}}{a + b \sinh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13321, size = 262, normalized size = 2.43 \begin{align*} \frac{{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{x} + 1\right )}{2 \, a^{4}} - \frac{{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, a^{4}} + \frac{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\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^{4}} + \frac{3 \, a b e^{\left (5 \, x\right )} - 12 \, a^{2} e^{\left (4 \, x\right )} - 6 \, b^{2} e^{\left (4 \, x\right )} + 12 \, a^{2} e^{\left (2 \, x\right )} + 12 \, b^{2} e^{\left (2 \, x\right )} - 3 \, a b e^{x} - 8 \, a^{2} - 6 \, b^{2}}{3 \, a^{3}{\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]