Optimal. Leaf size=76 \[ -\frac{b x}{a^2-b^2}+\frac{\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac{b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )}+\frac{b \coth (x)}{a^2}-\frac{\coth ^2(x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.309112, antiderivative size = 76, normalized size of antiderivative = 1., 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 = {3569, 3649, 3652, 3530, 3475} \[ -\frac{b x}{a^2-b^2}+\frac{\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac{b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )}+\frac{b \coth (x)}{a^2}-\frac{\coth ^2(x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3649
Rule 3652
Rule 3530
Rule 3475
Rubi steps
\begin{align*} \int \frac{\coth ^3(x)}{a+b \tanh (x)} \, dx &=-\frac{\coth ^2(x)}{2 a}-\frac{i \int \frac{\coth ^2(x) \left (-2 i b+2 i a \tanh (x)+2 i b \tanh ^2(x)\right )}{a+b \tanh (x)} \, dx}{2 a}\\ &=\frac{b \coth (x)}{a^2}-\frac{\coth ^2(x)}{2 a}-\frac{\int \frac{\coth (x) \left (-2 \left (a^2+b^2\right )+2 b^2 \tanh ^2(x)\right )}{a+b \tanh (x)} \, dx}{2 a^2}\\ &=-\frac{b x}{a^2-b^2}+\frac{b \coth (x)}{a^2}-\frac{\coth ^2(x)}{2 a}+\frac{\left (i b^4\right ) \int \frac{-i b-i a \tanh (x)}{a+b \tanh (x)} \, dx}{a^3 \left (a^2-b^2\right )}+\frac{\left (a^2+b^2\right ) \int \coth (x) \, dx}{a^3}\\ &=-\frac{b x}{a^2-b^2}+\frac{b \coth (x)}{a^2}-\frac{\coth ^2(x)}{2 a}+\frac{\left (a^2+b^2\right ) \log (\sinh (x))}{a^3}+\frac{b^4 \log (a \cosh (x)+b \sinh (x))}{a^3 \left (a^2-b^2\right )}\\ \end{align*}
Mathematica [A] time = 0.184197, size = 91, normalized size = 1.2 \[ \frac{2 a b \left (a^2-b^2\right ) \coth (x)+\left (a^2 b^2-a^4\right ) \text{csch}^2(x)-2 a^3 b x+2 a^4 \log (\sinh (x))+2 b^4 \log (a \cosh (x)+b \sinh (x))-2 b^4 \log (\sinh (x))}{2 a^3 (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 134, normalized size = 1.8 \begin{align*} -{\frac{1}{8\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}}+{\frac{b}{2\,{a}^{2}}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{1}{a-b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{{b}^{4}}{{a}^{3} \left ( a+b \right ) \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\tanh \left ( x/2 \right ) b+a \right ) }-{\frac{1}{8\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-2}}+{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+{\frac{{b}^{2}}{{a}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+{\frac{b}{2\,{a}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{1}{a+b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.27848, size = 163, normalized size = 2.14 \begin{align*} \frac{b^{4} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{5} - a^{3} b^{2}} + \frac{2 \,{\left ({\left (a + b\right )} e^{\left (-2 \, x\right )} - b\right )}}{2 \, a^{2} e^{\left (-2 \, x\right )} - a^{2} e^{\left (-4 \, x\right )} - a^{2}} + \frac{x}{a + b} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{a^{3}} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.83733, size = 1539, normalized size = 20.25 \begin{align*} \text{result too large to display} \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{\coth ^{3}{\left (x \right )}}{a + b \tanh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17969, size = 131, normalized size = 1.72 \begin{align*} \frac{b^{4} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{5} - a^{3} b^{2}} - \frac{x}{a - b} + \frac{{\left (a^{2} + b^{2}\right )} \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{a^{3}} - \frac{2 \,{\left (a b +{\left (a^{2} - a b\right )} e^{\left (2 \, x\right )}\right )}}{a^{3}{\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]