Optimal. Leaf size=137 \[ -\frac {a^3 b \text {ArcTan}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}-\frac {a b^2 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {a \cosh (x)}{a^2-b^2}+\frac {a \cosh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \sinh (x)}{\left (a^2-b^2\right )^2}-\frac {b \sinh ^3(x)}{3 \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.692, Rules used = {3599, 3188,
2644, 30, 2713, 3178, 3153, 212, 2718} \begin {gather*} -\frac {b \sinh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \sinh (x)}{\left (a^2-b^2\right )^2}+\frac {a \cosh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {a \cosh (x)}{a^2-b^2}-\frac {a b^2 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {a^3 b \text {ArcTan}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 212
Rule 2644
Rule 2713
Rule 2718
Rule 3153
Rule 3178
Rule 3188
Rule 3599
Rubi steps
\begin {align*} \int \frac {\sinh ^3(x)}{a+b \tanh (x)} \, dx &=\int \frac {\cosh (x) \sinh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx\\ &=\frac {a \int \sinh ^3(x) \, dx}{a^2-b^2}-\frac {b \int \cosh (x) \sinh ^2(x) \, dx}{a^2-b^2}+\frac {(a b) \int \frac {\sinh ^2(x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=\frac {a^2 b \sinh (x)}{\left (a^2-b^2\right )^2}-\frac {\left (a^3 b\right ) \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^2}-\frac {\left (a b^2\right ) \int \sinh (x) \, dx}{\left (a^2-b^2\right )^2}-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cosh (x)\right )}{a^2-b^2}-\frac {(i b) \text {Subst}\left (\int x^2 \, dx,x,i \sinh (x)\right )}{a^2-b^2}\\ &=-\frac {a b^2 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {a \cosh (x)}{a^2-b^2}+\frac {a \cosh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \sinh (x)}{\left (a^2-b^2\right )^2}-\frac {b \sinh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {\left (i a^3 b\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{\left (a^2-b^2\right )^2}\\ &=-\frac {a^3 b \tan ^{-1}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}-\frac {a b^2 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {a \cosh (x)}{a^2-b^2}+\frac {a \cosh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a^2 b \sinh (x)}{\left (a^2-b^2\right )^2}-\frac {b \sinh ^3(x)}{3 \left (a^2-b^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.84, size = 180, normalized size = 1.31 \begin {gather*} \frac {-3 a \sqrt {a-b} \sqrt {a+b} \left (3 a^2+b^2\right ) \cosh (x)+a \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right ) \cosh (3 x)+b \left (-24 a^3 \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )+3 \sqrt {a-b} \sqrt {a+b} \left (5 a^2-b^2\right ) \sinh (x)-\sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right ) \sinh (3 x)\right )}{12 (a-b)^{5/2} (a+b)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.69, size = 166, normalized size = 1.21
method | result | size |
default | \(-\frac {16}{3 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3} \left (16 a +16 b \right )}-\frac {8}{\left (16 a +16 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {a}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {8}{\left (16 a -16 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {16}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3} \left (16 a -16 b \right )}-\frac {a}{2 \left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {2 a^{3} b \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a -b \right )^{2} \left (a +b \right )^{2} \sqrt {a^{2}-b^{2}}}\) | \(166\) |
risch | \(\frac {{\mathrm e}^{3 x}}{24 a +24 b}-\frac {3 \,{\mathrm e}^{x} a}{8 \left (a +b \right )^{2}}-\frac {{\mathrm e}^{x} b}{8 \left (a +b \right )^{2}}-\frac {3 \,{\mathrm e}^{-x} a}{8 \left (a -b \right )^{2}}+\frac {{\mathrm e}^{-x} b}{8 \left (a -b \right )^{2}}+\frac {{\mathrm e}^{-3 x}}{24 a -24 b}-\frac {b \,a^{3} \ln \left ({\mathrm e}^{x}+\frac {a -b}{\sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {b \,a^{3} \ln \left ({\mathrm e}^{x}-\frac {a -b}{\sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2}}\) | \(174\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \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. 903 vs.
\(2 (129) = 258\).
time = 0.36, size = 1861, normalized size = 13.58 \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 {\sinh ^{3}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 163, normalized size = 1.19 \begin {gather*} -\frac {2 \, a^{3} b \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} - b^{2}}} - \frac {{\left (9 \, a e^{\left (2 \, x\right )} - 3 \, b e^{\left (2 \, x\right )} - a + b\right )} e^{\left (-3 \, x\right )}}{24 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {a^{2} e^{\left (3 \, x\right )} + 2 \, a b e^{\left (3 \, x\right )} + b^{2} e^{\left (3 \, x\right )} - 9 \, a^{2} e^{x} - 12 \, a b e^{x} - 3 \, b^{2} e^{x}}{24 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.46, size = 261, normalized size = 1.91 \begin {gather*} \frac {{\mathrm {e}}^{-3\,x}}{24\,a-24\,b}+\frac {{\mathrm {e}}^{3\,x}}{24\,a+24\,b}-\frac {{\mathrm {e}}^x\,\left (3\,a+b\right )}{8\,{\left (a+b\right )}^2}-\frac {{\mathrm {e}}^{-x}\,\left (3\,a-b\right )}{8\,{\left (a-b\right )}^2}-\frac {2\,\mathrm {atan}\left (\frac {a^3\,b\,{\mathrm {e}}^x\,\sqrt {a^{10}-5\,a^8\,b^2+10\,a^6\,b^4-10\,a^4\,b^6+5\,a^2\,b^8-b^{10}}}{a^5\,\sqrt {a^6\,b^2}-b^5\,\sqrt {a^6\,b^2}+2\,a^2\,b^3\,\sqrt {a^6\,b^2}-2\,a^3\,b^2\,\sqrt {a^6\,b^2}+a\,b^4\,\sqrt {a^6\,b^2}-a^4\,b\,\sqrt {a^6\,b^2}}\right )\,\sqrt {a^6\,b^2}}{\sqrt {a^{10}-5\,a^8\,b^2+10\,a^6\,b^4-10\,a^4\,b^6+5\,a^2\,b^8-b^{10}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________