Optimal. Leaf size=108 \[ \frac {b \coth (x) \text {csch}(x)}{2 a^2}-\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 {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 {\coth (x) \text {csch}^2(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 108, normalized size of antiderivative = 1.00, 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 206
Rule 618
Rule 2660
Rule 2725
Rule 3001
Rule 3055
Rule 3770
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.43, size = 176, normalized size = 1.63 \[ \frac {-\frac {1}{2} a^3 \sinh (x) \text {csch}^4\left (\frac {x}{2}\right )+8 a^3 \sinh ^4\left (\frac {x}{2}\right ) \text {csch}^3(x)-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 )}{24 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.02, size = 1303, normalized size = 12.06 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.46, size = 194, normalized size = 1.80 \[ \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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 232, normalized size = 2.15 \[ -\frac {\tanh ^{3}\left (\frac {x}{2}\right )}{24 a}-\frac {b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{8 a^{2}}-\frac {5 \tanh \left (\frac {x}{2}\right )}{8 a}-\frac {b^{2} \tanh \left (\frac {x}{2}\right )}{2 a^{3}}+\frac {2 \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}+\frac {4 b^{2} \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{2} \sqrt {a^{2}+b^{2}}}+\frac {2 b^{4} \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{4} \sqrt {a^{2}+b^{2}}}-\frac {1}{24 a \tanh \left (\frac {x}{2}\right )^{3}}-\frac {5}{8 a \tanh \left (\frac {x}{2}\right )}-\frac {b^{2}}{2 a^{3} \tanh \left (\frac {x}{2}\right )}+\frac {b}{8 a^{2} \tanh \left (\frac {x}{2}\right )^{2}}-\frac {3 b \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2 a^{2}}-\frac {b^{3} \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 212, normalized size = 1.96 \[ -\frac {3 \, a b e^{\left (-x\right )} - 3 \, a b e^{\left (-5 \, x\right )} - 8 \, a^{2} - 6 \, b^{2} + 12 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, x\right )} - 6 \, {\left (2 \, a^{2} + b^{2}\right )} e^{\left (-4 \, x\right )}}{3 \, {\left (3 \, a^{3} e^{\left (-2 \, x\right )} - 3 \, a^{3} e^{\left (-4 \, x\right )} + a^{3} e^{\left (-6 \, x\right )} - a^{3}\right )}} + \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, a^{4}} - \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, a^{4}} + \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.41, size = 778, normalized size = 7.20 \[ \frac {\ln \left (-\frac {8\,\left (-30\,{\mathrm {e}}^x\,a^9+18\,a^8\,b-101\,{\mathrm {e}}^x\,a^7\,b^2+60\,a^6\,b^3-126\,{\mathrm {e}}^x\,a^5\,b^4+74\,a^4\,b^5-69\,{\mathrm {e}}^x\,a^3\,b^6+40\,a^2\,b^7-14\,{\mathrm {e}}^x\,a\,b^8+8\,b^9\right )}{a^9\,b^3}-\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {8\,\left (4\,a^8-36\,{\mathrm {e}}^x\,a^7\,b+34\,a^6\,b^2-75\,{\mathrm {e}}^x\,a^5\,b^3+57\,a^4\,b^4-52\,{\mathrm {e}}^x\,a^3\,b^5+36\,a^2\,b^6-12\,{\mathrm {e}}^x\,a\,b^7+8\,b^8\right )}{a^6\,b^4}-\frac {\left (\frac {16\,\left (-8\,{\mathrm {e}}^x\,a^5+4\,a^4\,b-15\,{\mathrm {e}}^x\,a^3\,b^2+8\,a^2\,b^3-7\,{\mathrm {e}}^x\,a\,b^4+4\,b^5\right )}{a\,b^5}+\frac {32\,\sqrt {{\left (a^2+b^2\right )}^3}\,\left (-4\,{\mathrm {e}}^x\,a^5+3\,a^4\,b-3\,{\mathrm {e}}^x\,a^3\,b^2+2\,a^2\,b^3\right )}{a^4\,b^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}\right )}{a^4}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}-\frac {\frac {2\,\left (2\,a^2+b^2\right )}{a^3}-\frac {b\,{\mathrm {e}}^x}{a^2}}{{\mathrm {e}}^{2\,x}-1}-\frac {\frac {4}{a}-\frac {2\,b\,{\mathrm {e}}^x}{a^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {\ln \left (\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {8\,\left (4\,a^8-36\,{\mathrm {e}}^x\,a^7\,b+34\,a^6\,b^2-75\,{\mathrm {e}}^x\,a^5\,b^3+57\,a^4\,b^4-52\,{\mathrm {e}}^x\,a^3\,b^5+36\,a^2\,b^6-12\,{\mathrm {e}}^x\,a\,b^7+8\,b^8\right )}{a^6\,b^4}+\frac {\left (\frac {16\,\left (-8\,{\mathrm {e}}^x\,a^5+4\,a^4\,b-15\,{\mathrm {e}}^x\,a^3\,b^2+8\,a^2\,b^3-7\,{\mathrm {e}}^x\,a\,b^4+4\,b^5\right )}{a\,b^5}-\frac {32\,\sqrt {{\left (a^2+b^2\right )}^3}\,\left (-4\,{\mathrm {e}}^x\,a^5+3\,a^4\,b-3\,{\mathrm {e}}^x\,a^3\,b^2+2\,a^2\,b^3\right )}{a^4\,b^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}\right )}{a^4}-\frac {8\,\left (-30\,{\mathrm {e}}^x\,a^9+18\,a^8\,b-101\,{\mathrm {e}}^x\,a^7\,b^2+60\,a^6\,b^3-126\,{\mathrm {e}}^x\,a^5\,b^4+74\,a^4\,b^5-69\,{\mathrm {e}}^x\,a^3\,b^6+40\,a^2\,b^7-14\,{\mathrm {e}}^x\,a\,b^8+8\,b^9\right )}{a^9\,b^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}-\frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1\right )}-\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (3\,a^2\,b+2\,b^3\right )}{2\,a^4}+\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (3\,a^2\,b+2\,b^3\right )}{2\,a^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\coth ^{4}{\relax (x )}}{a + b \sinh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________