Optimal. Leaf size=14 \[ \frac {x}{a}-\frac {\text {ArcTan}(\sinh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3973, 3855}
\begin {gather*} \frac {x}{a}-\frac {\text {ArcTan}(\sinh (x))}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3973
Rubi steps
\begin {align*} \int \frac {\tanh ^2(x)}{a+a \text {sech}(x)} \, dx &=-\frac {\int (-a+a \text {sech}(x)) \, dx}{a^2}\\ &=\frac {x}{a}-\frac {\int \text {sech}(x) \, dx}{a}\\ &=\frac {x}{a}-\frac {\tan ^{-1}(\sinh (x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 15, normalized size = 1.07 \begin {gather*} \frac {x-2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(31\) vs.
\(2(14)=28\).
time = 0.60, size = 32, normalized size = 2.29
method | result | size |
risch | \(\frac {x}{a}+\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{a}-\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{a}\) | \(31\) |
default | \(\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 16, normalized size = 1.14 \begin {gather*} \frac {x}{a} + \frac {2 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 14, normalized size = 1.00 \begin {gather*} \frac {x - 2 \, \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{a} \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 ^{2}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 14, normalized size = 1.00 \begin {gather*} \frac {x}{a} - \frac {2 \, \arctan \left (e^{x}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.32, size = 25, normalized size = 1.79 \begin {gather*} \frac {x}{a}-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________