\(\int \frac {\tanh (a+2 \log (x))}{x} \, dx\) [150]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 12 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \log (\cosh (a+2 \log (x))) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3556} \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \log (\cosh (a+2 \log (x))) \]

[In]

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

[Out]

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

Rule 3556

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*} \text {integral}& = \text {Subst}(\int \tanh (a+2 x) \, dx,x,\log (x)) \\ & = \frac {1}{2} \log (\cosh (a+2 \log (x))) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \log (\cosh (a+2 \log (x))) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {\ln \left (\cosh \left (a +2 \ln \left (x \right )\right )\right )}{2}\) \(11\)
default \(\frac {\ln \left (\cosh \left (a +2 \ln \left (x \right )\right )\right )}{2}\) \(11\)
risch \(-\ln \left (x \right )+\frac {\ln \left (-{\mathrm e}^{2 a} x^{4}-1\right )}{2}\) \(20\)
parallelrisch \(-\ln \left (x \right )-\frac {\ln \left (1-\tanh \left (a +2 \ln \left (x \right )\right )\right )}{2}\) \(20\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.50 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \, \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - \log \left (x\right ) \]

[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] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\log {\left (x \right )} - \frac {\log {\left (\tanh {\left (a + 2 \log {\left (x \right )} \right )} + 1 \right )}}{2} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \, \log \left (\cosh \left (a + 2 \, \log \left (x\right )\right )\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.67 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\frac {1}{2} \, \log \left (x^{4} e^{\left (2 \, a\right )} + 1\right ) - \frac {1}{4} \, \log \left (x^{4}\right ) \]

[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)

Mupad [B] (verification not implemented)

Time = 1.78 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int \frac {\tanh (a+2 \log (x))}{x} \, dx=\ln \left (x\right )-\frac {\ln \left (\mathrm {tanh}\left (a+2\,\ln \left (x\right )\right )+1\right )}{2} \]

[In]

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

[Out]

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