3.150 \(\int \frac{\tanh (a+2 \log (x))}{x} \, dx\)

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

[Out]

Log[Cosh[a + 2*Log[x]]]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0135338, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3475} \[ \frac{1}{2} \log (\cosh (a+2 \log (x))) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[a + 2*Log[x]]/x,x]

[Out]

Log[Cosh[a + 2*Log[x]]]/2

Rule 3475

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

Rubi steps

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

Mathematica [A]  time = 0.0247089, size = 12, normalized size = 1. \[ \frac{1}{2} \log (\cosh (a+2 \log (x))) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[a + 2*Log[x]]/x,x]

[Out]

Log[Cosh[a + 2*Log[x]]]/2

________________________________________________________________________________________

Maple [B]  time = 0.003, size = 26, normalized size = 2.2 \begin{align*} -{\frac{\ln \left ( \tanh \left ( a+2\,\ln \left ( x \right ) \right ) -1 \right ) }{4}}-{\frac{\ln \left ( \tanh \left ( a+2\,\ln \left ( x \right ) \right ) +1 \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(a+2*ln(x))/x,x)

[Out]

-1/4*ln(tanh(a+2*ln(x))-1)-1/4*ln(tanh(a+2*ln(x))+1)

________________________________________________________________________________________

Maxima [A]  time = 1.21895, size = 14, normalized size = 1.17 \begin{align*} \frac{1}{2} \, \log \left (\cosh \left (a + 2 \, \log \left (x\right )\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.96916, size = 47, normalized size = 3.92 \begin{align*} \frac{1}{2} \, \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.297289, size = 15, normalized size = 1.25 \begin{align*} \log{\left (x \right )} - \frac{\log{\left (\tanh{\left (a + 2 \log{\left (x \right )} \right )} + 1 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(a+2*ln(x))/x,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15682, size = 27, normalized size = 2.25 \begin{align*} \frac{1}{2} \, \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - \frac{1}{4} \, \log \left (x^{4}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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