Optimal. Leaf size=24 \[ -\frac{A \sinh (x)}{1-\cosh (x)}-B \log (1-\cosh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0859135, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {4401, 2648, 2667, 31} \[ -\frac{A \sinh (x)}{1-\cosh (x)}-B \log (1-\cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4401
Rule 2648
Rule 2667
Rule 31
Rubi steps
\begin{align*} \int \frac{A+B \sinh (x)}{1-\cosh (x)} \, dx &=\int \left (-\frac{A}{-1+\cosh (x)}-\frac{B \sinh (x)}{-1+\cosh (x)}\right ) \, dx\\ &=-\left (A \int \frac{1}{-1+\cosh (x)} \, dx\right )-B \int \frac{\sinh (x)}{-1+\cosh (x)} \, dx\\ &=-\frac{A \sinh (x)}{1-\cosh (x)}-B \operatorname{Subst}\left (\int \frac{1}{-1+x} \, dx,x,\cosh (x)\right )\\ &=-B \log (1-\cosh (x))-\frac{A \sinh (x)}{1-\cosh (x)}\\ \end{align*}
Mathematica [A] time = 0.0441071, size = 19, normalized size = 0.79 \[ A \coth \left (\frac{x}{2}\right )-2 B \log \left (\sinh \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, size = 36, normalized size = 1.5 \begin{align*} B\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +B\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) +{A \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-2\,B\ln \left ( \tanh \left ( x/2 \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.06148, size = 27, normalized size = 1.12 \begin{align*} -B \log \left (\cosh \left (x\right ) - 1\right ) - \frac{2 \, A}{e^{\left (-x\right )} - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.79008, size = 167, normalized size = 6.96 \begin{align*} \frac{B x \cosh \left (x\right ) + B x \sinh \left (x\right ) - B x - 2 \,{\left (B \cosh \left (x\right ) + B \sinh \left (x\right ) - B\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + 2 \, A}{\cosh \left (x\right ) + \sinh \left (x\right ) - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.665453, size = 31, normalized size = 1.29 \begin{align*} \frac{A}{\tanh{\left (\frac{x}{2} \right )}} - B x + 2 B \log{\left (\tanh{\left (\frac{x}{2} \right )} + 1 \right )} - 2 B \log{\left (\tanh{\left (\frac{x}{2} \right )} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15983, size = 30, normalized size = 1.25 \begin{align*} B x - 2 \, B \log \left ({\left | e^{x} - 1 \right |}\right ) + \frac{2 \, A}{e^{x} - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]