Optimal. Leaf size=27 \[ \frac {x}{2 a}-\frac {\sinh (x)}{a}+\frac {\cosh (x) \sinh (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 27, normalized size of antiderivative = 1.00, 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 = {3957, 2918,
2717, 2715, 8} \begin {gather*} \frac {x}{2 a}-\frac {\sinh (x)}{a}+\frac {\sinh (x) \cosh (x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 2918
Rule 3957
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.05, size = 16, normalized size = 0.59 \begin {gather*} \frac {x+(-2+\cosh (x)) \sinh (x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(64\) vs.
\(2(23)=46\).
time = 0.58, size = 65, normalized size = 2.41
method | result | size |
risch | \(\frac {x}{2 a}+\frac {{\mathrm e}^{2 x}}{8 a}-\frac {{\mathrm e}^{x}}{2 a}+\frac {{\mathrm e}^{-x}}{2 a}-\frac {{\mathrm e}^{-2 x}}{8 a}\) | \(42\) |
default | \(\frac {\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}}{a}\) | \(65\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 42, normalized size = 1.56 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 14, normalized size = 0.52 \begin {gather*} \frac {{\left (\cosh \left (x\right ) - 2\right )} \sinh \left (x\right ) + x}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sinh ^{2}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 28, normalized size = 1.04 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 41, normalized size = 1.52 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2\,a}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a}+\frac {{\mathrm {e}}^{2\,x}}{8\,a}+\frac {x}{2\,a}-\frac {{\mathrm {e}}^x}{2\,a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________