Optimal. Leaf size=183 \[ \frac {2 \left (a^2+b^2\right )^{5/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^5}+\frac {a \left (a^2+3 b^2\right ) \coth (x)}{b^4}+\frac {\left (a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}-\frac {\left (a^2+3 b^2\right ) \coth (x) \text {csch}(x)}{2 b^3}-\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\cosh (x))}{b^5}+\frac {a \coth ^3(x)}{3 b^2}-\frac {a \coth (x)}{b^2}+\frac {x}{a}-\frac {3 \tanh ^{-1}(\cosh (x))}{8 b}-\frac {\coth (x) \text {csch}^3(x)}{4 b}+\frac {3 \coth (x) \text {csch}(x)}{8 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 9, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.692, Rules used = {3898, 2897, 3770, 3767, 8, 3768, 2660, 618, 204} \[ \frac {2 \left (a^2+b^2\right )^{5/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^5}+\frac {a \left (a^2+3 b^2\right ) \coth (x)}{b^4}+\frac {\left (a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}-\frac {\left (3 a^2 b^2+a^4+3 b^4\right ) \tanh ^{-1}(\cosh (x))}{b^5}-\frac {\left (a^2+3 b^2\right ) \coth (x) \text {csch}(x)}{2 b^3}+\frac {a \coth ^3(x)}{3 b^2}-\frac {a \coth (x)}{b^2}+\frac {x}{a}-\frac {3 \tanh ^{-1}(\cosh (x))}{8 b}-\frac {\coth (x) \text {csch}^3(x)}{4 b}+\frac {3 \coth (x) \text {csch}(x)}{8 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 204
Rule 618
Rule 2660
Rule 2897
Rule 3767
Rule 3768
Rule 3770
Rule 3898
Rubi steps
\begin {align*} \int \frac {\coth ^6(x)}{a+b \text {csch}(x)} \, dx &=i \int \frac {\cosh (x) \coth ^5(x)}{i b+i a \sinh (x)} \, dx\\ &=-\int \left (-\frac {1}{a}-\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \text {csch}(x)}{b^5}-\frac {a \left (-a^2-3 b^2\right ) \text {csch}^2(x)}{b^4}-\frac {\left (a^2+3 b^2\right ) \text {csch}^3(x)}{b^3}+\frac {a \text {csch}^4(x)}{b^2}-\frac {\text {csch}^5(x)}{b}+\frac {i \left (a^2+b^2\right )^3}{a b^5 (i b+i a \sinh (x))}\right ) \, dx\\ &=\frac {x}{a}-\frac {a \int \text {csch}^4(x) \, dx}{b^2}+\frac {\int \text {csch}^5(x) \, dx}{b}-\frac {\left (i \left (a^2+b^2\right )^3\right ) \int \frac {1}{i b+i a \sinh (x)} \, dx}{a b^5}-\frac {\left (a \left (a^2+3 b^2\right )\right ) \int \text {csch}^2(x) \, dx}{b^4}+\frac {\left (a^2+3 b^2\right ) \int \text {csch}^3(x) \, dx}{b^3}+\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \int \text {csch}(x) \, dx}{b^5}\\ &=\frac {x}{a}-\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\cosh (x))}{b^5}-\frac {\left (a^2+3 b^2\right ) \coth (x) \text {csch}(x)}{2 b^3}-\frac {\coth (x) \text {csch}^3(x)}{4 b}-\frac {(i a) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \coth (x)\right )}{b^2}-\frac {3 \int \text {csch}^3(x) \, dx}{4 b}-\frac {\left (2 i \left (a^2+b^2\right )^3\right ) \operatorname {Subst}\left (\int \frac {1}{i b+2 i a x-i b x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a b^5}+\frac {\left (i a \left (a^2+3 b^2\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-i \coth (x))}{b^4}-\frac {\left (a^2+3 b^2\right ) \int \text {csch}(x) \, dx}{2 b^3}\\ &=\frac {x}{a}+\frac {\left (a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}-\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\cosh (x))}{b^5}-\frac {a \coth (x)}{b^2}+\frac {a \left (a^2+3 b^2\right ) \coth (x)}{b^4}+\frac {a \coth ^3(x)}{3 b^2}+\frac {3 \coth (x) \text {csch}(x)}{8 b}-\frac {\left (a^2+3 b^2\right ) \coth (x) \text {csch}(x)}{2 b^3}-\frac {\coth (x) \text {csch}^3(x)}{4 b}+\frac {3 \int \text {csch}(x) \, dx}{8 b}+\frac {\left (4 i \left (a^2+b^2\right )^3\right ) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,2 i a-2 i b \tanh \left (\frac {x}{2}\right )\right )}{a b^5}\\ &=\frac {x}{a}-\frac {3 \tanh ^{-1}(\cosh (x))}{8 b}+\frac {\left (a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}-\frac {\left (a^4+3 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\cosh (x))}{b^5}+\frac {2 \left (a^2+b^2\right )^{5/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^5}-\frac {a \coth (x)}{b^2}+\frac {a \left (a^2+3 b^2\right ) \coth (x)}{b^4}+\frac {a \coth ^3(x)}{3 b^2}+\frac {3 \coth (x) \text {csch}(x)}{8 b}-\frac {\left (a^2+3 b^2\right ) \coth (x) \text {csch}(x)}{2 b^3}-\frac {\coth (x) \text {csch}^3(x)}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.58, size = 269, normalized size = 1.47 \[ \frac {\text {csch}(x) (a \sinh (x)+b) \left (4 a^2 b^3 \sinh (x) \text {csch}^4\left (\frac {x}{2}\right )-64 a^2 b^3 \sinh ^4\left (\frac {x}{2}\right ) \text {csch}^3(x)+32 a^2 b \left (3 a^2+7 b^2\right ) \tanh \left (\frac {x}{2}\right )+32 a^2 b \left (3 a^2+7 b^2\right ) \coth \left (\frac {x}{2}\right )-6 a b^2 \left (4 a^2+9 b^2\right ) \text {csch}^2\left (\frac {x}{2}\right )-6 a b^2 \left (4 a^2+9 b^2\right ) \text {sech}^2\left (\frac {x}{2}\right )+384 \left (-a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )+24 a \left (8 a^4+20 a^2 b^2+15 b^4\right ) \log \left (\tanh \left (\frac {x}{2}\right )\right )-3 a b^4 \text {csch}^4\left (\frac {x}{2}\right )+3 a b^4 \text {sech}^4\left (\frac {x}{2}\right )+192 b^5 x\right )}{192 a b^5 (a+b \text {csch}(x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.18, size = 3160, normalized size = 17.27 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 305, normalized size = 1.67 \[ \frac {x}{a} - \frac {{\left (8 \, a^{4} + 20 \, a^{2} b^{2} + 15 \, b^{4}\right )} \log \left (e^{x} + 1\right )}{8 \, b^{5}} + \frac {{\left (8 \, a^{4} + 20 \, a^{2} b^{2} + 15 \, b^{4}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{8 \, b^{5}} - \frac {{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \log \left (\frac {{\left | 2 \, a e^{x} + 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a e^{x} + 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a b^{5}} - \frac {12 \, a^{2} b e^{\left (7 \, x\right )} + 27 \, b^{3} e^{\left (7 \, x\right )} - 24 \, a^{3} e^{\left (6 \, x\right )} - 72 \, a b^{2} e^{\left (6 \, x\right )} - 12 \, a^{2} b e^{\left (5 \, x\right )} - 3 \, b^{3} e^{\left (5 \, x\right )} + 72 \, a^{3} e^{\left (4 \, x\right )} + 168 \, a b^{2} e^{\left (4 \, x\right )} - 12 \, a^{2} b e^{\left (3 \, x\right )} - 3 \, b^{3} e^{\left (3 \, x\right )} - 72 \, a^{3} e^{\left (2 \, x\right )} - 152 \, a b^{2} e^{\left (2 \, x\right )} + 12 \, a^{2} b e^{x} + 27 \, b^{3} e^{x} + 24 \, a^{3} + 56 \, a b^{2}}{12 \, b^{4} {\left (e^{\left (2 \, x\right )} - 1\right )}^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.17, size = 360, normalized size = 1.97 \[ \frac {\tanh ^{4}\left (\frac {x}{2}\right )}{64 b}+\frac {a \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{24 b^{2}}+\frac {a^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{8 b^{3}}+\frac {\tanh ^{2}\left (\frac {x}{2}\right )}{4 b}+\frac {a^{3} \tanh \left (\frac {x}{2}\right )}{2 b^{4}}+\frac {9 a \tanh \left (\frac {x}{2}\right )}{8 b^{2}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {2 a^{5} \arctanh \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{5} \sqrt {a^{2}+b^{2}}}-\frac {6 a^{3} \arctanh \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{3} \sqrt {a^{2}+b^{2}}}-\frac {6 a \arctanh \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{b \sqrt {a^{2}+b^{2}}}-\frac {2 b \arctanh \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \sqrt {a^{2}+b^{2}}}-\frac {1}{64 b \tanh \left (\frac {x}{2}\right )^{4}}-\frac {a^{2}}{8 b^{3} \tanh \left (\frac {x}{2}\right )^{2}}-\frac {1}{4 b \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) a^{4}}{b^{5}}+\frac {5 \ln \left (\tanh \left (\frac {x}{2}\right )\right ) a^{2}}{2 b^{3}}+\frac {15 \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{8 b}+\frac {a}{24 b^{2} \tanh \left (\frac {x}{2}\right )^{3}}+\frac {a^{3}}{2 b^{4} \tanh \left (\frac {x}{2}\right )}+\frac {9 a}{8 b^{2} \tanh \left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 330, normalized size = 1.80 \[ -\frac {24 \, a^{3} + 56 \, a b^{2} - 3 \, {\left (4 \, a^{2} b + 9 \, b^{3}\right )} e^{\left (-x\right )} - 8 \, {\left (9 \, a^{3} + 19 \, a b^{2}\right )} e^{\left (-2 \, x\right )} + 3 \, {\left (4 \, a^{2} b + b^{3}\right )} e^{\left (-3 \, x\right )} + 24 \, {\left (3 \, a^{3} + 7 \, a b^{2}\right )} e^{\left (-4 \, x\right )} + 3 \, {\left (4 \, a^{2} b + b^{3}\right )} e^{\left (-5 \, x\right )} - 24 \, {\left (a^{3} + 3 \, a b^{2}\right )} e^{\left (-6 \, x\right )} - 3 \, {\left (4 \, a^{2} b + 9 \, b^{3}\right )} e^{\left (-7 \, x\right )}}{12 \, {\left (4 \, b^{4} e^{\left (-2 \, x\right )} - 6 \, b^{4} e^{\left (-4 \, x\right )} + 4 \, b^{4} e^{\left (-6 \, x\right )} - b^{4} e^{\left (-8 \, x\right )} - b^{4}\right )}} + \frac {x}{a} - \frac {{\left (8 \, a^{4} + 20 \, a^{2} b^{2} + 15 \, b^{4}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{8 \, b^{5}} + \frac {{\left (8 \, a^{4} + 20 \, a^{2} b^{2} + 15 \, b^{4}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{8 \, b^{5}} - \frac {{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \log \left (\frac {a e^{\left (-x\right )} - b - \sqrt {a^{2} + b^{2}}}{a e^{\left (-x\right )} - b + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a b^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.90, size = 543, normalized size = 2.97 \[ \frac {\frac {8\,a}{3\,b^2}-\frac {6\,{\mathrm {e}}^x}{b}}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1}-\frac {\frac {{\mathrm {e}}^x\,\left (4\,a^2+9\,b^2\right )}{4\,b^3}-\frac {2\,\left (a^4+3\,a^2\,b^2\right )}{a\,b^4}}{{\mathrm {e}}^{2\,x}-1}+\frac {\frac {4\,a}{b^2}-\frac {{\mathrm {e}}^x\,\left (4\,a^2+13\,b^2\right )}{2\,b^3}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}+\frac {x}{a}+\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (8\,a^4+20\,a^2\,b^2+15\,b^4\right )}{8\,b^5}-\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (8\,a^4+20\,a^2\,b^2+15\,b^4\right )}{8\,b^5}-\frac {4\,{\mathrm {e}}^x}{b\,\left (6\,{\mathrm {e}}^{4\,x}-4\,{\mathrm {e}}^{2\,x}-4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1\right )}+\frac {\ln \left (a^3\,\sqrt {{\left (a^2+b^2\right )}^5}-2\,a^7\,b-2\,a\,b^7-6\,a^3\,b^5-6\,a^5\,b^3+a^8\,{\mathrm {e}}^x+4\,b^8\,{\mathrm {e}}^x+2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^5}-4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^5}+13\,a^2\,b^6\,{\mathrm {e}}^x+15\,a^4\,b^4\,{\mathrm {e}}^x+7\,a^6\,b^2\,{\mathrm {e}}^x-3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^5}}{a\,b^5}-\frac {\ln \left (a^8\,{\mathrm {e}}^x-2\,a^7\,b-a^3\,\sqrt {{\left (a^2+b^2\right )}^5}-6\,a^3\,b^5-6\,a^5\,b^3-2\,a\,b^7+4\,b^8\,{\mathrm {e}}^x-2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^5}+4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^5}+13\,a^2\,b^6\,{\mathrm {e}}^x+15\,a^4\,b^4\,{\mathrm {e}}^x+7\,a^6\,b^2\,{\mathrm {e}}^x+3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^5}}{a\,b^5} \]
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 ^{6}{\relax (x )}}{a + b \operatorname {csch}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________