Optimal. Leaf size=88 \[ \frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^3}-\frac {\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {a \coth (x)}{b^2}+\frac {x}{a}-\frac {\coth (x) \text {csch}(x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 88, 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 = {3898, 2893, 3057, 2660, 618, 204, 3770} \[ \frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^3}-\frac {\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {a \coth (x)}{b^2}+\frac {x}{a}-\frac {\coth (x) \text {csch}(x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 2660
Rule 2893
Rule 3057
Rule 3770
Rule 3898
Rubi steps
\begin {align*} \int \frac {\coth ^4(x)}{a+b \text {csch}(x)} \, dx &=i \int \frac {\cosh (x) \coth ^3(x)}{i b+i a \sinh (x)} \, dx\\ &=\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}-\frac {i \int \frac {\text {csch}(x) \left (-2 a^2-3 b^2+a b \sinh (x)-2 b^2 \sinh ^2(x)\right )}{i b+i a \sinh (x)} \, dx}{2 b^2}\\ &=\frac {x}{a}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}-\frac {\left (i \left (a^2+b^2\right )^2\right ) \int \frac {1}{i b+i a \sinh (x)} \, dx}{a b^3}+\frac {\left (2 a^2+3 b^2\right ) \int \text {csch}(x) \, dx}{2 b^3}\\ &=\frac {x}{a}-\frac {\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}-\frac {\left (2 i \left (a^2+b^2\right )^2\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^3}\\ &=\frac {x}{a}-\frac {\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}+\frac {\left (4 i \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 i a-2 i b \tanh \left (\frac {x}{2}\right )\right )}{a b^3}\\ &=\frac {x}{a}-\frac {\left (2 a^2+3 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a b^3}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.59, size = 151, normalized size = 1.72 \[ \frac {\text {csch}(x) (a \sinh (x)+b) \left (4 a \left (2 a^2+3 b^2\right ) \log \left (\tanh \left (\frac {x}{2}\right )\right )-16 \left (-a^2-b^2\right )^{3/2} \tan ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )+4 a^2 b \tanh \left (\frac {x}{2}\right )+4 a^2 b \coth \left (\frac {x}{2}\right )-a b^2 \text {csch}^2\left (\frac {x}{2}\right )-a b^2 \text {sech}^2\left (\frac {x}{2}\right )+8 b^3 x\right )}{8 a b^3 (a+b \text {csch}(x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.72, size = 831, normalized size = 9.44 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 161, normalized size = 1.83 \[ \frac {x}{a} - \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{x} + 1\right )}{2 \, b^{3}} + \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, b^{3}} - \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\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^{3}} - \frac {b e^{\left (3 \, x\right )} - 2 \, a e^{\left (2 \, x\right )} + b e^{x} + 2 \, a}{b^{2} {\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.15, size = 207, normalized size = 2.35 \[ \frac {\tanh ^{2}\left (\frac {x}{2}\right )}{8 b}+\frac {a \tanh \left (\frac {x}{2}\right )}{2 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^{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 {4 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}{8 b \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) a^{2}}{b^{3}}+\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2 b}+\frac {a}{2 b^{2} \tanh \left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 178, normalized size = 2.02 \[ \frac {b e^{\left (-x\right )} + 2 \, a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )} - 2 \, a}{2 \, b^{2} e^{\left (-2 \, x\right )} - b^{2} e^{\left (-4 \, x\right )} - b^{2}} + \frac {x}{a} - \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, b^{3}} + \frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, b^{3}} - \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\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^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.62, size = 378, normalized size = 4.30 \[ \frac {\frac {2\,a}{b^2}-\frac {{\mathrm {e}}^x}{b}}{{\mathrm {e}}^{2\,x}-1}+\frac {x}{a}+\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (2\,a^2+3\,b^2\right )}{2\,b^3}-\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (2\,a^2+3\,b^2\right )}{2\,b^3}-\frac {2\,{\mathrm {e}}^x}{b\,\left ({\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1\right )}+\frac {\ln \left (a^3\,\sqrt {{\left (a^2+b^2\right )}^3}-2\,a^5\,b-2\,a\,b^5-4\,a^3\,b^3+a^6\,{\mathrm {e}}^x+4\,b^6\,{\mathrm {e}}^x+2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^3}-4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}+9\,a^2\,b^4\,{\mathrm {e}}^x+6\,a^4\,b^2\,{\mathrm {e}}^x-3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a\,b^3}-\frac {\ln \left (a^6\,{\mathrm {e}}^x-2\,a^5\,b-a^3\,\sqrt {{\left (a^2+b^2\right )}^3}-4\,a^3\,b^3-2\,a\,b^5+4\,b^6\,{\mathrm {e}}^x-2\,a\,b^2\,\sqrt {{\left (a^2+b^2\right )}^3}+4\,b^3\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}+9\,a^2\,b^4\,{\mathrm {e}}^x+6\,a^4\,b^2\,{\mathrm {e}}^x+3\,a^2\,b\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a\,b^3} \]
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 \operatorname {csch}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________