Optimal. Leaf size=45 \[ -\frac {2 \tanh (x)}{a}+\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \text {sech}(x)+a}+\frac {3 \tanh (x) \text {sech}(x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3818, 3787, 3767, 8, 3768, 3770} \[ -\frac {2 \tanh (x)}{a}+\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \text {sech}(x)+a}+\frac {3 \tanh (x) \text {sech}(x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3768
Rule 3770
Rule 3787
Rule 3818
Rubi steps
\begin {align*} \int \frac {\text {sech}^4(x)}{a+a \text {sech}(x)} \, dx &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {\int \text {sech}^2(x) (2 a-3 a \text {sech}(x)) \, dx}{a^2}\\ &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {2 \int \text {sech}^2(x) \, dx}{a}+\frac {3 \int \text {sech}^3(x) \, dx}{a}\\ &=\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {(2 i) \operatorname {Subst}(\int 1 \, dx,x,-i \tanh (x))}{a}+\frac {3 \int \text {sech}(x) \, dx}{2 a}\\ &=\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {2 \tanh (x)}{a}+\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 51, normalized size = 1.13 \[ \frac {\cosh \left (\frac {x}{2}\right ) \text {sech}(x) \left (\cosh \left (\frac {x}{2}\right ) \left (6 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+\tanh (x) (\text {sech}(x)-2)\right )-2 \sinh \left (\frac {x}{2}\right )\right )}{a (\text {sech}(x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.38, size = 325, normalized size = 7.22 \[ \frac {3 \, \cosh \relax (x)^{4} + 3 \, {\left (4 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{3} + 3 \, \sinh \relax (x)^{4} + 3 \, \cosh \relax (x)^{3} + {\left (18 \, \cosh \relax (x)^{2} + 9 \, \cosh \relax (x) + 5\right )} \sinh \relax (x)^{2} + 3 \, {\left (\cosh \relax (x)^{5} + {\left (5 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{4} + \sinh \relax (x)^{5} + \cosh \relax (x)^{4} + 2 \, {\left (5 \, \cosh \relax (x)^{2} + 2 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{3} + 2 \, \cosh \relax (x)^{3} + 2 \, {\left (5 \, \cosh \relax (x)^{3} + 3 \, \cosh \relax (x)^{2} + 3 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{2} + 2 \, \cosh \relax (x)^{2} + {\left (5 \, \cosh \relax (x)^{4} + 4 \, \cosh \relax (x)^{3} + 6 \, \cosh \relax (x)^{2} + 4 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \cosh \relax (x) + 1\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + 5 \, \cosh \relax (x)^{2} + {\left (12 \, \cosh \relax (x)^{3} + 9 \, \cosh \relax (x)^{2} + 10 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \cosh \relax (x) + 4}{a \cosh \relax (x)^{5} + a \sinh \relax (x)^{5} + a \cosh \relax (x)^{4} + {\left (5 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{4} + 2 \, a \cosh \relax (x)^{3} + 2 \, {\left (5 \, a \cosh \relax (x)^{2} + 2 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{3} + 2 \, a \cosh \relax (x)^{2} + 2 \, {\left (5 \, a \cosh \relax (x)^{3} + 3 \, a \cosh \relax (x)^{2} + 3 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{2} + a \cosh \relax (x) + {\left (5 \, a \cosh \relax (x)^{4} + 4 \, a \cosh \relax (x)^{3} + 6 \, a \cosh \relax (x)^{2} + 4 \, a \cosh \relax (x) + a\right )} \sinh \relax (x) + a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 48, normalized size = 1.07 \[ \frac {3 \, \arctan \left (e^{x}\right )}{a} + \frac {e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} - e^{x} + 2}{a {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} + \frac {2}{a {\left (e^{x} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 61, normalized size = 1.36 \[ -\frac {\tanh \left (\frac {x}{2}\right )}{a}-\frac {3 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {\tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 73, normalized size = 1.62 \[ -\frac {e^{\left (-x\right )} + 5 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 4}{a e^{\left (-x\right )} + 2 \, a e^{\left (-2 \, x\right )} + 2 \, a e^{\left (-3 \, x\right )} + a e^{\left (-4 \, x\right )} + a e^{\left (-5 \, x\right )} + a} - \frac {3 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.35, size = 73, normalized size = 1.62 \[ \frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}+\frac {\frac {2}{a}+\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}+\frac {3\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\operatorname {sech}^{4}{\relax (x )}}{\operatorname {sech}{\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________