Optimal. Leaf size=135 \[ \frac {a^3 b \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}-\frac {a^2 b \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.18, antiderivative size = 135, 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,
2713, 2645, 30, 3179, 2717, 3153, 212} \begin {gather*} \frac {a \sinh ^3(x)}{3 \left (a^2-b^2\right )}+\frac {a \sinh (x)}{a^2-b^2}+\frac {a b^2 \sinh (x)}{\left (a^2-b^2\right )^2}-\frac {b \cosh ^3(x)}{3 \left (a^2-b^2\right )}-\frac {a^2 b \cosh (x)}{\left (a^2-b^2\right )^2}+\frac {a^3 b \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (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 2645
Rule 2713
Rule 2717
Rule 3153
Rule 3179
Rule 3188
Rule 3599
Rubi steps
\begin {align*} \int \frac {\cosh ^3(x)}{a+b \coth (x)} \, dx &=-\left (i \int \frac {\cosh ^3(x) \sinh (x)}{-i b \cosh (x)-i a \sinh (x)} \, dx\right )\\ &=\frac {a \int \cosh ^3(x) \, dx}{a^2-b^2}-\frac {b \int \cosh ^2(x) \sinh (x) \, dx}{a^2-b^2}+\frac {(i a b) \int \frac {\cosh ^2(x)}{-i b \cosh (x)-i a \sinh (x)} \, dx}{a^2-b^2}\\ &=-\frac {a^2 b \cosh (x)}{\left (a^2-b^2\right )^2}+\frac {\left (i a^3 b\right ) \int \frac {1}{-i b \cosh (x)-i a \sinh (x)} \, dx}{\left (a^2-b^2\right )^2}+\frac {\left (a b^2\right ) \int \cosh (x) \, dx}{\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 \text {Subst}\left (\int x^2 \, dx,x,\cosh (x)\right )}{a^2-b^2}\\ &=-\frac {a^2 b \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 )}-\frac {\left (a^3 b\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-a \cosh (x)-b \sinh (x)\right )}{\left (a^2-b^2\right )^2}\\ &=\frac {a^3 b \tanh ^{-1}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}-\frac {a^2 b \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 = 1.01, size = 167, normalized size = 1.24 \begin {gather*} \frac {1}{12} \left (-\frac {24 a^3 b \text {ArcTan}\left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a+b} \sqrt {a+b}}\right )}{(-a+b)^{5/2} (a+b)^{5/2}}+\frac {3 b \left (-5 a^2+b^2\right ) \cosh (x)}{(a-b)^2 (a+b)^2}+\frac {b \cosh (3 x)}{(-a+b) (a+b)}+\frac {3 a \left (3 a^2+b^2\right ) \sinh (x)}{(a-b)^2 (a+b)^2}+\frac {a^3 \sinh (3 x)}{(a-b)^2 (a+b)^2}-\frac {a b^2 \sinh (3 x)}{(a-b)^2 (a+b)^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.73, size = 176, normalized size = 1.30
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 {{\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 \left (a -b \right )}+\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\) |
default | \(-\frac {4}{3 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3} \left (4 a +4 b \right )}-\frac {2}{\left (4 a +4 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {2 a +b}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {2 a^{3} b \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{\left (a -b \right )^{2} \left (a +b \right )^{2} \sqrt {-a^{2}+b^{2}}}-\frac {4}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3} \left (4 a -4 b \right )}+\frac {2}{\left (4 a -4 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {-b +2 a}{2 \left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}\) | \(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. 909 vs.
\(2 (127) = 254\).
time = 0.41, size = 1873, normalized size = 13.87 \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 \coth {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 164, normalized size = 1.21 \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 = 2.04, size = 262, normalized size = 1.94 \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]
________________________________________________________________________________________