Optimal. Leaf size=14 \[ x-\tanh (x)-\frac {\tanh ^3(x)}{3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3554, 8}
\begin {gather*} x-\frac {1}{3} \tanh ^3(x)-\tanh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \tanh ^4(x) \, dx &=-\frac {1}{3} \tanh ^3(x)+\int \tanh ^2(x) \, dx\\ &=-\tanh (x)-\frac {\tanh ^3(x)}{3}+\int 1 \, dx\\ &=x-\tanh (x)-\frac {\tanh ^3(x)}{3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 18, normalized size = 1.29 \begin {gather*} x-\frac {4 \tanh (x)}{3}+\frac {1}{3} \text {sech}^2(x) \tanh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(25\) vs.
\(2(12)=24\).
time = 0.02, size = 26, normalized size = 1.86
method | result | size |
derivativedivides | \(-\frac {\left (\tanh ^{3}\left (x \right )\right )}{3}-\tanh \left (x \right )-\frac {\ln \left (\tanh \left (x \right )-1\right )}{2}+\frac {\ln \left (\tanh \left (x \right )+1\right )}{2}\) | \(26\) |
default | \(-\frac {\left (\tanh ^{3}\left (x \right )\right )}{3}-\tanh \left (x \right )-\frac {\ln \left (\tanh \left (x \right )-1\right )}{2}+\frac {\ln \left (\tanh \left (x \right )+1\right )}{2}\) | \(26\) |
risch | \(x +\frac {4 \,{\mathrm e}^{4 x}+4 \,{\mathrm e}^{2 x}+\frac {8}{3}}{\left (1+{\mathrm e}^{2 x}\right )^{3}}\) | \(27\) |
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. 38 vs.
\(2 (12) = 24\).
time = 2.48, size = 38, normalized size = 2.71 \begin {gather*} x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 2\right )}}{3 \, {\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1\right )}} \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. 68 vs.
\(2 (12) = 24\).
time = 0.65, size = 68, normalized size = 4.86 \begin {gather*} \frac {{\left (3 \, x + 4\right )} \cosh \left (x\right )^{3} + 3 \, {\left (3 \, x + 4\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} - 12 \, \cosh \left (x\right )^{2} \sinh \left (x\right ) - 4 \, \sinh \left (x\right )^{3} + 3 \, {\left (3 \, x + 4\right )} \cosh \left (x\right )}{3 \, {\left (\cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right ) \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 10, normalized size = 0.71 \begin {gather*} x - \frac {\tanh ^{3}{\left (x \right )}}{3} - \tanh {\left (x \right )} \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. 26 vs.
\(2 (12) = 24\).
time = 0.71, size = 26, normalized size = 1.86 \begin {gather*} x + \frac {4 \, {\left (3 \, e^{\left (4 \, x\right )} + 3 \, e^{\left (2 \, x\right )} + 2\right )}}{3 \, {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 12, normalized size = 0.86 \begin {gather*} -\frac {{\mathrm {tanh}\left (x\right )}^3}{3}-\mathrm {tanh}\left (x\right )+x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________