Optimal. Leaf size=124 \[ -\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)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.185464, antiderivative size = 124, normalized size of antiderivative = 1., 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 4391
Rule 2668
Rule 739
Rule 819
Rule 774
Rule 635
Rule 204
Rule 260
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.87455, size = 355, normalized size = 2.86 \[ \frac{\frac{b \left (2 a b^5 \left (5 b^2-3 a^2\right ) \sinh ^5(x)+4 b^4 \left (12 a^2 b^2-9 a^4+b^4\right ) \sinh ^4(x)+10 a b^3 \left (8 a^2 b^2-9 a^4+b^4\right ) \sinh ^3(x)-8 b^2 \left (-4 a^4 b^2+2 a^2 b^4+15 a^6+b^6\right ) \sinh ^2(x)-10 a b \left (6 a^4 b^2+8 a^2 b^4+9 a^6+3 b^6\right ) \sinh (x)+\frac{\left (a^2+b^2\right )^2 \left (\left (10 a^3 b^2+3 a^5+15 a b^4+8 b^4 \sqrt{-b^2}\right ) \log \left (\sqrt{-b^2}-b \sinh (x)\right )+\left (-10 a^3 b^2-3 a^5-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}+\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}+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]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 223, normalized size = 1.8 \begin{align*}{\frac{{a}^{5}\tanh \left ( x \right ) \left ({\rm sech} \left (x\right ) \right ) ^{3}}{4}}+{\frac{3\,{a}^{5}{\rm sech} \left (x\right )\tanh \left ( x \right ) }{8}}+{\frac{3\,{a}^{5}\arctan \left ({{\rm e}^{x}} \right ) }{4}}+{\frac{5\,{a}^{4}b \left ( \sinh \left ( x \right ) \right ) ^{2}}{4\, \left ( \cosh \left ( x \right ) \right ) ^{4}}}+{\frac{5\,{a}^{4}b \left ( \sinh \left ( x \right ) \right ) ^{2}}{4\, \left ( \cosh \left ( x \right ) \right ) ^{2}}}-{\frac{10\,{a}^{3}{b}^{2}\sinh \left ( x \right ) }{3\, \left ( \cosh \left ( x \right ) \right ) ^{4}}}+{\frac{5\,{a}^{3}{b}^{2}\tanh \left ( x \right ) \left ({\rm sech} \left (x\right ) \right ) ^{3}}{6}}+{\frac{5\,{a}^{3}{b}^{2}{\rm sech} \left (x\right )\tanh \left ( x \right ) }{4}}+{\frac{5\,{a}^{3}{b}^{2}\arctan \left ({{\rm e}^{x}} \right ) }{2}}-{\frac{5\,{a}^{2}{b}^{3} \left ( \sinh \left ( x \right ) \right ) ^{2}}{2\, \left ( \cosh \left ( x \right ) \right ) ^{4}}}+{\frac{5\,{a}^{2}{b}^{3} \left ( \sinh \left ( x \right ) \right ) ^{2}}{2\, \left ( \cosh \left ( x \right ) \right ) ^{2}}}-5\,{\frac{{b}^{4}a \left ( \sinh \left ( x \right ) \right ) ^{3}}{ \left ( \cosh \left ( x \right ) \right ) ^{4}}}-5\,{\frac{{b}^{4}a\sinh \left ( x \right ) }{ \left ( \cosh \left ( x \right ) \right ) ^{4}}}+{\frac{5\,{b}^{4}a\tanh \left ( x \right ) \left ({\rm sech} \left (x\right ) \right ) ^{3}}{4}}+{\frac{15\,{b}^{4}a{\rm sech} \left (x\right )\tanh \left ( x \right ) }{8}}+{\frac{15\,{b}^{4}a\arctan \left ({{\rm e}^{x}} \right ) }{4}}+{b}^{5}\ln \left ( \cosh \left ( x \right ) \right ) -{\frac{{b}^{5} \left ( \tanh \left ( x \right ) \right ) ^{2}}{2}}-{\frac{{b}^{5} \left ( \tanh \left ( x \right ) \right ) ^{4}}{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.6891, size = 377, normalized size = 3.04 \begin{align*} \frac{5}{2} \, a^{2} b^{3} \tanh \left (x\right )^{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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.81096, size = 5216, normalized size = 42.06 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \operatorname{sech}{\left (x \right )} + b \tanh{\left (x \right )}\right )^{5}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13656, size = 324, normalized size = 2.61 \begin{align*} \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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]