Optimal. Leaf size=28 \[ \frac{2 \tanh (x)}{a}-\frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\tanh (x)}{a \cosh (x)+a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0683189, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2768, 2748, 3767, 8, 3770} \[ \frac{2 \tanh (x)}{a}-\frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\tanh (x)}{a \cosh (x)+a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2768
Rule 2748
Rule 3767
Rule 8
Rule 3770
Rubi steps
\begin{align*} \int \frac{\text{sech}^2(x)}{a+a \cosh (x)} \, dx &=-\frac{\tanh (x)}{a+a \cosh (x)}-\frac{\int (-2 a+a \cosh (x)) \text{sech}^2(x) \, dx}{a^2}\\ &=-\frac{\tanh (x)}{a+a \cosh (x)}-\frac{\int \text{sech}(x) \, dx}{a}+\frac{2 \int \text{sech}^2(x) \, dx}{a}\\ &=-\frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\tanh (x)}{a+a \cosh (x)}+\frac{(2 i) \operatorname{Subst}(\int 1 \, dx,x,-i \tanh (x))}{a}\\ &=-\frac{\tan ^{-1}(\sinh (x))}{a}+\frac{2 \tanh (x)}{a}-\frac{\tanh (x)}{a+a \cosh (x)}\\ \end{align*}
Mathematica [A] time = 0.0797092, size = 43, normalized size = 1.54 \[ \frac{2 \cosh \left (\frac{x}{2}\right ) \left (\sinh \left (\frac{x}{2}\right )+\cosh \left (\frac{x}{2}\right ) \left (\tanh (x)-2 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )\right )\right )}{a (\cosh (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 39, normalized size = 1.4 \begin{align*}{\frac{1}{a}\tanh \left ({\frac{x}{2}} \right ) }+2\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}-2\,{\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.79331, size = 61, normalized size = 2.18 \begin{align*} \frac{2 \,{\left (e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 2\right )}}{a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a e^{\left (-3 \, x\right )} + a} + \frac{2 \, \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.79978, size = 467, normalized size = 16.68 \begin{align*} -\frac{2 \,{\left ({\left (\cosh \left (x\right )^{3} +{\left (3 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{2} + \sinh \left (x\right )^{3} + \cosh \left (x\right )^{2} +{\left (3 \, \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 1\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + \cosh \left (x\right )^{2} +{\left (2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \sinh \left (x\right )^{2} + \cosh \left (x\right ) + 2\right )}}{a \cosh \left (x\right )^{3} + a \sinh \left (x\right )^{3} + a \cosh \left (x\right )^{2} +{\left (3 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{2} + a \cosh \left (x\right ) +{\left (3 \, a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a} \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}^{2}{\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.18519, size = 49, normalized size = 1.75 \begin{align*} -\frac{2 \, \arctan \left (e^{x}\right )}{a} - \frac{2 \,{\left (e^{\left (2 \, x\right )} + e^{x} + 2\right )}}{a{\left (e^{\left (3 \, x\right )} + e^{\left (2 \, x\right )} + e^{x} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]