3.7.36 \(\int \log (\cosh (x)) \tanh (x) \, dx\) [636]

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

[Out]

1/2*ln(cosh(x))^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3556, 4426, 2338} \begin {gather*} \frac {1}{2} \log ^2(\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[Cosh[x]]*Tanh[x],x]

[Out]

Log[Cosh[x]]^2/2

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4426

Int[(u_)*Tanh[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cosh[c*(a + b*x)], x]}, Dist[1/(
b*c), Subst[Int[SubstFor[1/x, Cosh[c*(a + b*x)]/d, u, x], x], x, Cosh[c*(a + b*x)]/d], x] /; FunctionOfQ[Cosh[
c*(a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 9, normalized size = 1.00 \begin {gather*} \frac {1}{2} \log ^2(\cosh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[Cosh[x]]*Tanh[x],x]

[Out]

Log[Cosh[x]]^2/2

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 8, normalized size = 0.89

method result size
derivativedivides \(\frac {\ln \left (\cosh \left (x \right )\right )^{2}}{2}\) \(8\)
default \(\frac {\ln \left (\cosh \left (x \right )\right )^{2}}{2}\) \(8\)
risch \(\left (x -\ln \left (1+{\mathrm e}^{2 x}\right )\right ) \ln \left ({\mathrm e}^{x}\right )+\frac {\ln \left (1+{\mathrm e}^{2 x}\right )^{2}}{2}-\ln \left (1+{\mathrm e}^{2 x}\right ) \ln \left (2\right )+\frac {i \ln \left (1+{\mathrm e}^{2 x}\right ) \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{2} x}{2}-\frac {i \ln \left (1+{\mathrm e}^{2 x}\right ) \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{3}}{2}+x \ln \left (2\right )-\frac {x^{2}}{2}+\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{3} x}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right ) x}{2}+\frac {i \ln \left (1+{\mathrm e}^{2 x}\right ) \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{2} x}{2}-\frac {i \ln \left (1+{\mathrm e}^{2 x}\right ) \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )}{2}\) \(308\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(cosh(x))*tanh(x),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(cosh(x))^2

________________________________________________________________________________________

Maxima [A]
time = 1.78, size = 7, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \log \left (\cosh \left (x\right )\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(cosh(x))*tanh(x),x, algorithm="maxima")

[Out]

1/2*log(cosh(x))^2

________________________________________________________________________________________

Fricas [A]
time = 0.66, size = 7, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \log \left (\cosh \left (x\right )\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(cosh(x))*tanh(x),x, algorithm="fricas")

[Out]

1/2*log(cosh(x))^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \log {\left (\cosh {\left (x \right )} \right )} \tanh {\left (x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(cosh(x))*tanh(x),x)

[Out]

Integral(log(cosh(x))*tanh(x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(cosh(x))*tanh(x),x, algorithm="giac")

[Out]

integrate(log(cosh(x))*tanh(x), x)

________________________________________________________________________________________

Mupad [B]
time = 0.44, size = 16, normalized size = 1.78 \begin {gather*} \frac {{\ln \left (\frac {{\mathrm {e}}^{-x}}{2}+\frac {{\mathrm {e}}^x}{2}\right )}^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(cosh(x))*tanh(x),x)

[Out]

log(exp(-x)/2 + exp(x)/2)^2/2

________________________________________________________________________________________