Optimal. Leaf size=54 \[ -\frac{a x}{b \left (a^2-b^2\right )}+\frac{\log (a \sinh (x)+b \cosh (x))}{a^2-b^2}+\frac{x}{b (a+b \coth (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0850082, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {5467, 3484, 3530} \[ -\frac{a x}{b \left (a^2-b^2\right )}+\frac{\log (a \sinh (x)+b \cosh (x))}{a^2-b^2}+\frac{x}{b (a+b \coth (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5467
Rule 3484
Rule 3530
Rubi steps
\begin{align*} \int \frac{x \text{csch}^2(x)}{(a+b \coth (x))^2} \, dx &=\frac{x}{b (a+b \coth (x))}-\frac{\int \frac{1}{a+b \coth (x)} \, dx}{b}\\ &=-\frac{a x}{b \left (a^2-b^2\right )}+\frac{x}{b (a+b \coth (x))}+\frac{i \int \frac{-i b-i a \coth (x)}{a+b \coth (x)} \, dx}{a^2-b^2}\\ &=-\frac{a x}{b \left (a^2-b^2\right )}+\frac{x}{b (a+b \coth (x))}+\frac{\log (b \cosh (x)+a \sinh (x))}{a^2-b^2}\\ \end{align*}
Mathematica [A] time = 0.158962, size = 49, normalized size = 0.91 \[ \frac{a x-b \log (a \sinh (x)+b \cosh (x))}{b^3-a^2 b}+\frac{x \sinh (x)}{a b \sinh (x)+b^2 \cosh (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.112, size = 73, normalized size = 1.4 \begin{align*} -2\,{\frac{x}{{a}^{2}-{b}^{2}}}-2\,{\frac{x}{ \left ( a{{\rm e}^{2\,x}}+b{{\rm e}^{2\,x}}-a+b \right ) \left ( a+b \right ) }}+{\frac{1}{{a}^{2}-{b}^{2}}\ln \left ({{\rm e}^{2\,x}}-{\frac{a-b}{a+b}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.952, size = 92, normalized size = 1.7 \begin{align*} \frac{2 \, x e^{\left (2 \, x\right )}}{a^{2} - 2 \, a b + b^{2} -{\left (a^{2} - b^{2}\right )} e^{\left (2 \, x\right )}} + \frac{\log \left (\frac{{\left (a + b\right )} e^{\left (2 \, x\right )} - a + b}{a + b}\right )}{a^{2} - b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.68442, size = 491, normalized size = 9.09 \begin{align*} \frac{2 \,{\left (a + b\right )} x \cosh \left (x\right )^{2} + 4 \,{\left (a + b\right )} x \cosh \left (x\right ) \sinh \left (x\right ) + 2 \,{\left (a + b\right )} x \sinh \left (x\right )^{2} -{\left ({\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )^{2} - a + b\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \cosh \left (x\right )^{2} - 2 \,{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right ) -{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \sinh \left (x\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x \operatorname{csch}^{2}{\left (x \right )}}{\left (a + b \coth{\left (x \right )}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.17361, size = 228, normalized size = 4.22 \begin{align*} -\frac{2 \, a x e^{\left (2 \, x\right )} + 2 \, b x e^{\left (2 \, x\right )} - a e^{\left (2 \, x\right )} \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b\right ) - b e^{\left (2 \, x\right )} \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b\right ) + a \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b\right ) - b \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b\right )}{a^{3} e^{\left (2 \, x\right )} + a^{2} b e^{\left (2 \, x\right )} - a b^{2} e^{\left (2 \, x\right )} - b^{3} e^{\left (2 \, x\right )} - a^{3} + a^{2} b + a b^{2} - b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]