Optimal. Leaf size=56 \[ -\frac {4 \tanh ^3(x)}{3 a}+\frac {4 \tanh (x)}{a}-\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {3 \tanh (x) \text {sech}(x)}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \cosh (x)+a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2768, 2748, 3767, 3768, 3770} \[ -\frac {4 \tanh ^3(x)}{3 a}+\frac {4 \tanh (x)}{a}-\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {3 \tanh (x) \text {sech}(x)}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \cosh (x)+a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2748
Rule 2768
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\text {sech}^4(x)}{a+a \cosh (x)} \, dx &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {\int (-4 a+3 a \cosh (x)) \text {sech}^4(x) \, dx}{a^2}\\ &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {3 \int \text {sech}^3(x) \, dx}{a}+\frac {4 \int \text {sech}^4(x) \, dx}{a}\\ &=-\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}+\frac {(4 i) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \tanh (x)\right )}{a}-\frac {3 \int \text {sech}(x) \, dx}{2 a}\\ &=-\frac {3 \tan ^{-1}(\sinh (x))}{2 a}+\frac {4 \tanh (x)}{a}-\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {4 \tanh ^3(x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 60, normalized size = 1.07 \[ \frac {\cosh \left (\frac {x}{2}\right ) \left (6 \sinh \left (\frac {x}{2}\right )+\cosh \left (\frac {x}{2}\right ) \left (\tanh (x) \left (2 \text {sech}^2(x)-3 \text {sech}(x)+10\right )-18 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )\right )\right )}{3 a (\cosh (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 600, normalized size = 10.71 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 57, normalized size = 1.02 \[ -\frac {3 \, \arctan \left (e^{x}\right )}{a} - \frac {2}{a {\left (e^{x} + 1\right )}} - \frac {3 \, e^{\left (5 \, x\right )} + 6 \, e^{\left (4 \, x\right )} + 24 \, e^{\left (2 \, x\right )} - 3 \, e^{x} + 10}{3 \, a {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 81, normalized size = 1.45 \[ \frac {\tanh \left (\frac {x}{2}\right )}{a}+\frac {5 \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {16 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3 a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {3 \tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\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 [B] time = 0.41, size = 101, normalized size = 1.80 \[ \frac {7 \, e^{\left (-x\right )} + 39 \, e^{\left (-2 \, x\right )} + 24 \, e^{\left (-3 \, x\right )} + 24 \, e^{\left (-4 \, x\right )} + 9 \, e^{\left (-5 \, x\right )} + 9 \, e^{\left (-6 \, x\right )} + 16}{3 \, {\left (a e^{\left (-x\right )} + 3 \, a e^{\left (-2 \, x\right )} + 3 \, a e^{\left (-3 \, x\right )} + 3 \, a e^{\left (-4 \, x\right )} + 3 \, a e^{\left (-5 \, x\right )} + a e^{\left (-6 \, x\right )} + a e^{\left (-7 \, x\right )} + a\right )}} + \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 = 0.90, size = 107, normalized size = 1.91 \[ \frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\frac {4}{a}-\frac {2\,{\mathrm {e}}^x}{a}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}-\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}} \]
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 )}}{\cosh {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________