Optimal. Leaf size=112 \[ \frac {2 b^4 \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 \sqrt {a-b} \sqrt {a+b}}-\frac {b \sinh (x) \cosh (x)}{2 a^2}-\frac {b x \left (a^2+2 b^2\right )}{2 a^4}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}+\frac {\sinh (x) \cosh ^2(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3853, 4104, 3919, 3831, 2659, 205} \[ -\frac {b x \left (a^2+2 b^2\right )}{2 a^4}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}+\frac {2 b^4 \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 \sqrt {a-b} \sqrt {a+b}}-\frac {b \sinh (x) \cosh (x)}{2 a^2}+\frac {\sinh (x) \cosh ^2(x)}{3 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 2659
Rule 3831
Rule 3853
Rule 3919
Rule 4104
Rubi steps
\begin {align*} \int \frac {\cosh ^3(x)}{a+b \text {sech}(x)} \, dx &=\frac {\cosh ^2(x) \sinh (x)}{3 a}+\frac {\int \frac {\cosh ^2(x) \left (-3 b+2 a \text {sech}(x)+2 b \text {sech}^2(x)\right )}{a+b \text {sech}(x)} \, dx}{3 a}\\ &=-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}-\frac {\int \frac {\cosh (x) \left (-2 \left (2 a^2+3 b^2\right )-a b \text {sech}(x)+3 b^2 \text {sech}^2(x)\right )}{a+b \text {sech}(x)} \, dx}{6 a^2}\\ &=\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}+\frac {\int \frac {-3 b \left (a^2+2 b^2\right )-3 a b^2 \text {sech}(x)}{a+b \text {sech}(x)} \, dx}{6 a^3}\\ &=-\frac {b \left (a^2+2 b^2\right ) x}{2 a^4}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}+\frac {b^4 \int \frac {\text {sech}(x)}{a+b \text {sech}(x)} \, dx}{a^4}\\ &=-\frac {b \left (a^2+2 b^2\right ) x}{2 a^4}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}+\frac {b^3 \int \frac {1}{1+\frac {a \cosh (x)}{b}} \, dx}{a^4}\\ &=-\frac {b \left (a^2+2 b^2\right ) x}{2 a^4}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}+\frac {\left (2 b^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^4}\\ &=-\frac {b \left (a^2+2 b^2\right ) x}{2 a^4}+\frac {2 b^4 \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 \sqrt {a-b} \sqrt {a+b}}+\frac {\left (2 a^2+3 b^2\right ) \sinh (x)}{3 a^3}-\frac {b \cosh (x) \sinh (x)}{2 a^2}+\frac {\cosh ^2(x) \sinh (x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 99, normalized size = 0.88 \[ \frac {a^3 \sinh (3 x)-6 b x \left (a^2+2 b^2\right )+3 a \left (3 a^2+4 b^2\right ) \sinh (x)-\frac {24 b^4 \tan ^{-1}\left (\frac {(b-a) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-3 a^2 b \sinh (2 x)}{12 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 1562, normalized size = 13.95 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 133, normalized size = 1.19 \[ \frac {2 \, b^{4} \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a^{4}} + \frac {a^{2} e^{\left (3 \, x\right )} - 3 \, a b e^{\left (2 \, x\right )} + 9 \, a^{2} e^{x} + 12 \, b^{2} e^{x}}{24 \, a^{3}} - \frac {{\left (a^{2} b + 2 \, b^{3}\right )} x}{2 \, a^{4}} + \frac {{\left (3 \, a^{2} b e^{x} - a^{3} - 3 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} e^{\left (2 \, x\right )}\right )} e^{\left (-3 \, x\right )}}{24 \, a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.15, size = 264, normalized size = 2.36 \[ -\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{2 a \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {1}{a \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {b^{2}}{a^{3} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {b \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 a^{2}}+\frac {b^{3} \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a^{4}}+\frac {2 b^{4} \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {1}{2 a \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {1}{a \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {b^{2}}{a^{3} \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {b \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 a^{2}}-\frac {b^{3} \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a^{4}} \]
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 = 1.71, size = 209, normalized size = 1.87 \[ \frac {{\mathrm {e}}^{3\,x}}{24\,a}-\frac {{\mathrm {e}}^{-3\,x}}{24\,a}-\frac {x\,\left (a^2\,b+2\,b^3\right )}{2\,a^4}+\frac {{\mathrm {e}}^x\,\left (3\,a^2+4\,b^2\right )}{8\,a^3}+\frac {b\,{\mathrm {e}}^{-2\,x}}{8\,a^2}-\frac {b\,{\mathrm {e}}^{2\,x}}{8\,a^2}-\frac {{\mathrm {e}}^{-x}\,\left (3\,a^2+4\,b^2\right )}{8\,a^3}+\frac {b^4\,\ln \left (-\frac {2\,b^4\,{\mathrm {e}}^x}{a^5}-\frac {2\,b^4\,\left (a+b\,{\mathrm {e}}^x\right )}{a^5\,\sqrt {a+b}\,\sqrt {b-a}}\right )}{a^4\,\sqrt {a+b}\,\sqrt {b-a}}-\frac {b^4\,\ln \left (\frac {2\,b^4\,\left (a+b\,{\mathrm {e}}^x\right )}{a^5\,\sqrt {a+b}\,\sqrt {b-a}}-\frac {2\,b^4\,{\mathrm {e}}^x}{a^5}\right )}{a^4\,\sqrt {a+b}\,\sqrt {b-a}} \]
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 \operatorname {sech}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________