Optimal. Leaf size=124 \[ -\frac {1}{8} a b^2 \left (3 a^2+7 b^2\right ) \sinh (x)-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )+\frac {1}{8} a \left (3 a^4+10 a^2 b^2+15 b^4\right ) \tan ^{-1}(\sinh (x))-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4+b^5 \log (\cosh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {4391, 2668, 739, 819, 774, 635, 204, 260} \[ -\frac {1}{8} a b^2 \left (3 a^2+7 b^2\right ) \sinh (x)+\frac {1}{8} a \left (10 a^2 b^2+3 a^4+15 b^4\right ) \tan ^{-1}(\sinh (x))-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4+b^5 \log (\cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 260
Rule 635
Rule 739
Rule 774
Rule 819
Rule 2668
Rule 4391
Rubi steps
\begin {align*} \int (a \text {sech}(x)+b \tanh (x))^5 \, dx &=\int \text {sech}^5(x) (a+b \sinh (x))^5 \, dx\\ &=-\left (b^5 \operatorname {Subst}\left (\int \frac {(a+x)^5}{\left (-b^2-x^2\right )^3} \, dx,x,b \sinh (x)\right )\right )\\ &=-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4-\frac {1}{4} b^3 \operatorname {Subst}\left (\int \frac {(a+x)^3 \left (-3 a^2-4 b^2+a x\right )}{\left (-b^2-x^2\right )^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )-\frac {1}{8} b \operatorname {Subst}\left (\int \frac {(a+x) \left (3 a^4+7 a^2 b^2+8 b^4-a \left (3 a^2+7 b^2\right ) x\right )}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{8} a b^2 \left (3 a^2+7 b^2\right ) \sinh (x)-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )+\frac {1}{8} b \operatorname {Subst}\left (\int \frac {-a b^2 \left (3 a^2+7 b^2\right )-a \left (3 a^4+7 a^2 b^2+8 b^4\right )-\left (3 a^4+7 a^2 b^2+8 b^4-a^2 \left (3 a^2+7 b^2\right )\right ) x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=-\frac {1}{8} a b^2 \left (3 a^2+7 b^2\right ) \sinh (x)-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )-b^5 \operatorname {Subst}\left (\int \frac {x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )-\frac {1}{8} \left (a b \left (3 a^4+10 a^2 b^2+15 b^4\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-b^2-x^2} \, dx,x,b \sinh (x)\right )\\ &=\frac {1}{8} a \left (3 a^4+10 a^2 b^2+15 b^4\right ) \tan ^{-1}(\sinh (x))+b^5 \log (\cosh (x))-\frac {1}{8} a b^2 \left (3 a^2+7 b^2\right ) \sinh (x)-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4-\frac {1}{8} \text {sech}^2(x) (a+b \sinh (x))^2 \left (2 b \left (a^2+2 b^2\right )-a \left (3 a^2+5 b^2\right ) \sinh (x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.96, size = 355, normalized size = 2.86 \[ \frac {\frac {2 \text {sech}^2(x) \left (a \left (3 a^2-5 b^2\right ) \sinh (x)+6 a^2 b-2 b^3\right ) (a+b \sinh (x))^6}{a^2+b^2}+\frac {b \left (2 a b^5 \left (5 b^2-3 a^2\right ) \sinh ^5(x)+4 b^4 \left (-9 a^4+12 a^2 b^2+b^4\right ) \sinh ^4(x)+10 a b^3 \left (-9 a^4+8 a^2 b^2+b^4\right ) \sinh ^3(x)-8 b^2 \left (15 a^6-4 a^4 b^2+2 a^2 b^4+b^6\right ) \sinh ^2(x)-10 a b \left (9 a^6+6 a^4 b^2+8 a^2 b^4+3 b^6\right ) \sinh (x)+\frac {\left (a^2+b^2\right )^2 \left (\left (3 a^5+10 a^3 b^2+15 a b^4+8 b^4 \sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}-b \sinh (x)\right )+\left (-3 a^5-10 a^3 b^2-15 a b^4+8 \left (-b^2\right )^{5/2}\right ) \log \left (\sqrt {-b^2}+b \sinh (x)\right )\right )}{\sqrt {-b^2}}\right )}{a^2+b^2}+4 \text {sech}^4(x) (a \sinh (x)+b) (a+b \sinh (x))^6}{16 \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 2040, normalized size = 16.45 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 240, normalized size = 1.94 \[ \frac {1}{2} \, b^{5} \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right ) + \frac {1}{16} \, {\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} {\left (3 \, a^{5} + 10 \, a^{3} b^{2} + 15 \, a b^{4}\right )} - \frac {3 \, b^{5} {\left (e^{\left (-x\right )} - e^{x}\right )}^{4} + 3 \, a^{5} {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} + 10 \, a^{3} b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} - 25 \, a b^{4} {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} + 80 \, a^{2} b^{3} {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 8 \, b^{5} {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 20 \, a^{5} {\left (e^{\left (-x\right )} - e^{x}\right )} - 40 \, a^{3} b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} - 60 \, a b^{4} {\left (e^{\left (-x\right )} - e^{x}\right )} + 80 \, a^{4} b + 160 \, a^{2} b^{3}}{4 \, {\left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 201, normalized size = 1.62 \[ \frac {a^{5} \tanh \relax (x ) \mathrm {sech}\relax (x )^{3}}{4}+\frac {3 a^{5} \mathrm {sech}\relax (x ) \tanh \relax (x )}{8}+\frac {3 a^{5} \arctan \left ({\mathrm e}^{x}\right )}{4}-\frac {5 a^{4} b}{4 \cosh \relax (x )^{4}}-\frac {10 a^{3} b^{2} \sinh \relax (x )}{3 \cosh \relax (x )^{4}}+\frac {5 a^{3} b^{2} \tanh \relax (x ) \mathrm {sech}\relax (x )^{3}}{6}+\frac {5 a^{3} b^{2} \mathrm {sech}\relax (x ) \tanh \relax (x )}{4}+\frac {5 a^{3} b^{2} \arctan \left ({\mathrm e}^{x}\right )}{2}-\frac {5 a^{2} b^{3} \left (\sinh ^{2}\relax (x )\right )}{\cosh \relax (x )^{4}}-\frac {5 a^{2} b^{3}}{2 \cosh \relax (x )^{4}}-\frac {5 a \,b^{4} \left (\sinh ^{3}\relax (x )\right )}{\cosh \relax (x )^{4}}-\frac {5 a \,b^{4} \sinh \relax (x )}{\cosh \relax (x )^{4}}+\frac {5 a \,b^{4} \tanh \relax (x ) \mathrm {sech}\relax (x )^{3}}{4}+\frac {15 a \,b^{4} \mathrm {sech}\relax (x ) \tanh \relax (x )}{8}+\frac {15 a \,b^{4} \arctan \left ({\mathrm e}^{x}\right )}{4}+b^{5} \ln \left (\cosh \relax (x )\right )-\frac {b^{5} \left (\tanh ^{2}\relax (x )\right )}{2}-\frac {b^{5} \left (\tanh ^{4}\relax (x )\right )}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.54, size = 279, normalized size = 2.25 \[ \frac {5}{2} \, a^{2} b^{3} \tanh \relax (x)^{4} + b^{5} {\left (x + \frac {4 \, {\left (e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )}\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} + \log \left (e^{\left (-2 \, x\right )} + 1\right )\right )} - \frac {5}{4} \, a b^{4} {\left (\frac {5 \, e^{\left (-x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-5 \, x\right )} - 5 \, e^{\left (-7 \, x\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} + 3 \, \arctan \left (e^{\left (-x\right )}\right )\right )} + \frac {1}{4} \, a^{5} {\left (\frac {3 \, e^{\left (-x\right )} + 11 \, e^{\left (-3 \, x\right )} - 11 \, e^{\left (-5 \, x\right )} - 3 \, e^{\left (-7 \, x\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} - 3 \, \arctan \left (e^{\left (-x\right )}\right )\right )} + \frac {5}{2} \, a^{3} b^{2} {\left (\frac {e^{\left (-x\right )} - 7 \, e^{\left (-3 \, x\right )} + 7 \, e^{\left (-5 \, x\right )} - e^{\left (-7 \, x\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} - \arctan \left (e^{\left (-x\right )}\right )\right )} - \frac {20 \, a^{4} b}{{\left (e^{\left (-x\right )} + e^{x}\right )}^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.92, size = 495, normalized size = 3.99 \[ \frac {{\mathrm {e}}^x\,\left (4\,a^5-40\,a^3\,b^2+20\,a\,b^4\right )-20\,a^4\,b-4\,b^5+40\,a^2\,b^3}{4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1}+b^5\,\ln \left (\left (\frac {3\,a^5\,{\mathrm {e}}^x}{4}-2\,\sqrt {-\frac {9\,a^{10}}{64}-\frac {15\,a^8\,b^2}{16}-\frac {95\,a^6\,b^4}{32}-\frac {75\,a^4\,b^6}{16}-\frac {225\,a^2\,b^8}{64}}+\frac {15\,a\,b^4\,{\mathrm {e}}^x}{4}+\frac {5\,a^3\,b^2\,{\mathrm {e}}^x}{2}\right )\,\left (2\,\sqrt {-\frac {9\,a^{10}}{64}-\frac {15\,a^8\,b^2}{16}-\frac {95\,a^6\,b^4}{32}-\frac {75\,a^4\,b^6}{16}-\frac {225\,a^2\,b^8}{64}}+\frac {3\,a^5\,{\mathrm {e}}^x}{4}+\frac {15\,a\,b^4\,{\mathrm {e}}^x}{4}+\frac {5\,a^3\,b^2\,{\mathrm {e}}^x}{2}\right )\right )-\frac {{\mathrm {e}}^x\,\left (6\,a^5-60\,a^3\,b^2+30\,a\,b^4\right )-40\,a^4\,b-8\,b^5+80\,a^2\,b^3}{3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1}-b^5\,x+\frac {\mathrm {atan}\left (\frac {4\,{\mathrm {e}}^x\,\left (\frac {3\,a^5}{4}+\frac {5\,a^3\,b^2}{2}+\frac {15\,a\,b^4}{4}\right )}{\sqrt {9\,a^{10}+60\,a^8\,b^2+190\,a^6\,b^4+300\,a^4\,b^6+225\,a^2\,b^8}}\right )\,\sqrt {9\,a^{10}+60\,a^8\,b^2+190\,a^6\,b^4+300\,a^4\,b^6+225\,a^2\,b^8}}{4}+\frac {{\mathrm {e}}^x\,\left (\frac {3\,a^5}{4}+\frac {5\,a^3\,b^2}{2}-\frac {25\,a\,b^4}{4}\right )+4\,b^5-20\,a^2\,b^3}{{\mathrm {e}}^{2\,x}+1}+\frac {{\mathrm {e}}^x\,\left (\frac {a^5}{2}-25\,a^3\,b^2+\frac {45\,a\,b^4}{2}\right )-20\,a^4\,b-8\,b^5+60\,a^2\,b^3}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \operatorname {sech}{\relax (x )} + b \tanh {\relax (x )}\right )^{5}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________