Optimal. Leaf size=64 \[ -\frac{b x}{a^2-b^2}+\frac{a \log (\sinh (x))}{a^2-b^2}+\frac{a^3 \log (a+b \coth (x))}{b^2 \left (a^2-b^2\right )}-\frac{\coth (x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.129963, antiderivative size = 64, 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 = {3566, 3626, 3617, 31, 3475} \[ -\frac{b x}{a^2-b^2}+\frac{a \log (\sinh (x))}{a^2-b^2}+\frac{a^3 \log (a+b \coth (x))}{b^2 \left (a^2-b^2\right )}-\frac{\coth (x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3566
Rule 3626
Rule 3617
Rule 31
Rule 3475
Rubi steps
\begin{align*} \int \frac{\coth ^3(x)}{a+b \coth (x)} \, dx &=-\frac{\coth (x)}{b}-\frac{\int \frac{-a-b \coth (x)+a \coth ^2(x)}{a+b \coth (x)} \, dx}{b}\\ &=-\frac{b x}{a^2-b^2}-\frac{\coth (x)}{b}+\frac{a \int \coth (x) \, dx}{a^2-b^2}+\frac{a^3 \int \frac{1-\coth ^2(x)}{a+b \coth (x)} \, dx}{b \left (a^2-b^2\right )}\\ &=-\frac{b x}{a^2-b^2}-\frac{\coth (x)}{b}+\frac{a \log (\sinh (x))}{a^2-b^2}+\frac{a^3 \operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \coth (x)\right )}{b^2 \left (a^2-b^2\right )}\\ &=-\frac{b x}{a^2-b^2}-\frac{\coth (x)}{b}+\frac{a^3 \log (a+b \coth (x))}{b^2 \left (a^2-b^2\right )}+\frac{a \log (\sinh (x))}{a^2-b^2}\\ \end{align*}
Mathematica [A] time = 0.119717, size = 64, normalized size = 1. \[ \frac{b \left (a^2-b^2\right ) \coth (x)+a \left (a^2-b^2\right ) \log (\sinh (x))+a^3 (-\log (a \sinh (x)+b \cosh (x)))+b^3 x}{b^2 (b-a) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 67, normalized size = 1.1 \begin{align*} -{\frac{{\rm coth} \left (x\right )}{b}}-{\frac{\ln \left ( 1+{\rm coth} \left (x\right ) \right ) }{2\,a-2\,b}}-{\frac{\ln \left ({\rm coth} \left (x\right )-1 \right ) }{2\,b+2\,a}}+{\frac{{a}^{3}\ln \left ( a+b{\rm coth} \left (x\right ) \right ) }{{b}^{2} \left ( a+b \right ) \left ( a-b \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.17138, size = 111, normalized size = 1.73 \begin{align*} \frac{a^{3} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{2} b^{2} - b^{4}} + \frac{x}{a + b} - \frac{a \log \left (e^{\left (-x\right )} + 1\right )}{b^{2}} - \frac{a \log \left (e^{\left (-x\right )} - 1\right )}{b^{2}} + \frac{2}{b e^{\left (-2 \, x\right )} - b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.83034, size = 660, normalized size = 10.31 \begin{align*} \frac{{\left (a b^{2} + b^{3}\right )} x \cosh \left (x\right )^{2} + 2 \,{\left (a b^{2} + b^{3}\right )} x \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a b^{2} + b^{3}\right )} x \sinh \left (x\right )^{2} + 2 \, a^{2} b - 2 \, b^{3} -{\left (a b^{2} + b^{3}\right )} x -{\left (a^{3} \cosh \left (x\right )^{2} + 2 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right ) + a^{3} \sinh \left (x\right )^{2} - a^{3}\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 ) -{\left (a^{3} - a b^{2} -{\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2} - 2 \,{\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) -{\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )^{2}\right )} \log \left (\frac{2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b^{2} - b^{4} -{\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} - 2 \,{\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) -{\left (a^{2} b^{2} - b^{4}\right )} \sinh \left (x\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 5.44979, size = 639, normalized size = 9.98 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11489, size = 103, normalized size = 1.61 \begin{align*} \frac{a^{3} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{2} b^{2} - b^{4}} - \frac{x}{a - b} - \frac{a \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{b^{2}} - \frac{2}{b{\left (e^{\left (2 \, x\right )} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]