Optimal. Leaf size=30 \[ -\frac {\text {sech}(x)}{a}+\frac {\text {sech}^3(x)}{3 a}-\frac {\tanh ^4(x)}{4 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2785, 2687, 30,
2686} \begin {gather*} -\frac {\tanh ^4(x)}{4 a}+\frac {\text {sech}^3(x)}{3 a}-\frac {\text {sech}(x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2686
Rule 2687
Rule 2785
Rubi steps
\begin {align*} \int \frac {\tanh ^5(x)}{a+a \cosh (x)} \, dx &=\frac {\int \text {sech}(x) \tanh ^3(x) \, dx}{a}-\frac {\int \text {sech}^2(x) \tanh ^3(x) \, dx}{a}\\ &=-\frac {\text {Subst}\left (\int x^3 \, dx,x,i \tanh (x)\right )}{a}+\frac {\text {Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\text {sech}(x)\right )}{a}\\ &=-\frac {\text {sech}(x)}{a}+\frac {\text {sech}^3(x)}{3 a}-\frac {\tanh ^4(x)}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 25, normalized size = 0.83 \begin {gather*} \frac {2 (3+5 \cosh (x)) \text {sech}^4(x) \sinh ^6\left (\frac {x}{2}\right )}{3 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.58, size = 30, normalized size = 1.00
method | result | size |
derivativedivides | \(\frac {-\frac {1}{\cosh \left (x \right )}+\frac {1}{3 \cosh \left (x \right )^{3}}+\frac {1}{2 \cosh \left (x \right )^{2}}-\frac {1}{4 \cosh \left (x \right )^{4}}}{a}\) | \(30\) |
default | \(\frac {-\frac {1}{\cosh \left (x \right )}+\frac {1}{3 \cosh \left (x \right )^{3}}+\frac {1}{2 \cosh \left (x \right )^{2}}-\frac {1}{4 \cosh \left (x \right )^{4}}}{a}\) | \(30\) |
risch | \(-\frac {2 \,{\mathrm e}^{x} \left (3 \,{\mathrm e}^{6 x}-3 \,{\mathrm e}^{5 x}+5 \,{\mathrm e}^{4 x}+5 \,{\mathrm e}^{2 x}-3 \,{\mathrm e}^{x}+3\right )}{3 \left (1+{\mathrm e}^{2 x}\right )^{4} a}\) | \(46\) |
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. 223 vs.
\(2 (26) = 52\).
time = 0.26, size = 223, normalized size = 7.43 \begin {gather*} -\frac {2 \, e^{\left (-x\right )}}{4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a} + \frac {2 \, e^{\left (-2 \, x\right )}}{4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a} - \frac {10 \, e^{\left (-3 \, x\right )}}{3 \, {\left (4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a\right )}} - \frac {10 \, e^{\left (-5 \, x\right )}}{3 \, {\left (4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a\right )}} + \frac {2 \, e^{\left (-6 \, x\right )}}{4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a} - \frac {2 \, e^{\left (-7 \, x\right )}}{4 \, a e^{\left (-2 \, x\right )} + 6 \, a e^{\left (-4 \, x\right )} + 4 \, a e^{\left (-6 \, x\right )} + a e^{\left (-8 \, x\right )} + a} \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. 174 vs.
\(2 (26) = 52\).
time = 0.42, size = 174, normalized size = 5.80 \begin {gather*} -\frac {2 \, {\left (3 \, \cosh \left (x\right )^{4} + 3 \, {\left (4 \, \cosh \left (x\right ) - 1\right )} \sinh \left (x\right )^{3} + 3 \, \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{3} + {\left (18 \, \cosh \left (x\right )^{2} - 9 \, \cosh \left (x\right ) + 8\right )} \sinh \left (x\right )^{2} + 8 \, \cosh \left (x\right )^{2} + {\left (12 \, \cosh \left (x\right )^{3} - 9 \, \cosh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) + 3\right )} \sinh \left (x\right ) - 3 \, \cosh \left (x\right ) + 5\right )}}{3 \, {\left (a \cosh \left (x\right )^{5} + 5 \, a \cosh \left (x\right ) \sinh \left (x\right )^{4} + a \sinh \left (x\right )^{5} + 5 \, a \cosh \left (x\right )^{3} + {\left (10 \, a \cosh \left (x\right )^{2} + 3 \, a\right )} \sinh \left (x\right )^{3} + 5 \, {\left (2 \, a \cosh \left (x\right )^{3} + 3 \, a \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 10 \, a \cosh \left (x\right ) + {\left (5 \, a \cosh \left (x\right )^{4} + 9 \, a \cosh \left (x\right )^{2} + 2 \, a\right )} \sinh \left (x\right )\right )}} \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*} \frac {\int \frac {\tanh ^{5}{\left (x \right )}}{\cosh {\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 48, normalized size = 1.60 \begin {gather*} -\frac {2 \, {\left (3 \, {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 3 \, {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 4 \, e^{\left (-x\right )} - 4 \, e^{x} + 6\right )}}{3 \, a {\left (e^{\left (-x\right )} + e^{x}\right )}^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.01, size = 117, normalized size = 3.90 \begin {gather*} \frac {\frac {8}{a}-\frac {8\,{\mathrm {e}}^x}{3\,a}}{3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1}-\frac {\frac {6}{a}-\frac {8\,{\mathrm {e}}^x}{3\,a}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}+\frac {\frac {2}{a}-\frac {2\,{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}-\frac {4}{a\,\left (4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________