Optimal. Leaf size=124 \[ \frac {1}{8} a \left (3 a^4+10 a^2 b^2+15 b^4\right ) \text {ArcTan}(\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, 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 = {4476, 2747,
753, 833, 788, 649, 210, 266} \begin {gather*} -\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 ) \text {ArcTan}(\sinh (x))-\frac {1}{4} \text {sech}^4(x) (b-a \sinh (x)) (a+b \sinh (x))^4+b^5 \log (\cosh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 266
Rule 649
Rule 753
Rule 788
Rule 833
Rule 2747
Rule 4476
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 \text {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 \text {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 \text {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 \text {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 \text {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 ) \text {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] Leaf count is larger than twice the leaf count of optimal. \(355\) vs. \(2(124)=248\).
time = 1.29, size = 355, normalized size = 2.86 \begin {gather*} \frac {4 \text {sech}^4(x) (b+a \sinh (x)) (a+b \sinh (x))^6+\frac {2 \text {sech}^2(x) (a+b \sinh (x))^6 \left (6 a^2 b-2 b^3+a \left (3 a^2-5 b^2\right ) \sinh (x)\right )}{a^2+b^2}+\frac {b \left (\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}}-10 a b \left (9 a^6+6 a^4 b^2+8 a^2 b^4+3 b^6\right ) \sinh (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^3 \left (-9 a^4+8 a^2 b^2+b^4\right ) \sinh ^3(x)+4 b^4 \left (-9 a^4+12 a^2 b^2+b^4\right ) \sinh ^4(x)+2 a b^5 \left (-3 a^2+5 b^2\right ) \sinh ^5(x)\right )}{a^2+b^2}}{16 \left (a^2+b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 1.03, size = 290, normalized size = 2.34
method | result | size |
risch | \(-b^{5} x +\frac {{\mathrm e}^{x} \left (3 a^{5} {\mathrm e}^{6 x}+10 a^{3} b^{2} {\mathrm e}^{6 x}-25 a \,b^{4} {\mathrm e}^{6 x}-80 a^{2} b^{3} {\mathrm e}^{5 x}+16 \,{\mathrm e}^{5 x} b^{5}+11 a^{5} {\mathrm e}^{4 x}-70 a^{3} b^{2} {\mathrm e}^{4 x}+15 a \,b^{4} {\mathrm e}^{4 x}-80 \,{\mathrm e}^{3 x} a^{4} b +16 \,{\mathrm e}^{3 x} b^{5}-11 a^{5} {\mathrm e}^{2 x}+70 a^{3} b^{2} {\mathrm e}^{2 x}-15 a \,b^{4} {\mathrm e}^{2 x}-80 a^{2} b^{3} {\mathrm e}^{x}+16 b^{5} {\mathrm e}^{x}-3 a^{5}-10 a^{3} b^{2}+25 a \,b^{4}\right )}{4 \left (1+{\mathrm e}^{2 x}\right )^{4}}+\frac {3 i \ln \left ({\mathrm e}^{x}+i\right ) a^{5}}{8}+\frac {5 i \ln \left ({\mathrm e}^{x}+i\right ) a^{3} b^{2}}{4}+\frac {15 i \ln \left ({\mathrm e}^{x}+i\right ) a \,b^{4}}{8}+\ln \left ({\mathrm e}^{x}+i\right ) b^{5}-\frac {3 i \ln \left ({\mathrm e}^{x}-i\right ) a^{5}}{8}-\frac {5 i \ln \left ({\mathrm e}^{x}-i\right ) a^{3} b^{2}}{4}-\frac {15 i \ln \left ({\mathrm e}^{x}-i\right ) a \,b^{4}}{8}+\ln \left ({\mathrm e}^{x}-i\right ) b^{5}\) | \(290\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 279 vs.
\(2 (116) = 232\).
time = 0.47, size = 279, normalized size = 2.25 \begin {gather*} \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 {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. 2040 vs.
\(2 (116) = 232\).
time = 0.46, size = 2040, normalized size = 16.45 \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 \left (a \operatorname {sech}{\left (x \right )} + b \tanh {\left (x \right )}\right )^{5}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 240 vs.
\(2 (116) = 232\).
time = 0.42, size = 240, normalized size = 1.94 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.92, size = 495, normalized size = 3.99 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________