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.0769904, antiderivative size = 56, normalized size of antiderivative = 1., 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 2768
Rule 2748
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.175914, 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]
________________________________________________________________________________________
Maple [A] time = 0.024, size = 81, normalized size = 1.5 \begin{align*}{\frac{1}{a}\tanh \left ({\frac{x}{2}} \right ) }+5\,{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{5}}{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{3}}}+{\frac{16}{3\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3} \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-3}}+3\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{3}}}-3\,{\frac{\arctan \left ( \tanh \left ( x/2 \right ) \right ) }{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.66707, size = 136, normalized size = 2.43 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.95651, size = 2018, normalized size = 36.04 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\operatorname{sech}^{4}{\left (x \right )}}{\cosh{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15633, size = 77, normalized size = 1.38 \begin{align*} -\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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]