Optimal. Leaf size=108 \[ \frac {b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^4}-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {2804, 3134,
3080, 3855, 2739, 632, 212} \begin {gather*} \frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^4}+\frac {b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}-\frac {\coth (x) \text {csch}^2(x)}{3 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 2739
Rule 2804
Rule 3080
Rule 3134
Rule 3855
Rubi steps
\begin {align*} \int \frac {\coth ^4(x)}{a+b \sinh (x)} \, dx &=\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}+\frac {\int \frac {\text {csch}^2(x) \left (2 \left (4 a^2+3 b^2\right )-a b \sinh (x)+3 \left (2 a^2+b^2\right ) \sinh ^2(x)\right )}{a+b \sinh (x)} \, dx}{6 a^2}\\ &=-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}+\frac {i \int \frac {\text {csch}(x) \left (3 i b \left (3 a^2+2 b^2\right )-3 i a \left (2 a^2+b^2\right ) \sinh (x)\right )}{a+b \sinh (x)} \, dx}{6 a^3}\\ &=-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}+\frac {\left (a^2+b^2\right )^2 \int \frac {1}{a+b \sinh (x)} \, dx}{a^4}-\frac {\left (b \left (3 a^2+2 b^2\right )\right ) \int \text {csch}(x) \, dx}{2 a^4}\\ &=\frac {b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}+\frac {\left (2 \left (a^2+b^2\right )^2\right ) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^4}\\ &=\frac {b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}-\frac {\left (4 \left (a^2+b^2\right )^2\right ) \text {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac {x}{2}\right )\right )}{a^4}\\ &=\frac {b \left (3 a^2+2 b^2\right ) \tanh ^{-1}(\cosh (x))}{2 a^4}-\frac {2 \left (a^2+b^2\right )^{3/2} \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{a^4}-\frac {\left (4 a^2+3 b^2\right ) \coth (x)}{3 a^3}+\frac {b \coth (x) \text {csch}(x)}{2 a^2}-\frac {\coth (x) \text {csch}^2(x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.31, size = 176, normalized size = 1.63 \begin {gather*} \frac {48 \left (-a^2-b^2\right )^{3/2} \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )-4 a \left (4 a^2+3 b^2\right ) \coth \left (\frac {x}{2}\right )+3 a^2 b \text {csch}^2\left (\frac {x}{2}\right )-12 b \left (3 a^2+2 b^2\right ) \log \left (\tanh \left (\frac {x}{2}\right )\right )+3 a^2 b \text {sech}^2\left (\frac {x}{2}\right )+8 a^3 \text {csch}^3(x) \sinh ^4\left (\frac {x}{2}\right )-\frac {1}{2} a^3 \text {csch}^4\left (\frac {x}{2}\right ) \sinh (x)-4 a \left (4 a^2+3 b^2\right ) \tanh \left (\frac {x}{2}\right )}{24 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.58, size = 169, normalized size = 1.56
method | result | size |
default | \(-\frac {\frac {\left (\tanh ^{3}\left (\frac {x}{2}\right )\right ) a^{2}}{3}+a b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+5 a^{2} \tanh \left (\frac {x}{2}\right )+4 b^{2} \tanh \left (\frac {x}{2}\right )}{8 a^{3}}-\frac {1}{24 a \tanh \left (\frac {x}{2}\right )^{3}}-\frac {5 a^{2}+4 b^{2}}{8 a^{3} \tanh \left (\frac {x}{2}\right )}+\frac {b}{8 a^{2} \tanh \left (\frac {x}{2}\right )^{2}}-\frac {b \left (3 a^{2}+2 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2 a^{4}}-\frac {\left (-16 a^{4}-32 a^{2} b^{2}-16 b^{4}\right ) \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{8 a^{4} \sqrt {a^{2}+b^{2}}}\) | \(169\) |
risch | \(-\frac {-3 a b \,{\mathrm e}^{5 x}+12 a^{2} {\mathrm e}^{4 x}+6 b^{2} {\mathrm e}^{4 x}-12 a^{2} {\mathrm e}^{2 x}-12 b^{2} {\mathrm e}^{2 x}+3 b \,{\mathrm e}^{x} a +8 a^{2}+6 b^{2}}{3 a^{3} \left ({\mathrm e}^{2 x}-1\right )^{3}}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} \ln \left ({\mathrm e}^{x}-\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}}-a^{3}-a \,b^{2}}{b \left (a^{2}+b^{2}\right )}\right )}{a^{4}}-\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} \ln \left ({\mathrm e}^{x}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}}+a^{3}+a \,b^{2}}{b \left (a^{2}+b^{2}\right )}\right )}{a^{4}}-\frac {3 b \ln \left ({\mathrm e}^{x}-1\right )}{2 a^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{x}-1\right )}{a^{4}}+\frac {3 b \ln \left ({\mathrm e}^{x}+1\right )}{2 a^{2}}+\frac {b^{3} \ln \left ({\mathrm e}^{x}+1\right )}{a^{4}}\) | \(224\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 212 vs.
\(2 (96) = 192\).
time = 0.48, size = 212, normalized size = 1.96 \begin {gather*} -\frac {3 \, a b e^{\left (-x\right )} - 3 \, a b e^{\left (-5 \, x\right )} - 8 \, a^{2} - 6 \, b^{2} + 12 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, x\right )} - 6 \, {\left (2 \, a^{2} + b^{2}\right )} e^{\left (-4 \, x\right )}}{3 \, {\left (3 \, a^{3} e^{\left (-2 \, x\right )} - 3 \, a^{3} e^{\left (-4 \, x\right )} + a^{3} e^{\left (-6 \, x\right )} - a^{3}\right )}} + \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{\left (-x\right )} + 1\right )}{2 \, a^{4}} - \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{\left (-x\right )} - 1\right )}{2 \, a^{4}} + \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1303 vs.
\(2 (96) = 192\).
time = 0.45, size = 1303, normalized size = 12.06 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\coth ^{4}{\left (x \right )}}{a + b \sinh {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 194 vs.
\(2 (96) = 192\).
time = 0.41, size = 194, normalized size = 1.80 \begin {gather*} \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left (e^{x} + 1\right )}{2 \, a^{4}} - \frac {{\left (3 \, a^{2} b + 2 \, b^{3}\right )} \log \left ({\left | e^{x} - 1 \right |}\right )}{2 \, a^{4}} + \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a^{4}} + \frac {3 \, a b e^{\left (5 \, x\right )} - 12 \, a^{2} e^{\left (4 \, x\right )} - 6 \, b^{2} e^{\left (4 \, x\right )} + 12 \, a^{2} e^{\left (2 \, x\right )} + 12 \, b^{2} e^{\left (2 \, x\right )} - 3 \, a b e^{x} - 8 \, a^{2} - 6 \, b^{2}}{3 \, a^{3} {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.41, size = 778, normalized size = 7.20 \begin {gather*} \frac {\ln \left (-\frac {8\,\left (-30\,{\mathrm {e}}^x\,a^9+18\,a^8\,b-101\,{\mathrm {e}}^x\,a^7\,b^2+60\,a^6\,b^3-126\,{\mathrm {e}}^x\,a^5\,b^4+74\,a^4\,b^5-69\,{\mathrm {e}}^x\,a^3\,b^6+40\,a^2\,b^7-14\,{\mathrm {e}}^x\,a\,b^8+8\,b^9\right )}{a^9\,b^3}-\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {8\,\left (4\,a^8-36\,{\mathrm {e}}^x\,a^7\,b+34\,a^6\,b^2-75\,{\mathrm {e}}^x\,a^5\,b^3+57\,a^4\,b^4-52\,{\mathrm {e}}^x\,a^3\,b^5+36\,a^2\,b^6-12\,{\mathrm {e}}^x\,a\,b^7+8\,b^8\right )}{a^6\,b^4}-\frac {\left (\frac {16\,\left (-8\,{\mathrm {e}}^x\,a^5+4\,a^4\,b-15\,{\mathrm {e}}^x\,a^3\,b^2+8\,a^2\,b^3-7\,{\mathrm {e}}^x\,a\,b^4+4\,b^5\right )}{a\,b^5}+\frac {32\,\sqrt {{\left (a^2+b^2\right )}^3}\,\left (-4\,{\mathrm {e}}^x\,a^5+3\,a^4\,b-3\,{\mathrm {e}}^x\,a^3\,b^2+2\,a^2\,b^3\right )}{a^4\,b^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}\right )}{a^4}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}-\frac {\frac {2\,\left (2\,a^2+b^2\right )}{a^3}-\frac {b\,{\mathrm {e}}^x}{a^2}}{{\mathrm {e}}^{2\,x}-1}-\frac {\frac {4}{a}-\frac {2\,b\,{\mathrm {e}}^x}{a^2}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {\ln \left (\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {8\,\left (4\,a^8-36\,{\mathrm {e}}^x\,a^7\,b+34\,a^6\,b^2-75\,{\mathrm {e}}^x\,a^5\,b^3+57\,a^4\,b^4-52\,{\mathrm {e}}^x\,a^3\,b^5+36\,a^2\,b^6-12\,{\mathrm {e}}^x\,a\,b^7+8\,b^8\right )}{a^6\,b^4}+\frac {\left (\frac {16\,\left (-8\,{\mathrm {e}}^x\,a^5+4\,a^4\,b-15\,{\mathrm {e}}^x\,a^3\,b^2+8\,a^2\,b^3-7\,{\mathrm {e}}^x\,a\,b^4+4\,b^5\right )}{a\,b^5}-\frac {32\,\sqrt {{\left (a^2+b^2\right )}^3}\,\left (-4\,{\mathrm {e}}^x\,a^5+3\,a^4\,b-3\,{\mathrm {e}}^x\,a^3\,b^2+2\,a^2\,b^3\right )}{a^4\,b^5}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}\right )}{a^4}-\frac {8\,\left (-30\,{\mathrm {e}}^x\,a^9+18\,a^8\,b-101\,{\mathrm {e}}^x\,a^7\,b^2+60\,a^6\,b^3-126\,{\mathrm {e}}^x\,a^5\,b^4+74\,a^4\,b^5-69\,{\mathrm {e}}^x\,a^3\,b^6+40\,a^2\,b^7-14\,{\mathrm {e}}^x\,a\,b^8+8\,b^9\right )}{a^9\,b^3}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{a^4}-\frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1\right )}-\frac {\ln \left ({\mathrm {e}}^x-1\right )\,\left (3\,a^2\,b+2\,b^3\right )}{2\,a^4}+\frac {\ln \left ({\mathrm {e}}^x+1\right )\,\left (3\,a^2\,b+2\,b^3\right )}{2\,a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________