3.636 \(\int \log (\cosh (x)) \tanh (x) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, 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 = {3475, 4341, 2301} \[ \frac {1}{2} \log ^2(\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cosh[x]]^2/2

Rule 2301

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 3475

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

Rule 4341

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 &=\operatorname {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 \[ \frac {1}{2} \log ^2(\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cosh[x]]^2/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \log (\cosh (x)) \tanh (x) \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 7, normalized size = 0.78 \[ \frac {1}{2} \, \log \left (\cosh \relax (x)\right )^{2} \]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \log \left (\cosh \relax (x)\right ) \tanh \relax (x)\,{d x} \]

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)

________________________________________________________________________________________

maple [A]  time = 0.15, size = 8, normalized size = 0.89




method result size



derivativedivides \(\frac {\ln \left (\cosh \relax (x )\right )^{2}}{2}\) \(8\)
default \(\frac {\ln \left (\cosh \relax (x )\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}-\frac {x^{2}}{2}+\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 \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 \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}-\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 \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 \left (1+{\mathrm e}^{2 x}\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )}{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 \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (1+{\mathrm e}^{2 x}\right )\right )^{3} x}{2}-\ln \left (1+{\mathrm e}^{2 x}\right ) \ln \relax (2)+\ln \relax (2) x\) \(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 = 0.43, size = 7, normalized size = 0.78 \[ \frac {1}{2} \, \log \left (\cosh \relax (x)\right )^{2} \]

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

________________________________________________________________________________________

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

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \log {\left (\cosh {\relax (x )} \right )} \tanh {\relax (x )}\, dx \]

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)

________________________________________________________________________________________