Optimal. Leaf size=9 \[ \frac {\log (1+\cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3964, 31}
\begin {gather*} \frac {\log (\cosh (x)+1)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3964
Rubi steps
\begin {align*} \int \frac {\tanh (x)}{a+a \text {sech}(x)} \, dx &=\text {Subst}\left (\int \frac {1}{a+a x} \, dx,x,\cosh (x)\right )\\ &=\frac {\log (1+\cosh (x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 12, normalized size = 1.33 \begin {gather*} \frac {2 \log \left (\cosh \left (\frac {x}{2}\right )\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.58, size = 17, normalized size = 1.89
method | result | size |
derivativedivides | \(-\frac {\ln \left (\mathrm {sech}\left (x \right )\right )-\ln \left (1+\mathrm {sech}\left (x \right )\right )}{a}\) | \(17\) |
default | \(-\frac {\ln \left (\mathrm {sech}\left (x \right )\right )-\ln \left (1+\mathrm {sech}\left (x \right )\right )}{a}\) | \(17\) |
risch | \(-\frac {x}{a}+\frac {2 \ln \left ({\mathrm e}^{x}+1\right )}{a}\) | \(18\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 18, normalized size = 2.00 \begin {gather*} \frac {x}{a} + \frac {2 \, \log \left (e^{\left (-x\right )} + 1\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 16, normalized size = 1.78 \begin {gather*} -\frac {x - 2 \, \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right )}{a} \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. 19 vs.
\(2 (7) = 14\).
time = 0.07, size = 19, normalized size = 2.11 \begin {gather*} \frac {x}{a} - \frac {\log {\left (\tanh {\left (x \right )} + 1 \right )}}{a} + \frac {\log {\left (\operatorname {sech}{\left (x \right )} + 1 \right )}}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 17, normalized size = 1.89 \begin {gather*} -\frac {x}{a} + \frac {2 \, \log \left (e^{x} + 1\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.31, size = 14, normalized size = 1.56 \begin {gather*} -\frac {x-2\,\ln \left ({\mathrm {e}}^x+1\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________