Optimal. Leaf size=34 \[ -\frac {5}{2} \text {ArcTan}(\sinh (x))+\frac {5 \sinh (x)}{2}-\frac {5 \sinh ^3(x)}{6}+\frac {1}{2} \sinh ^3(x) \tanh ^2(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {4482, 2672, 294,
308, 209} \begin {gather*} -\frac {5}{2} \text {ArcTan}(\sinh (x))-\frac {5 \sinh ^3(x)}{6}+\frac {5 \sinh (x)}{2}+\frac {1}{2} \sinh ^3(x) \tanh ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 294
Rule 308
Rule 2672
Rule 4482
Rubi steps
\begin {align*} \int (-\cosh (x)+\text {sech}(x))^3 \, dx &=-\int \sinh ^3(x) \tanh ^3(x) \, dx\\ &=-\text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\sinh (x)\right )\\ &=\frac {1}{2} \sinh ^3(x) \tanh ^2(x)-\frac {5}{2} \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\sinh (x)\right )\\ &=\frac {1}{2} \sinh ^3(x) \tanh ^2(x)-\frac {5}{2} \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\sinh (x)\right )\\ &=\frac {5 \sinh (x)}{2}-\frac {5 \sinh ^3(x)}{6}+\frac {1}{2} \sinh ^3(x) \tanh ^2(x)-\frac {5}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (x)\right )\\ &=-\frac {5}{2} \tan ^{-1}(\sinh (x))+\frac {5 \sinh (x)}{2}-\frac {5 \sinh ^3(x)}{6}+\frac {1}{2} \sinh ^3(x) \tanh ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 37, normalized size = 1.09 \begin {gather*} -\frac {1}{48} \text {sech}^2(x) (60 \text {ArcTan}(\sinh (x))+60 \text {ArcTan}(\sinh (x)) \cosh (2 x)-50 \sinh (x)-25 \sinh (3 x)+\sinh (5 x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.90, size = 59, normalized size = 1.74
method | result | size |
risch | \(-\frac {{\mathrm e}^{3 x}}{24}+\frac {9 \,{\mathrm e}^{x}}{8}-\frac {9 \,{\mathrm e}^{-x}}{8}+\frac {{\mathrm e}^{-3 x}}{24}+\frac {{\mathrm e}^{x} \left ({\mathrm e}^{2 x}-1\right )}{\left (1+{\mathrm e}^{2 x}\right )^{2}}+\frac {5 i \ln \left ({\mathrm e}^{x}-i\right )}{2}-\frac {5 i \ln \left ({\mathrm e}^{x}+i\right )}{2}\) | \(59\) |
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. 56 vs.
\(2 (26) = 52\).
time = 0.46, size = 56, normalized size = 1.65 \begin {gather*} \frac {e^{\left (-x\right )} - e^{\left (-3 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + 5 \, \arctan \left (e^{\left (-x\right )}\right ) - \frac {1}{24} \, e^{\left (3 \, x\right )} - \frac {9}{8} \, e^{\left (-x\right )} + \frac {1}{24} \, e^{\left (-3 \, x\right )} + \frac {9}{8} \, e^{x} \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. 486 vs.
\(2 (26) = 52\).
time = 0.36, size = 486, normalized size = 14.29 \begin {gather*} -\frac {\cosh \left (x\right )^{10} + 10 \, \cosh \left (x\right ) \sinh \left (x\right )^{9} + \sinh \left (x\right )^{10} + 5 \, {\left (9 \, \cosh \left (x\right )^{2} - 5\right )} \sinh \left (x\right )^{8} - 25 \, \cosh \left (x\right )^{8} + 40 \, {\left (3 \, \cosh \left (x\right )^{3} - 5 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{7} + 10 \, {\left (21 \, \cosh \left (x\right )^{4} - 70 \, \cosh \left (x\right )^{2} - 5\right )} \sinh \left (x\right )^{6} - 50 \, \cosh \left (x\right )^{6} + 4 \, {\left (63 \, \cosh \left (x\right )^{5} - 350 \, \cosh \left (x\right )^{3} - 75 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{5} + 10 \, {\left (21 \, \cosh \left (x\right )^{6} - 175 \, \cosh \left (x\right )^{4} - 75 \, \cosh \left (x\right )^{2} + 5\right )} \sinh \left (x\right )^{4} + 50 \, \cosh \left (x\right )^{4} + 40 \, {\left (3 \, \cosh \left (x\right )^{7} - 35 \, \cosh \left (x\right )^{5} - 25 \, \cosh \left (x\right )^{3} + 5 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 5 \, {\left (9 \, \cosh \left (x\right )^{8} - 140 \, \cosh \left (x\right )^{6} - 150 \, \cosh \left (x\right )^{4} + 60 \, \cosh \left (x\right )^{2} + 5\right )} \sinh \left (x\right )^{2} + 120 \, {\left (\cosh \left (x\right )^{7} + 7 \, \cosh \left (x\right ) \sinh \left (x\right )^{6} + \sinh \left (x\right )^{7} + {\left (21 \, \cosh \left (x\right )^{2} + 2\right )} \sinh \left (x\right )^{5} + 2 \, \cosh \left (x\right )^{5} + 5 \, {\left (7 \, \cosh \left (x\right )^{3} + 2 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{4} + {\left (35 \, \cosh \left (x\right )^{4} + 20 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{3} + \cosh \left (x\right )^{3} + {\left (21 \, \cosh \left (x\right )^{5} + 20 \, \cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left (7 \, \cosh \left (x\right )^{6} + 10 \, \cosh \left (x\right )^{4} + 3 \, \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 25 \, \cosh \left (x\right )^{2} + 10 \, {\left (\cosh \left (x\right )^{9} - 20 \, \cosh \left (x\right )^{7} - 30 \, \cosh \left (x\right )^{5} + 20 \, \cosh \left (x\right )^{3} + 5 \, \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1}{24 \, {\left (\cosh \left (x\right )^{7} + 7 \, \cosh \left (x\right ) \sinh \left (x\right )^{6} + \sinh \left (x\right )^{7} + {\left (21 \, \cosh \left (x\right )^{2} + 2\right )} \sinh \left (x\right )^{5} + 2 \, \cosh \left (x\right )^{5} + 5 \, {\left (7 \, \cosh \left (x\right )^{3} + 2 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{4} + {\left (35 \, \cosh \left (x\right )^{4} + 20 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{3} + \cosh \left (x\right )^{3} + {\left (21 \, \cosh \left (x\right )^{5} + 20 \, \cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left (7 \, \cosh \left (x\right )^{6} + 10 \, \cosh \left (x\right )^{4} + 3 \, \cosh \left (x\right )^{2}\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*} - \int 3 \cosh {\left (x \right )} \operatorname {sech}^{2}{\left (x \right )}\, dx - \int \left (- 3 \cosh ^{2}{\left (x \right )} \operatorname {sech}{\left (x \right )}\right )\, dx - \int \cosh ^{3}{\left (x \right )}\, dx - \int \left (- \operatorname {sech}^{3}{\left (x \right )}\right )\, 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. 66 vs.
\(2 (26) = 52\).
time = 0.40, size = 66, normalized size = 1.94 \begin {gather*} -\frac {5}{4} \, \pi + \frac {1}{24} \, {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} - \frac {e^{\left (-x\right )} - e^{x}}{{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4} - \frac {5}{2} \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right ) - e^{\left (-x\right )} + e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 57, normalized size = 1.68 \begin {gather*} \frac {{\mathrm {e}}^{-3\,x}}{24}-\frac {9\,{\mathrm {e}}^{-x}}{8}-\frac {{\mathrm {e}}^{3\,x}}{24}-5\,\mathrm {atan}\left ({\mathrm {e}}^x\right )+\frac {9\,{\mathrm {e}}^x}{8}+\frac {{\mathrm {e}}^x}{{\mathrm {e}}^{2\,x}+1}-\frac {2\,{\mathrm {e}}^x}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________