Optimal. Leaf size=18 \[ \frac {A \sinh (x)}{\cosh (x)+1}+B \log (\cosh (x)+1) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4401, 2648, 2667, 31} \[ \frac {A \sinh (x)}{\cosh (x)+1}+B \log (\cosh (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2648
Rule 2667
Rule 4401
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\\ &=A \int \frac {1}{1+\cosh (x)} \, dx+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.04, size = 19, normalized size = 1.06 \[ A \tanh \left (\frac {x}{2}\right )+2 B \log \left (\cosh \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.49, size = 46, normalized size = 2.56 \[ -\frac {B x \cosh \relax (x) + B x \sinh \relax (x) + B x - 2 \, {\left (B \cosh \relax (x) + B \sinh \relax (x) + B\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) + 2 \, A}{\cosh \relax (x) + \sinh \relax (x) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 22, normalized size = 1.22 \[ -B x + 2 \, B \log \left (e^{x} + 1\right ) - \frac {2 \, A}{e^{x} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 28, normalized size = 1.56 \[ A \tanh \left (\frac {x}{2}\right )-B \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 19, normalized size = 1.06 \[ B \log \left (\cosh \relax (x) + 1\right ) + \frac {2 \, A}{e^{\left (-x\right )} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 22, normalized size = 1.22 \[ 2\,B\,\ln \left ({\mathrm {e}}^x+1\right )-\frac {2\,A}{{\mathrm {e}}^x+1}-B\,x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.34, size = 20, normalized size = 1.11 \[ A \tanh {\left (\frac {x}{2} \right )} + B x - 2 B \log {\left (\tanh {\left (\frac {x}{2} \right )} + 1 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________