Optimal. Leaf size=83 \[ -\frac {\left (2 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {2 a^3 \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^3 \sqrt {a^2+b^2}}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {3851, 4082, 3998, 3770, 3831, 2660, 618, 206} \[ \frac {2 a^3 \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^3 \sqrt {a^2+b^2}}-\frac {\left (2 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 2660
Rule 3770
Rule 3831
Rule 3851
Rule 3998
Rule 4082
Rubi steps
\begin {align*} \int \frac {\text {csch}^4(x)}{a+b \text {csch}(x)} \, dx &=-\frac {\coth (x) \text {csch}(x)}{2 b}-\frac {\int \frac {\text {csch}(x) \left (a+b \text {csch}(x)+2 a \text {csch}^2(x)\right )}{a+b \text {csch}(x)} \, dx}{2 b}\\ &=\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}+\frac {i \int \frac {\text {csch}(x) \left (i a b-i \left (2 a^2-b^2\right ) \text {csch}(x)\right )}{a+b \text {csch}(x)} \, dx}{2 b^2}\\ &=\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}-\frac {a^3 \int \frac {\text {csch}(x)}{a+b \text {csch}(x)} \, dx}{b^3}+\frac {\left (2 a^2-b^2\right ) \int \text {csch}(x) \, dx}{2 b^3}\\ &=-\frac {\left (2 a^2-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 {a^3 \int \frac {1}{1+\frac {a \sinh (x)}{b}} \, dx}{b^4}\\ &=-\frac {\left (2 a^2-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 a^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {2 a x}{b}-x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^4}\\ &=-\frac {\left (2 a^2-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 a^3\right ) \operatorname {Subst}\left (\int \frac {1}{4 \left (1+\frac {a^2}{b^2}\right )-x^2} \, dx,x,\frac {2 a}{b}-2 \tanh \left (\frac {x}{2}\right )\right )}{b^4}\\ &=-\frac {\left (2 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))}{2 b^3}+\frac {2 a^3 \tanh ^{-1}\left (\frac {b \left (\frac {a}{b}-\tanh \left (\frac {x}{2}\right )\right )}{\sqrt {a^2+b^2}}\right )}{b^3 \sqrt {a^2+b^2}}+\frac {a \coth (x)}{b^2}-\frac {\coth (x) \text {csch}(x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.48, size = 124, normalized size = 1.49 \[ -\frac {-8 a^2 \log \left (\tanh \left (\frac {x}{2}\right )\right )+\frac {16 a^3 \tan ^{-1}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}-4 a b \tanh \left (\frac {x}{2}\right )-4 a b \coth \left (\frac {x}{2}\right )+b^2 \text {csch}^2\left (\frac {x}{2}\right )+b^2 \text {sech}^2\left (\frac {x}{2}\right )+4 b^2 \log \left (\tanh \left (\frac {x}{2}\right )\right )}{8 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.53, size = 947, normalized size = 11.41 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 141, normalized size = 1.70 \[ -\frac {a^{3} \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}} b^{3}} - \frac {{\left (2 \, a^{2} - b^{2}\right )} \log \left (e^{x} + 1\right )}{2 \, b^{3}} + \frac {{\left (2 \, a^{2} - b^{2}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, 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 [A] time = 0.10, size = 108, normalized size = 1.30 \[ \frac {\tanh ^{2}\left (\frac {x}{2}\right )}{8 b}+\frac {a \tanh \left (\frac {x}{2}\right )}{2 b^{2}}-\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 {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 {\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.42, size = 158, normalized size = 1.90 \[ -\frac {a^{3} \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}} b^{3}} + \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 {{\left (2 \, a^{2} - b^{2}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, b^{3}} + \frac {{\left (2 \, a^{2} - b^{2}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.09, size = 617, normalized size = 7.43 \[ \frac {{\mathrm {e}}^x}{b-b\,{\mathrm {e}}^{2\,x}}-\frac {2\,{\mathrm {e}}^x}{b-2\,b\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{4\,x}}-\frac {\ln \left (24\,a^4+4\,b^4-20\,a^2\,b^2-24\,a^4\,{\mathrm {e}}^x-4\,b^4\,{\mathrm {e}}^x+20\,a^2\,b^2\,{\mathrm {e}}^x\right )}{2\,b}+\frac {\ln \left (24\,a^4+4\,b^4-20\,a^2\,b^2+24\,a^4\,{\mathrm {e}}^x+4\,b^4\,{\mathrm {e}}^x-20\,a^2\,b^2\,{\mathrm {e}}^x\right )}{2\,b}+\frac {2\,a}{b^2\,{\mathrm {e}}^{2\,x}-b^2}+\frac {a^2\,\ln \left (24\,a^4+4\,b^4-20\,a^2\,b^2-24\,a^4\,{\mathrm {e}}^x-4\,b^4\,{\mathrm {e}}^x+20\,a^2\,b^2\,{\mathrm {e}}^x\right )}{b^3}-\frac {a^2\,\ln \left (24\,a^4+4\,b^4-20\,a^2\,b^2+24\,a^4\,{\mathrm {e}}^x+4\,b^4\,{\mathrm {e}}^x-20\,a^2\,b^2\,{\mathrm {e}}^x\right )}{b^3}-\frac {a^3\,\ln \left (16\,a\,b^5-24\,a^5\,\sqrt {a^2+b^2}-48\,a^5\,b-32\,a^3\,b^3+24\,a^6\,{\mathrm {e}}^x-32\,b^6\,{\mathrm {e}}^x-40\,a^3\,b^2\,\sqrt {a^2+b^2}-32\,b^5\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}+56\,a^2\,b^4\,{\mathrm {e}}^x+112\,a^4\,b^2\,{\mathrm {e}}^x+16\,a\,b^4\,\sqrt {a^2+b^2}+72\,a^4\,b\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}+72\,a^2\,b^3\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\sqrt {a^2+b^2}}{a^2\,b^3+b^5}+\frac {a^3\,\ln \left (24\,a^5\,\sqrt {a^2+b^2}+16\,a\,b^5-48\,a^5\,b-32\,a^3\,b^3+24\,a^6\,{\mathrm {e}}^x-32\,b^6\,{\mathrm {e}}^x+40\,a^3\,b^2\,\sqrt {a^2+b^2}+32\,b^5\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}+56\,a^2\,b^4\,{\mathrm {e}}^x+112\,a^4\,b^2\,{\mathrm {e}}^x-16\,a\,b^4\,\sqrt {a^2+b^2}-72\,a^4\,b\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}-72\,a^2\,b^3\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\sqrt {a^2+b^2}}{a^2\,b^3+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 {\operatorname {csch}^{4}{\relax (x )}}{a + b \operatorname {csch}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________