3.105 \(\int \frac {\text {sech}^2(x)}{a+b \tanh (x)} \, dx\)

Optimal. Leaf size=11 \[ \frac {\log (a+b \tanh (x))}{b} \]

[Out]

ln(a+b*tanh(x))/b

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3506, 31} \[ \frac {\log (a+b \tanh (x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[Sech[x]^2/(a + b*Tanh[x]),x]

[Out]

Log[a + b*Tanh[x]]/b

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\text {sech}^2(x)}{a+b \tanh (x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tanh (x)\right )}{b}\\ &=\frac {\log (a+b \tanh (x))}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 20, normalized size = 1.82 \[ \frac {\log (a \cosh (x)+b \sinh (x))-\log (\cosh (x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[x]^2/(a + b*Tanh[x]),x]

[Out]

(-Log[Cosh[x]] + Log[a*Cosh[x] + b*Sinh[x]])/b

________________________________________________________________________________________

fricas [B]  time = 0.57, size = 42, normalized size = 3.82 \[ \frac {\log \left (\frac {2 \, {\left (a \cosh \relax (x) + b \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*tanh(x)),x, algorithm="fricas")

[Out]

(log(2*(a*cosh(x) + b*sinh(x))/(cosh(x) - sinh(x))) - log(2*cosh(x)/(cosh(x) - sinh(x))))/b

________________________________________________________________________________________

giac [B]  time = 0.12, size = 45, normalized size = 4.09 \[ \frac {{\left (a + b\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a b + b^{2}} - \frac {\log \left (e^{\left (2 \, x\right )} + 1\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*tanh(x)),x, algorithm="giac")

[Out]

(a + b)*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a*b + b^2) - log(e^(2*x) + 1)/b

________________________________________________________________________________________

maple [A]  time = 0.08, size = 12, normalized size = 1.09 \[ \frac {\ln \left (a +b \tanh \relax (x )\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)^2/(a+b*tanh(x)),x)

[Out]

ln(a+b*tanh(x))/b

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 11, normalized size = 1.00 \[ \frac {\log \left (b \tanh \relax (x) + a\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^2/(a+b*tanh(x)),x, algorithm="maxima")

[Out]

log(b*tanh(x) + a)/b

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 50, normalized size = 4.55 \[ -\frac {2\,\mathrm {atan}\left (\frac {a\,\sqrt {-b^2}+a\,{\mathrm {e}}^{2\,x}\,\sqrt {-b^2}+b\,{\mathrm {e}}^{2\,x}\,\sqrt {-b^2}}{b^2}\right )}{\sqrt {-b^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(x)^2*(a + b*tanh(x))),x)

[Out]

-(2*atan((a*(-b^2)^(1/2) + a*exp(2*x)*(-b^2)^(1/2) + b*exp(2*x)*(-b^2)^(1/2))/b^2))/(-b^2)^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{2}{\relax (x )}}{a + b \tanh {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**2/(a+b*tanh(x)),x)

[Out]

Integral(sech(x)**2/(a + b*tanh(x)), x)

________________________________________________________________________________________