3.108 \(\int \frac {\tanh (x)}{a+a \text {sech}(x)} \, dx\)

Optimal. Leaf size=9 \[ \frac {\log (\cosh (x)+1)}{a} \]

[Out]

ln(1+cosh(x))/a

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3879, 31} \[ \frac {\log (\cosh (x)+1)}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[1 + Cosh[x]]/a

Rule 31

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

Rule 3879

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[1/(a^(m - n
- 1)*b^n*d), Subst[Int[((a - b*x)^((m - 1)/2)*(a + b*x)^((m - 1)/2 + n))/x^(m + n), x], x, Sin[c + d*x]], x] /
; FreeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && IntegerQ[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 12, normalized size = 1.33 \[ \frac {2 \log \left (\cosh \left (\frac {x}{2}\right )\right )}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*Log[Cosh[x/2]])/a

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 16, normalized size = 1.78 \[ -\frac {x - 2 \, \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.11, size = 17, normalized size = 1.89 \[ -\frac {x}{a} + \frac {2 \, \log \left (e^{x} + 1\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 19, normalized size = 2.11 \[ \frac {\ln \left (1+\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]

int(tanh(x)/(a+a*sech(x)),x)

[Out]

1/a*ln(1+sech(x))-1/a*ln(sech(x))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 18, normalized size = 2.00 \[ \frac {x}{a} + \frac {2 \, \log \left (e^{\left (-x\right )} + 1\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.31, size = 14, normalized size = 1.56 \[ -\frac {x-2\,\ln \left ({\mathrm {e}}^x+1\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)/(a + a/cosh(x)),x)

[Out]

-(x - 2*log(exp(x) + 1))/a

________________________________________________________________________________________

sympy [B]  time = 0.18, size = 19, normalized size = 2.11 \[ \frac {x}{a} - \frac {\log {\left (\tanh {\relax (x )} + 1 \right )}}{a} + \frac {\log {\left (\operatorname {sech}{\relax (x )} + 1 \right )}}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/a - log(tanh(x) + 1)/a + log(sech(x) + 1)/a

________________________________________________________________________________________