Optimal. Leaf size=132 \[ \frac {b^4 \text {ArcTan}\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 )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, 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 = {3592, 3567,
2713, 2717, 3590, 212} \begin {gather*} \frac {b^4 \text {ArcTan}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+\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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2713
Rule 2717
Rule 3567
Rule 3590
Rule 3592
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 ) \text {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) \text {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.32, size = 258, normalized size = 1.95 \begin {gather*} \frac {24 b^4 \sqrt {a+b} \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )-3 \sqrt {a-b} b \left (a^3+a^2 b-5 a b^2-5 b^3\right ) \cosh (x)-(a-b)^{3/2} b (a+b)^2 \cosh (3 x)+9 a^4 \sqrt {a-b} \sinh (x)+9 a^3 \sqrt {a-b} b \sinh (x)-21 a^2 \sqrt {a-b} b^2 \sinh (x)-21 a \sqrt {a-b} b^3 \sinh (x)+a^4 \sqrt {a-b} \sinh (3 x)+a^3 \sqrt {a-b} b \sinh (3 x)-a^2 \sqrt {a-b} b^2 \sinh (3 x)-a \sqrt {a-b} b^3 \sinh (3 x)}{12 (a-b)^{5/2} (a+b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.71, size = 176, normalized size = 1.33
method | result | size |
risch | \(\frac {{\mathrm e}^{3 x}}{24 a +24 b}+\frac {3 \,{\mathrm e}^{x} a}{8 \left (a +b \right )^{2}}+\frac {5 \,{\mathrm e}^{x} b}{8 \left (a +b \right )^{2}}-\frac {3 \,{\mathrm e}^{-x} a}{8 \left (a -b \right )^{2}}+\frac {5 \,{\mathrm e}^{-x} b}{8 \left (a -b \right )^{2}}-\frac {{\mathrm e}^{-3 x}}{24 \left (a -b \right )}-\frac {b^{4} \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^{4} \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}}\) | \(172\) |
default | \(-\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 {2 a -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 b +2 a \right )}-\frac {1}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {2 a +3 b}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\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}}}\) | \(176\) |
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. 908 vs.
\(2 (124) = 248\).
time = 0.41, size = 1871, normalized size = 14.17 \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 {\cosh ^{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.41, size = 162, normalized size = 1.23 \begin {gather*} \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 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.25, size = 221, normalized size = 1.67 \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-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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________