Optimal. Leaf size=16 \[ \frac {x}{2}+\frac {1}{2 (1+\tanh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3607, 8}
\begin {gather*} \frac {x}{2}+\frac {1}{2 (\tanh (x)+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3607
Rubi steps
\begin {align*} \int \frac {\tanh (x)}{1+\tanh (x)} \, dx &=\frac {1}{2 (1+\tanh (x))}+\frac {\int 1 \, dx}{2}\\ &=\frac {x}{2}+\frac {1}{2 (1+\tanh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 18, normalized size = 1.12 \begin {gather*} \frac {1}{4} (2 x+\cosh (2 x)-\sinh (2 x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 24, normalized size = 1.50
method | result | size |
risch | \(\frac {x}{2}+\frac {{\mathrm e}^{-2 x}}{4}\) | \(11\) |
derivativedivides | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4}+\frac {1}{2+2 \tanh \left (x \right )}+\frac {\ln \left (1+\tanh \left (x \right )\right )}{4}\) | \(24\) |
default | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4}+\frac {1}{2+2 \tanh \left (x \right )}+\frac {\ln \left (1+\tanh \left (x \right )\right )}{4}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 10, normalized size = 0.62 \begin {gather*} \frac {1}{2} \, x + \frac {1}{4} \, e^{\left (-2 \, x\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. 26 vs.
\(2 (12) = 24\).
time = 0.38, size = 26, normalized size = 1.62 \begin {gather*} \frac {{\left (2 \, x + 1\right )} \cosh \left (x\right ) + {\left (2 \, x - 1\right )} \sinh \left (x\right )}{4 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 27 vs.
\(2 (10) = 20\).
time = 0.16, size = 27, normalized size = 1.69 \begin {gather*} \frac {x \tanh {\left (x \right )}}{2 \tanh {\left (x \right )} + 2} + \frac {x}{2 \tanh {\left (x \right )} + 2} + \frac {1}{2 \tanh {\left (x \right )} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 10, normalized size = 0.62 \begin {gather*} \frac {1}{2} \, x + \frac {1}{4} \, e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 10, normalized size = 0.62 \begin {gather*} \frac {x}{2}+\frac {{\mathrm {e}}^{-2\,x}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________