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

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

[Out]

Log[Cosh[x]]^2/2

________________________________________________________________________________________

Rubi [A]  time = 0.0154075, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 3, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, 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 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]

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]

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.003558, size = 9, normalized size = 1. \[ \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

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 8, normalized size = 0.9 \begin{align*}{\frac{ \left ( \ln \left ( \cosh \left ( x \right ) \right ) \right ) ^{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.941918, size = 9, normalized size = 1. \begin{align*} \frac{1}{2} \, \log \left (\cosh \left (x\right )\right )^{2} \end{align*}

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 = 2.39197, size = 27, normalized size = 3. \begin{align*} \frac{1}{2} \, \log \left (\cosh \left (x\right )\right )^{2} \end{align*}

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., size = 0, normalized size = 0. \begin{align*} \int \log{\left (\cosh{\left (x \right )} \right )} \tanh{\left (x \right )}\, dx \end{align*}

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., size = 0, normalized size = 0. \begin{align*} \int \log \left (\cosh \left (x\right )\right ) \tanh \left (x\right )\,{d x} \end{align*}

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)