Optimal. Leaf size=26 \[ -\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a \text{sech}(x)+a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0568475, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {3819, 3787, 2637, 8} \[ -\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a \text{sech}(x)+a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3819
Rule 3787
Rule 2637
Rule 8
Rubi steps
\begin{align*} \int \frac{\cosh (x)}{a+a \text{sech}(x)} \, dx &=-\frac{\sinh (x)}{a+a \text{sech}(x)}-\frac{\int \cosh (x) (-2 a+a \text{sech}(x)) \, dx}{a^2}\\ &=-\frac{\sinh (x)}{a+a \text{sech}(x)}-\frac{\int 1 \, dx}{a}+\frac{2 \int \cosh (x) \, dx}{a}\\ &=-\frac{x}{a}+\frac{2 \sinh (x)}{a}-\frac{\sinh (x)}{a+a \text{sech}(x)}\\ \end{align*}
Mathematica [A] time = 0.0602496, size = 32, normalized size = 1.23 \[ \frac{-2 x+3 \tanh \left (\frac{x}{2}\right )+\sinh \left (\frac{3 x}{2}\right ) \text{sech}\left (\frac{x}{2}\right )}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.027, size = 59, normalized size = 2.3 \begin{align*}{\frac{1}{a}\tanh \left ({\frac{x}{2}} \right ) }-{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12146, size = 55, normalized size = 2.12 \begin{align*} -\frac{x}{a} + \frac{5 \, e^{\left (-x\right )} + 1}{2 \,{\left (a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )}\right )}} - \frac{e^{\left (-x\right )}}{2 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.42953, size = 151, normalized size = 5.81 \begin{align*} -\frac{2 \, x \cosh \left (x\right ) - \cosh \left (x\right )^{2} + 2 \,{\left (x - \cosh \left (x\right ) - 1\right )} \sinh \left (x\right ) - \sinh \left (x\right )^{2} + 2 \, x + 5}{2 \,{\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + a\right )}} \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{\cosh{\left (x \right )}}{\operatorname{sech}{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1658, size = 47, normalized size = 1.81 \begin{align*} -\frac{x}{a} - \frac{{\left (5 \, e^{x} + 1\right )} e^{\left (-x\right )}}{2 \, a{\left (e^{x} + 1\right )}} + \frac{e^{x}}{2 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]