Optimal. Leaf size=19 \[ \frac {\log (a+b \text {sech}(x))}{a}+\frac {\log (\cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3885, 36, 29, 31} \[ \frac {\log (a+b \text {sech}(x))}{a}+\frac {\log (\cosh (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 3885
Rubi steps
\begin {align*} \int \frac {\tanh (x)}{a+b \text {sech}(x)} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{x (a+x)} \, dx,x,b \text {sech}(x)\right )\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,b \text {sech}(x)\right )}{a}+\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \text {sech}(x)\right )}{a}\\ &=\frac {\log (\cosh (x))}{a}+\frac {\log (a+b \text {sech}(x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 11, normalized size = 0.58 \[ \frac {\log (a \cosh (x)+b)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 27, normalized size = 1.42 \[ -\frac {x - \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 19, normalized size = 1.00 \[ \frac {\log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 21, normalized size = 1.11 \[ \frac {\ln \left (a +b \,\mathrm {sech}\relax (x )\right )}{a}-\frac {\ln \left (\mathrm {sech}\relax (x )\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 26, normalized size = 1.37 \[ \frac {x}{a} + \frac {\log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 23, normalized size = 1.21 \[ -\frac {x-\ln \left (a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.46, size = 41, normalized size = 2.16 \[ \begin {cases} \frac {\tilde {\infty }}{\operatorname {sech}{\relax (x )}} & \text {for}\: a = 0 \wedge b = 0 \\\frac {1}{b \operatorname {sech}{\relax (x )}} & \text {for}\: a = 0 \\\frac {x - \log {\left (\tanh {\relax (x )} + 1 \right )}}{a} & \text {for}\: b = 0 \\\frac {x}{a} + \frac {\log {\left (\frac {a}{b} + \operatorname {sech}{\relax (x )} \right )}}{a} - \frac {\log {\left (\tanh {\relax (x )} + 1 \right )}}{a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________