Optimal. Leaf size=111 \[ -\frac {2 a^3 b \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2}}-\frac {\left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right ) \text {csch}(x)}{3 \left (a^2-b^2\right )^2}+\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3957, 2945, 12,
2738, 211} \begin {gather*} -\frac {2 a^3 b \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2}}+\frac {\text {csch}^3(x) (b-a \cosh (x))}{3 \left (a^2-b^2\right )}-\frac {\text {csch}(x) \left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right )}{3 \left (a^2-b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 2738
Rule 2945
Rule 3957
Rubi steps
\begin {align*} \int \frac {\text {csch}^4(x)}{a+b \text {sech}(x)} \, dx &=-\int \frac {\coth (x) \text {csch}^3(x)}{-b-a \cosh (x)} \, dx\\ &=\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )}-\frac {\int \frac {\left (a b-2 a^2 \cosh (x)\right ) \text {csch}^2(x)}{-b-a \cosh (x)} \, dx}{3 \left (a^2-b^2\right )}\\ &=-\frac {\left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right ) \text {csch}(x)}{3 \left (a^2-b^2\right )^2}+\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )}+\frac {\int \frac {3 a^3 b}{-b-a \cosh (x)} \, dx}{3 \left (a^2-b^2\right )^2}\\ &=-\frac {\left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right ) \text {csch}(x)}{3 \left (a^2-b^2\right )^2}+\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )}+\frac {\left (a^3 b\right ) \int \frac {1}{-b-a \cosh (x)} \, dx}{\left (a^2-b^2\right )^2}\\ &=-\frac {\left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right ) \text {csch}(x)}{3 \left (a^2-b^2\right )^2}+\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )}+\frac {\left (2 a^3 b\right ) \text {Subst}\left (\int \frac {1}{-a-b-(a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{\left (a^2-b^2\right )^2}\\ &=-\frac {2 a^3 b \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2}}-\frac {\left (3 a^2 b-a \left (2 a^2+b^2\right ) \cosh (x)\right ) \text {csch}(x)}{3 \left (a^2-b^2\right )^2}+\frac {(b-a \cosh (x)) \text {csch}^3(x)}{3 \left (a^2-b^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.40, size = 156, normalized size = 1.41 \begin {gather*} \frac {(b+a \cosh (x)) \text {sech}(x) \left (\frac {48 a^3 b \text {ArcTan}\left (\frac {(-a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {2 (4 a+b) \coth \left (\frac {x}{2}\right )}{(a+b)^2}+\frac {8 \text {csch}^3(x) \sinh ^4\left (\frac {x}{2}\right )}{a-b}-\frac {\text {csch}^4\left (\frac {x}{2}\right ) \sinh (x)}{2 (a+b)}+\frac {8 a \tanh \left (\frac {x}{2}\right )}{(a-b)^2}-\frac {2 b \tanh \left (\frac {x}{2}\right )}{(a-b)^2}\right )}{24 (a+b \text {sech}(x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.86, size = 127, normalized size = 1.14
method | result | size |
default | \(-\frac {\frac {a \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3}-\frac {b \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3}-3 a \tanh \left (\frac {x}{2}\right )+b \tanh \left (\frac {x}{2}\right )}{8 \left (a -b \right )^{2}}-\frac {2 a^{3} b \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a -b \right )^{2} \left (a +b \right )^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {1}{24 \left (a +b \right ) \tanh \left (\frac {x}{2}\right )^{3}}-\frac {-3 a -b}{8 \left (a +b \right )^{2} \tanh \left (\frac {x}{2}\right )}\) | \(127\) |
risch | \(-\frac {2 \left (3 a^{2} b \,{\mathrm e}^{5 x}-3 a \,b^{2} {\mathrm e}^{4 x}-10 a^{2} b \,{\mathrm e}^{3 x}+4 b^{3} {\mathrm e}^{3 x}+6 a^{3} {\mathrm e}^{2 x}+3 a^{2} b \,{\mathrm e}^{x}-2 a^{3}-a \,b^{2}\right )}{3 \left (a^{2}-b^{2}\right )^{2} \left ({\mathrm e}^{2 x}-1\right )^{3}}-\frac {b \,a^{3} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {b \,a^{3} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}\) | \(230\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1129 vs.
\(2 (98) = 196\).
time = 0.40, size = 2340, normalized size = 21.08 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}^{4}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 149, normalized size = 1.34 \begin {gather*} -\frac {2 \, a^{3} b \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} - b^{2}}} - \frac {2 \, {\left (3 \, a^{2} b e^{\left (5 \, x\right )} - 3 \, a b^{2} e^{\left (4 \, x\right )} - 10 \, a^{2} b e^{\left (3 \, x\right )} + 4 \, b^{3} e^{\left (3 \, x\right )} + 6 \, a^{3} e^{\left (2 \, x\right )} + 3 \, a^{2} b e^{x} - 2 \, a^{3} - a b^{2}\right )}}{3 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.75, size = 295, normalized size = 2.66 \begin {gather*} \frac {\frac {4\,\left (a\,b^2-a^3\right )}{{\left (a^2-b^2\right )}^2}+\frac {8\,{\mathrm {e}}^x\,\left (a^2\,b-b^3\right )}{3\,{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {\frac {8\,a}{3\,\left (a^2-b^2\right )}-\frac {8\,b\,{\mathrm {e}}^x}{3\,\left (a^2-b^2\right )}}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1}+\frac {\frac {2\,a\,b^2}{{\left (a^2-b^2\right )}^2}-\frac {2\,a^2\,b\,{\mathrm {e}}^x}{{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{2\,x}-1}+\frac {a^3\,b\,\ln \left (\frac {2\,a^2\,b\,{\mathrm {e}}^x}{{\left (a^2-b^2\right )}^2}-\frac {2\,a^2\,b\,\left (a+b\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/2}}\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/2}}-\frac {a^3\,b\,\ln \left (\frac {2\,a^2\,b\,{\mathrm {e}}^x}{{\left (a^2-b^2\right )}^2}+\frac {2\,a^2\,b\,\left (a+b\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/2}}\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________