Optimal. Leaf size=11 \[ \frac {\log (b+a \cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3239, 2747, 31}
\begin {gather*} \frac {\log (a \cosh (x)+b)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2747
Rule 3239
Rubi steps
\begin {align*} \int \frac {1}{a \coth (x)+b \text {csch}(x)} \, dx &=i \int \frac {\sinh (x)}{i b+i a \cosh (x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {1}{i b+x} \, dx,x,i a \cosh (x)\right )}{a}\\ &=\frac {\log (b+a \cosh (x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 11, normalized size = 1.00 \begin {gather*} \frac {\log (b+a \cosh (x))}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(50\) vs.
\(2(11)=22\).
time = 1.13, size = 51, normalized size = 4.64
method | result | size |
risch | \(-\frac {x}{a}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a}\) | \(27\) |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}+\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{a}\) | \(51\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 26 vs.
\(2 (11) = 22\).
time = 0.26, size = 26, normalized size = 2.36 \begin {gather*} \frac {x}{a} + \frac {\log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 27 vs.
\(2 (11) = 22\).
time = 0.37, size = 27, normalized size = 2.45 \begin {gather*} -\frac {x - \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{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*} \int \frac {1}{a \coth {\left (x \right )} + b \operatorname {csch}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 19, normalized size = 1.73 \begin {gather*} \frac {\log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 23, normalized size = 2.09 \begin {gather*} -\frac {x-\ln \left (a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________