Optimal. Leaf size=59 \[ -\frac{1}{2} b \left (3 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))+\frac{1}{2} a^2 b \cosh (x)+a^3 \log (\sinh (x))-\frac{1}{2} \text{csch}^2(x) (a \cosh (x)+b)^2 (a+b \cosh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.123469, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.636, Rules used = {4392, 2668, 739, 774, 635, 204, 260} \[ -\frac{1}{2} b \left (3 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))+\frac{1}{2} a^2 b \cosh (x)+a^3 \log (\sinh (x))-\frac{1}{2} \text{csch}^2(x) (a \cosh (x)+b)^2 (a+b \cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4392
Rule 2668
Rule 739
Rule 774
Rule 635
Rule 204
Rule 260
Rubi steps
\begin{align*} \int (a \coth (x)+b \text{csch}(x))^3 \, dx &=i \int (i b+i a \cosh (x))^3 \text{csch}^3(x) \, dx\\ &=a^3 \operatorname{Subst}\left (\int \frac{(i b+x)^3}{\left (-a^2-x^2\right )^2} \, dx,x,i a \cosh (x)\right )\\ &=-\frac{1}{2} (b+a \cosh (x))^2 (a+b \cosh (x)) \text{csch}^2(x)+\frac{1}{2} a \operatorname{Subst}\left (\int \frac{(i b+x) \left (-2 a^2+b^2+i b x\right )}{-a^2-x^2} \, dx,x,i a \cosh (x)\right )\\ &=\frac{1}{2} a^2 b \cosh (x)-\frac{1}{2} (b+a \cosh (x))^2 (a+b \cosh (x)) \text{csch}^2(x)-\frac{1}{2} a \operatorname{Subst}\left (\int \frac{i a^2 b-i b \left (-2 a^2+b^2\right )+2 a^2 x}{-a^2-x^2} \, dx,x,i a \cosh (x)\right )\\ &=\frac{1}{2} a^2 b \cosh (x)-\frac{1}{2} (b+a \cosh (x))^2 (a+b \cosh (x)) \text{csch}^2(x)-a^3 \operatorname{Subst}\left (\int \frac{x}{-a^2-x^2} \, dx,x,i a \cosh (x)\right )-\frac{1}{2} \left (i a b \left (3 a^2-b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-a^2-x^2} \, dx,x,i a \cosh (x)\right )\\ &=-\frac{1}{2} b \left (3 a^2-b^2\right ) \tanh ^{-1}(\cosh (x))+\frac{1}{2} a^2 b \cosh (x)-\frac{1}{2} (b+a \cosh (x))^2 (a+b \cosh (x)) \text{csch}^2(x)+a^3 \log (\sinh (x))\\ \end{align*}
Mathematica [A] time = 0.240878, size = 99, normalized size = 1.68 \[ -\frac{1}{4} \text{csch}^2(x) \left (2 b \left (3 a^2+b^2\right ) \cosh (x)+\cosh (2 x) \left (b \left (b^2-3 a^2\right ) \log \left (\tanh \left (\frac{x}{2}\right )\right )-2 a^3 \log (\sinh (x))\right )+3 a^2 b \log \left (\tanh \left (\frac{x}{2}\right )\right )+2 a^3 \log (\sinh (x))+2 a^3+6 a b^2-b^3 \log \left (\tanh \left (\frac{x}{2}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 79, normalized size = 1.3 \begin{align*}{a}^{3}\ln \left ( \sinh \left ( x \right ) \right ) -{\frac{{a}^{3} \left ({\rm coth} \left (x\right ) \right ) ^{2}}{2}}-3\,{\frac{{a}^{2}b\cosh \left ( x \right ) }{ \left ( \sinh \left ( x \right ) \right ) ^{2}}}+{\frac{3\,{a}^{2}b{\rm csch} \left (x\right ){\rm coth} \left (x\right )}{2}}-3\,{a}^{2}b{\it Artanh} \left ({{\rm e}^{x}} \right ) -{\frac{3\,a{b}^{2} \left ( \cosh \left ( x \right ) \right ) ^{2}}{2\, \left ( \sinh \left ( x \right ) \right ) ^{2}}}-{\frac{{b}^{3}{\rm csch} \left (x\right ){\rm coth} \left (x\right )}{2}}+{b}^{3}{\it Artanh} \left ({{\rm e}^{x}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.11341, size = 205, normalized size = 3.47 \begin{align*} -\frac{3}{2} \, a b^{2} \coth \left (x\right )^{2} + a^{3}{\left (x + \frac{2 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} + \log \left (e^{\left (-x\right )} + 1\right ) + \log \left (e^{\left (-x\right )} - 1\right )\right )} + \frac{1}{2} \, b^{3}{\left (\frac{2 \,{\left (e^{\left (-x\right )} + e^{\left (-3 \, x\right )}\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} + \log \left (e^{\left (-x\right )} + 1\right ) - \log \left (e^{\left (-x\right )} - 1\right )\right )} + \frac{3}{2} \, a^{2} b{\left (\frac{2 \,{\left (e^{\left (-x\right )} + e^{\left (-3 \, x\right )}\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} - \log \left (e^{\left (-x\right )} + 1\right ) + \log \left (e^{\left (-x\right )} - 1\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.24344, size = 1712, normalized size = 29.02 \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 \left (a \coth{\left (x \right )} + b \operatorname{csch}{\left (x \right )}\right )^{3}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.2006, size = 155, normalized size = 2.63 \begin{align*} \frac{1}{4} \,{\left (2 \, a^{3} - 3 \, a^{2} b + b^{3}\right )} \log \left (e^{\left (-x\right )} + e^{x} + 2\right ) + \frac{1}{4} \,{\left (2 \, a^{3} + 3 \, a^{2} b - b^{3}\right )} \log \left (e^{\left (-x\right )} + e^{x} - 2\right ) - \frac{a^{3}{\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 6 \, a^{2} b{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b^{3}{\left (e^{\left (-x\right )} + e^{x}\right )} + 12 \, a b^{2}}{2 \,{\left ({\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 4\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]