Optimal. Leaf size=94 \[ -\frac {\text {csch}^2(x) (a-b \cosh (x))}{2 \left (a^2-b^2\right )}-\frac {a^3 \log (a+b \cosh (x))}{\left (a^2-b^2\right )^2}+\frac {(2 a+b) \log (1-\cosh (x))}{4 (a+b)^2}+\frac {(2 a-b) \log (\cosh (x)+1)}{4 (a-b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2721, 1647, 801} \[ -\frac {a^3 \log (a+b \cosh (x))}{\left (a^2-b^2\right )^2}-\frac {\text {csch}^2(x) (a-b \cosh (x))}{2 \left (a^2-b^2\right )}+\frac {(2 a+b) \log (1-\cosh (x))}{4 (a+b)^2}+\frac {(2 a-b) \log (\cosh (x)+1)}{4 (a-b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 801
Rule 1647
Rule 2721
Rubi steps
\begin {align*} \int \frac {\coth ^3(x)}{a+b \cosh (x)} \, dx &=\operatorname {Subst}\left (\int \frac {x^3}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \cosh (x)\right )\\ &=-\frac {(a-b \cosh (x)) \text {csch}^2(x)}{2 \left (a^2-b^2\right )}+\frac {\operatorname {Subst}\left (\int \frac {\frac {a b^4}{a^2-b^2}-\frac {b^2 \left (2 a^2-b^2\right ) x}{a^2-b^2}}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \cosh (x)\right )}{2 b^2}\\ &=-\frac {(a-b \cosh (x)) \text {csch}^2(x)}{2 \left (a^2-b^2\right )}+\frac {\operatorname {Subst}\left (\int \left (-\frac {b^2 (2 a+b)}{2 (a+b)^2 (b-x)}-\frac {2 a^3 b^2}{(a-b)^2 (a+b)^2 (a+x)}+\frac {(2 a-b) b^2}{2 (a-b)^2 (b+x)}\right ) \, dx,x,b \cosh (x)\right )}{2 b^2}\\ &=-\frac {(a-b \cosh (x)) \text {csch}^2(x)}{2 \left (a^2-b^2\right )}+\frac {(2 a+b) \log (1-\cosh (x))}{4 (a+b)^2}+\frac {(2 a-b) \log (1+\cosh (x))}{4 (a-b)^2}-\frac {a^3 \log (a+b \cosh (x))}{\left (a^2-b^2\right )^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 101, normalized size = 1.07 \[ \frac {-8 a^3 \log (a+b \cosh (x))+8 a^3 \log (\sinh (x))-12 a^2 b \log \left (\tanh \left (\frac {x}{2}\right )\right )-(a-b)^2 (a+b) \text {csch}^2\left (\frac {x}{2}\right )+(a-b) (a+b)^2 \text {sech}^2\left (\frac {x}{2}\right )+4 b^3 \log \left (\tanh \left (\frac {x}{2}\right )\right )}{8 (a-b)^2 (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 839, normalized size = 8.93 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 178, normalized size = 1.89 \[ -\frac {a^{3} b \log \left ({\left | b {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a^{4} b - 2 \, a^{2} b^{3} + b^{5}} + \frac {{\left (2 \, a - b\right )} \log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (2 \, a + b\right )} \log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {a^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 2 \, a^{2} b {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b^{3} {\left (e^{\left (-x\right )} + e^{x}\right )} - 4 \, a b^{2}}{2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 4\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 97, normalized size = 1.03 \[ -\frac {\tanh ^{2}\left (\frac {x}{2}\right )}{8 \left (a -b \right )}-\frac {a^{3} \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b -a -b \right )}{\left (a +b \right )^{2} \left (a -b \right )^{2}}-\frac {1}{8 \left (a +b \right ) \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) a}{\left (a +b \right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) b}{2 \left (a +b \right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 156, normalized size = 1.66 \[ -\frac {a^{3} \log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (2 \, a - b\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (2 \, a + b\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {b e^{\left (-x\right )} - 2 \, a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )}}{a^{2} - b^{2} - 2 \, {\left (a^{2} - b^{2}\right )} e^{\left (-2 \, x\right )} + {\left (a^{2} - b^{2}\right )} e^{\left (-4 \, x\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.52, size = 291, normalized size = 3.10 \[ \frac {\frac {2\,\left (a\,b^2-a^3\right )}{{\left (a^2-b^2\right )}^2}+\frac {{\mathrm {e}}^x\,\left (a^2\,b-b^3\right )}{{\left (a^2-b^2\right )}^2}}{{\mathrm {e}}^{2\,x}-1}-\frac {\frac {2\,a}{a^2-b^2}-\frac {2\,b\,{\mathrm {e}}^x}{a^2-b^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}+\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (2\,a-b\right )}{2\,a^2-4\,a\,b+2\,b^2}-\frac {a^3\,\ln \left (b^7\,{\mathrm {e}}^{2\,x}-16\,a^6\,b+b^7-6\,a^2\,b^5+9\,a^4\,b^3-32\,a^7\,{\mathrm {e}}^x-6\,a^2\,b^5\,{\mathrm {e}}^{2\,x}+9\,a^4\,b^3\,{\mathrm {e}}^{2\,x}+2\,a\,b^6\,{\mathrm {e}}^x-16\,a^6\,b\,{\mathrm {e}}^{2\,x}-12\,a^3\,b^4\,{\mathrm {e}}^x+18\,a^5\,b^2\,{\mathrm {e}}^x\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (2\,a+b\right )}{2\,a^2+4\,a\,b+2\,b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\coth ^{3}{\relax (x )}}{a + b \cosh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________