Optimal. Leaf size=66 \[ \frac {2 a b \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}}+\frac {(b-a \cosh (x)) \text {csch}(x)}{a^2-b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 5, 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 {\text {csch}(x) (b-a \cosh (x))}{a^2-b^2}+\frac {2 a b \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/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}^2(x)}{a+b \text {sech}(x)} \, dx &=-\int \frac {\coth (x) \text {csch}(x)}{-b-a \cosh (x)} \, dx\\ &=\frac {(b-a \cosh (x)) \text {csch}(x)}{a^2-b^2}-\frac {\int \frac {a b}{-b-a \cosh (x)} \, dx}{a^2-b^2}\\ &=\frac {(b-a \cosh (x)) \text {csch}(x)}{a^2-b^2}-\frac {(a b) \int \frac {1}{-b-a \cosh (x)} \, dx}{a^2-b^2}\\ &=\frac {(b-a \cosh (x)) \text {csch}(x)}{a^2-b^2}-\frac {(2 a b) \text {Subst}\left (\int \frac {1}{-a-b-(a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^2-b^2}\\ &=\frac {2 a b \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}}+\frac {(b-a \cosh (x)) \text {csch}(x)}{a^2-b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 75, normalized size = 1.14 \begin {gather*} \frac {1}{2} \left (-\frac {4 a 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 )^{3/2}}-\frac {\coth \left (\frac {x}{2}\right )}{a+b}+\frac {\tanh \left (\frac {x}{2}\right )}{-a+b}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.83, size = 77, normalized size = 1.17
method | result | size |
default | \(-\frac {\tanh \left (\frac {x}{2}\right )}{2 \left (a -b \right )}+\frac {2 a 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 ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {1}{2 \left (a +b \right ) \tanh \left (\frac {x}{2}\right )}\) | \(77\) |
risch | \(-\frac {2 \left (-{\mathrm e}^{x} b +a \right )}{\left ({\mathrm e}^{2 x}-1\right ) \left (a^{2}-b^{2}\right )}-\frac {b a \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 ) \left (a -b \right )}+\frac {b a \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 ) \left (a -b \right )}\) | \(165\) |
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. 185 vs.
\(2 (58) = 116\).
time = 0.39, size = 452, normalized size = 6.85 \begin {gather*} \left [\frac {2 \, a^{3} - 2 \, a b^{2} - {\left (a b \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) \sinh \left (x\right ) + a b \sinh \left (x\right )^{2} - a b\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {a^{2} \cosh \left (x\right )^{2} + a^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) - a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + b\right )}}{a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + b\right )} \sinh \left (x\right ) + a}\right ) - 2 \, {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{2} b - b^{3}\right )} \sinh \left (x\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2}}, \frac {2 \, {\left (a^{3} - a b^{2} + {\left (a b \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) \sinh \left (x\right ) + a b \sinh \left (x\right )^{2} - a b\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cosh \left (x\right ) + a \sinh \left (x\right ) + b}{\sqrt {a^{2} - b^{2}}}\right ) - {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right ) - {\left (a^{2} b - b^{3}\right )} \sinh \left (x\right )\right )}}{a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2}}\right ] \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}^{2}{\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.38, size = 64, normalized size = 0.97 \begin {gather*} \frac {2 \, a b \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )}^{\frac {3}{2}}} + \frac {2 \, {\left (b e^{x} - a\right )}}{{\left (a^{2} - b^{2}\right )} {\left (e^{\left (2 \, x\right )} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.56, size = 151, normalized size = 2.29 \begin {gather*} \frac {a\,b\,\ln \left (-\frac {2\,b\,{\mathrm {e}}^x}{a^2-b^2}-\frac {2\,b\,\left (a+b\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}\right )}{{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}-\frac {\frac {2\,a}{a^2-b^2}-\frac {2\,b\,{\mathrm {e}}^x}{a^2-b^2}}{{\mathrm {e}}^{2\,x}-1}-\frac {a\,b\,\ln \left (\frac {2\,b\,\left (a+b\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}-\frac {2\,b\,{\mathrm {e}}^x}{a^2-b^2}\right )}{{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________