Optimal. Leaf size=132 \[ \frac {a \sinh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {a b^2 \sinh (x)}{\left (a^2-b^2\right )^2}+\frac {a \sinh (x)}{a^2-b^2}-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {b^4 \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {b^3 \cosh (x)}{\left (a^2-b^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3511, 3486, 2633, 2637, 3509, 206} \[ \frac {a \sinh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {a b^2 \sinh (x)}{\left (a^2-b^2\right )^2}+\frac {a \sinh (x)}{a^2-b^2}-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {b^3 \cosh (x)}{\left (a^2-b^2\right )^2}+\frac {b^4 \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2633
Rule 2637
Rule 3486
Rule 3509
Rule 3511
Rubi steps
\begin {align*} \int \frac {\cosh ^3(x)}{a+b \tanh (x)} \, dx &=\frac {\int \cosh ^3(x) (a-b \tanh (x)) \, dx}{a^2-b^2}-\frac {b^2 \int \frac {\cosh (x)}{a+b \tanh (x)} \, dx}{a^2-b^2}\\ &=-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {b^2 \int \cosh (x) (a-b \tanh (x)) \, dx}{\left (a^2-b^2\right )^2}+\frac {b^4 \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{\left (a^2-b^2\right )^2}+\frac {a \int \cosh ^3(x) \, dx}{a^2-b^2}\\ &=\frac {b^3 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {\left (a b^2\right ) \int \cosh (x) \, dx}{\left (a^2-b^2\right )^2}+\frac {\left (i b^4\right ) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,\cosh (x) (-i b-i a \tanh (x))\right )}{\left (a^2-b^2\right )^2}+\frac {(i a) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-i \sinh (x)\right )}{a^2-b^2}\\ &=\frac {b^4 \tan ^{-1}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\frac {b^3 \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {a b^2 \sinh (x)}{\left (a^2-b^2\right )^2}+\frac {a \sinh (x)}{a^2-b^2}+\frac {a \sinh ^3(x)}{3 \left (a^2-b^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.48, size = 258, normalized size = 1.95 \[ \frac {9 a^4 \sqrt {a-b} \sinh (x)+a^4 \sqrt {a-b} \sinh (3 x)+9 a^3 b \sqrt {a-b} \sinh (x)+a^3 b \sqrt {a-b} \sinh (3 x)-21 a^2 b^2 \sqrt {a-b} \sinh (x)-a^2 b^2 \sqrt {a-b} \sinh (3 x)-3 b \sqrt {a-b} \left (a^3+a^2 b-5 a b^2-5 b^3\right ) \cosh (x)+24 b^4 \sqrt {a+b} \tan ^{-1}\left (\frac {a \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a-b} \sqrt {a+b}}\right )-21 a b^3 \sqrt {a-b} \sinh (x)-a b^3 \sqrt {a-b} \sinh (3 x)-b (a-b)^{3/2} (a+b)^2 \cosh (3 x)}{12 (a-b)^{5/2} (a+b)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.71, size = 1871, normalized size = 14.17 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 162, normalized size = 1.23 \[ \frac {2 \, b^{4} \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 )} - 15 \, 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} + 24 \, a b e^{x} + 15 \, b^{2} e^{x}}{24 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 198, normalized size = 1.50 \[ \frac {2 b^{4} \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}}}-\frac {2}{3 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3} \left (2 b +2 a \right )}-\frac {1}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {a}{\left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {3 b}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {2}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3} \left (2 a -2 b \right )}+\frac {1}{\left (2 a -2 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {a}{\left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {3 b}{2 \left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.25, size = 221, normalized size = 1.67 \[ \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-5\,b\right )}{8\,{\left (a-b\right )}^2}+\frac {{\mathrm {e}}^x\,\left (3\,a+5\,b\right )}{8\,{\left (a+b\right )}^2}-\frac {b^4\,\ln \left (-\frac {2\,b^4\,{\mathrm {e}}^x}{a^5+a^4\,b-2\,a^3\,b^2-2\,a^2\,b^3+a\,b^4+b^5}-\frac {2\,b^4}{{\left (a+b\right )}^{7/2}\,{\left (b-a\right )}^{3/2}}\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/2}}+\frac {b^4\,\ln \left (\frac {2\,b^4}{{\left (a+b\right )}^{7/2}\,{\left (b-a\right )}^{3/2}}-\frac {2\,b^4\,{\mathrm {e}}^x}{a^5+a^4\,b-2\,a^3\,b^2-2\,a^2\,b^3+a\,b^4+b^5}\right )}{{\left (a+b\right )}^{5/2}\,{\left (b-a\right )}^{5/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 {\cosh ^{3}{\relax (x )}}{a + b \tanh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________