Optimal. Leaf size=82 \[ \frac {b \sqrt {a^2-b^2} \text {ArcTan}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {b^2 \tanh ^{-1}(\cosh (x))}{a^3}+\frac {b \text {csch}(x)}{a^2}-\frac {\coth (x) \text {csch}(x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 11, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.846, Rules used = {3599, 3189,
3853, 3855, 2701, 327, 213, 2702, 3183, 3153, 212} \begin {gather*} -\frac {b^2 \tanh ^{-1}(\cosh (x))}{a^3}+\frac {b \text {csch}(x)}{a^2}+\frac {b \sqrt {a^2-b^2} \text {ArcTan}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {\coth (x) \text {csch}(x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 213
Rule 327
Rule 2701
Rule 2702
Rule 3153
Rule 3183
Rule 3189
Rule 3599
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\text {csch}^3(x)}{a+b \tanh (x)} \, dx &=\int \frac {\coth (x) \text {csch}^2(x)}{a \cosh (x)+b \sinh (x)} \, dx\\ &=-\left (i \int \left (\frac {i \text {csch}^3(x)}{a}-\frac {i b \text {csch}^2(x) \text {sech}(x)}{a^2}+\frac {i b^2 \text {csch}(x) \text {sech}^2(x)}{a^3}-\frac {i b^3 \text {sech}^2(x)}{a^3 (a \cosh (x)+b \sinh (x))}\right ) \, dx\right )\\ &=\frac {\int \text {csch}^3(x) \, dx}{a}-\frac {b \int \text {csch}^2(x) \text {sech}(x) \, dx}{a^2}+\frac {b^2 \int \text {csch}(x) \text {sech}^2(x) \, dx}{a^3}-\frac {b^3 \int \frac {\text {sech}^2(x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^3}\\ &=-\frac {\coth (x) \text {csch}(x)}{2 a}-\frac {b^2 \text {sech}(x)}{a^3}-\frac {\int \text {csch}(x) \, dx}{2 a}+\frac {(i b) \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,-i \text {csch}(x)\right )}{a^2}-\frac {b \int \text {sech}(x) \, dx}{a^2}+\frac {b^2 \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\text {sech}(x)\right )}{a^3}+\frac {\left (b \left (a^2-b^2\right )\right ) \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{a^3}\\ &=-\frac {b \tan ^{-1}(\sinh (x))}{a^2}+\frac {\tanh ^{-1}(\cosh (x))}{2 a}+\frac {b \text {csch}(x)}{a^2}-\frac {\coth (x) \text {csch}(x)}{2 a}+\frac {(i b) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,-i \text {csch}(x)\right )}{a^2}+\frac {b^2 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(x)\right )}{a^3}+\frac {\left (i b \left (a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{a^3}\\ &=\frac {b \sqrt {a^2-b^2} \tan ^{-1}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {\tanh ^{-1}(\cosh (x))}{2 a}-\frac {b^2 \tanh ^{-1}(\cosh (x))}{a^3}+\frac {b \text {csch}(x)}{a^2}-\frac {\coth (x) \text {csch}(x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 123, normalized size = 1.50 \begin {gather*} -\frac {-16 \sqrt {a-b} b \sqrt {a+b} \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )-4 a b \coth \left (\frac {x}{2}\right )+a^2 \text {csch}^2\left (\frac {x}{2}\right )+4 a^2 \log \left (\tanh \left (\frac {x}{2}\right )\right )-8 b^2 \log \left (\tanh \left (\frac {x}{2}\right )\right )+a^2 \text {sech}^2\left (\frac {x}{2}\right )+4 a b \tanh \left (\frac {x}{2}\right )}{8 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.88, size = 110, normalized size = 1.34
method | result | size |
default | \(\frac {\frac {a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{2}-2 b \tanh \left (\frac {x}{2}\right )}{4 a^{2}}+\frac {2 b \sqrt {a^{2}-b^{2}}\, \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{a^{3}}-\frac {1}{8 a \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\left (-2 a^{2}+4 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{4 a^{3}}+\frac {b}{2 a^{2} \tanh \left (\frac {x}{2}\right )}\) | \(110\) |
risch | \(-\frac {{\mathrm e}^{x} \left ({\mathrm e}^{2 x} a -2 b \,{\mathrm e}^{2 x}+a +2 b \right )}{\left ({\mathrm e}^{2 x}-1\right )^{2} a^{2}}+\frac {\sqrt {-a^{2}+b^{2}}\, b \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{a^{3}}-\frac {\sqrt {-a^{2}+b^{2}}\, b \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{a^{3}}-\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2 a}+\frac {\ln \left ({\mathrm e}^{x}-1\right ) b^{2}}{a^{3}}+\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2 a}-\frac {\ln \left ({\mathrm e}^{x}+1\right ) b^{2}}{a^{3}}\) | \(156\) |
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. 555 vs.
\(2 (74) = 148\).
time = 0.38, size = 1165, normalized size = 14.21 \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}^{3}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 125, normalized size = 1.52 \begin {gather*} \frac {{\left (a^{2} - 2 \, b^{2}\right )} \log \left (e^{x} + 1\right )}{2 \, a^{3}} - \frac {{\left (a^{2} - 2 \, b^{2}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, a^{3}} + \frac {2 \, {\left (a^{2} b - b^{3}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a^{3}} - \frac {a e^{\left (3 \, x\right )} - 2 \, b e^{\left (3 \, x\right )} + a e^{x} + 2 \, b e^{x}}{a^{2} {\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.51, size = 506, normalized size = 6.17 \begin {gather*} \frac {\ln \left (8\,a^3\,b-16\,a\,b^3-4\,a^4+8\,b^4+4\,a^2\,b^2-4\,a^4\,{\mathrm {e}}^x+8\,b^4\,{\mathrm {e}}^x-16\,a\,b^3\,{\mathrm {e}}^x+8\,a^3\,b\,{\mathrm {e}}^x+4\,a^2\,b^2\,{\mathrm {e}}^x\right )}{2\,a}-\frac {2\,{\mathrm {e}}^x}{a-2\,a\,{\mathrm {e}}^{2\,x}+a\,{\mathrm {e}}^{4\,x}}-\frac {\ln \left (16\,a\,b^3-8\,a^3\,b+4\,a^4-8\,b^4-4\,a^2\,b^2-4\,a^4\,{\mathrm {e}}^x+8\,b^4\,{\mathrm {e}}^x-16\,a\,b^3\,{\mathrm {e}}^x+8\,a^3\,b\,{\mathrm {e}}^x+4\,a^2\,b^2\,{\mathrm {e}}^x\right )}{2\,a}-\frac {b^2\,\ln \left (8\,a^3\,b-16\,a\,b^3-4\,a^4+8\,b^4+4\,a^2\,b^2-4\,a^4\,{\mathrm {e}}^x+8\,b^4\,{\mathrm {e}}^x-16\,a\,b^3\,{\mathrm {e}}^x+8\,a^3\,b\,{\mathrm {e}}^x+4\,a^2\,b^2\,{\mathrm {e}}^x\right )}{a^3}+\frac {b^2\,\ln \left (16\,a\,b^3-8\,a^3\,b+4\,a^4-8\,b^4-4\,a^2\,b^2-4\,a^4\,{\mathrm {e}}^x+8\,b^4\,{\mathrm {e}}^x-16\,a\,b^3\,{\mathrm {e}}^x+8\,a^3\,b\,{\mathrm {e}}^x+4\,a^2\,b^2\,{\mathrm {e}}^x\right )}{a^3}-\frac {a\,{\mathrm {e}}^x}{a^2\,{\mathrm {e}}^{2\,x}-a^2}+\frac {2\,b\,{\mathrm {e}}^x}{a^2\,{\mathrm {e}}^{2\,x}-a^2}-\frac {b\,\ln \left (8\,b^2\,\sqrt {b^2-a^2}-8\,b^3\,{\mathrm {e}}^x+8\,a^2\,b\,{\mathrm {e}}^x-8\,a\,b\,\sqrt {b^2-a^2}\right )\,\sqrt {b^2-a^2}}{a^3}+\frac {b\,\ln \left (8\,b^2\,\sqrt {b^2-a^2}+8\,b^3\,{\mathrm {e}}^x-8\,a^2\,b\,{\mathrm {e}}^x-8\,a\,b\,\sqrt {b^2-a^2}\right )\,\sqrt {b^2-a^2}}{a^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________