Optimal. Leaf size=27 \[ \frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\sinh (x) \cosh (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.100531, antiderivative size = 27, 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 = {3872, 2839, 2637, 2635, 8} \[ \frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\sinh (x) \cosh (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2839
Rule 2637
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \frac{\sinh ^2(x)}{a+a \text{sech}(x)} \, dx &=-\int \frac{\cosh (x) \sinh ^2(x)}{-a-a \cosh (x)} \, dx\\ &=-\frac{\int \cosh (x) \, dx}{a}+\frac{\int \cosh ^2(x) \, dx}{a}\\ &=-\frac{\sinh (x)}{a}+\frac{\cosh (x) \sinh (x)}{2 a}+\frac{\int 1 \, dx}{2 a}\\ &=\frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\cosh (x) \sinh (x)}{2 a}\\ \end{align*}
Mathematica [A] time = 0.059689, size = 16, normalized size = 0.59 \[ \frac{x+\sinh (x) (\cosh (x)-2)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.023, size = 78, normalized size = 2.9 \begin{align*} -{\frac{1}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{3}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}+{\frac{1}{2\,a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}+{\frac{3}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}-{\frac{1}{2\,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.08288, size = 57, normalized size = 2.11 \begin{align*} -\frac{{\left (4 \, e^{\left (-x\right )} - 1\right )} e^{\left (2 \, x\right )}}{8 \, a} + \frac{x}{2 \, a} + \frac{4 \, e^{\left (-x\right )} - e^{\left (-2 \, x\right )}}{8 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.48415, size = 47, normalized size = 1.74 \begin{align*} \frac{{\left (\cosh \left (x\right ) - 2\right )} \sinh \left (x\right ) + x}{2 \, 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{\sinh ^{2}{\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.15785, size = 38, normalized size = 1.41 \begin{align*} \frac{{\left (4 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )} + 4 \, x + e^{\left (2 \, x\right )} - 4 \, e^{x}}{8 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]