Optimal. Leaf size=25 \[ -\frac{x}{a}+\frac{\sinh (x)}{a}+\frac{\sinh (x)}{a (\cosh (x)+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0693868, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2746, 12, 2735, 2648} \[ -\frac{x}{a}+\frac{\sinh (x)}{a}+\frac{\sinh (x)}{a (\cosh (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2746
Rule 12
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{\cosh ^2(x)}{a+a \cosh (x)} \, dx &=\frac{\sinh (x)}{a}-\frac{\int \frac{a \cosh (x)}{a+a \cosh (x)} \, dx}{a}\\ &=\frac{\sinh (x)}{a}-\int \frac{\cosh (x)}{a+a \cosh (x)} \, dx\\ &=-\frac{x}{a}+\frac{\sinh (x)}{a}+\int \frac{1}{a+a \cosh (x)} \, dx\\ &=-\frac{x}{a}+\frac{\sinh (x)}{a}+\frac{\sinh (x)}{a+a \cosh (x)}\\ \end{align*}
Mathematica [A] time = 0.0544024, size = 32, normalized size = 1.28 \[ \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.02, size = 59, normalized size = 2.4 \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.17736, size = 55, normalized size = 2.2 \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 = 1.90001, size = 151, normalized size = 6.04 \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 [B] time = 0.896657, size = 63, normalized size = 2.52 \begin{align*} - \frac{x \tanh ^{2}{\left (\frac{x}{2} \right )}}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} + \frac{x}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} + \frac{\tanh ^{3}{\left (\frac{x}{2} \right )}}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} - \frac{3 \tanh{\left (\frac{x}{2} \right )}}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16933, size = 47, normalized size = 1.88 \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]