3.192 \(\int \frac {\tanh (x)}{a+a \cosh (x)} \, dx\)

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

[Out]

ln(cosh(x))/a-ln(1+cosh(x))/a

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 18, 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 = {2707, 36, 29, 31} \[ \frac {\log (\cosh (x))}{a}-\frac {\log (\cosh (x)+1)}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cosh[x]]/a - Log[1 + Cosh[x]]/a

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 12, normalized size = 0.67 \[ -\frac {2 \tanh ^{-1}(2 \cosh (x)+1)}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*ArcTanh[1 + 2*Cosh[x]])/a

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 28, normalized size = 1.56 \[ \frac {\log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) - 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*cosh(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 22, normalized size = 1.22 \[ \frac {\log \left (e^{\left (2 \, x\right )} + 1\right )}{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*cosh(x)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 19, normalized size = 1.06 \[ \frac {\ln \left (\cosh \relax (x )\right )}{a}-\frac {\ln \left (1+\cosh \relax (x )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(cosh(x))/a-ln(1+cosh(x))/a

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 26, normalized size = 1.44 \[ -\frac {2\,\ln \left (36\,{\mathrm {e}}^x+36\right )-\ln \left (3\,{\mathrm {e}}^{2\,x}+3\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*log(36*exp(x) + 36) - log(3*exp(2*x) + 3))/a

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\tanh {\relax (x )}}{\cosh {\relax (x )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(tanh(x)/(cosh(x) + 1), x)/a

________________________________________________________________________________________