3.162 \(\int \frac {\coth ^2(a+2 \log (x))}{x} \, dx\)

Optimal. Leaf size=14 \[ \log (x)-\frac {1}{2} \coth (a+2 \log (x)) \]

[Out]

-1/2*coth(a+2*ln(x))+ln(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3473, 8} \[ \log (x)-\frac {1}{2} \coth (a+2 \log (x)) \]

Antiderivative was successfully verified.

[In]

Int[Coth[a + 2*Log[x]]^2/x,x]

[Out]

-Coth[a + 2*Log[x]]/2 + Log[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \frac {\coth ^2(a+2 \log (x))}{x} \, dx &=\operatorname {Subst}\left (\int \coth ^2(a+2 x) \, dx,x,\log (x)\right )\\ &=-\frac {1}{2} \coth (a+2 \log (x))+\operatorname {Subst}(\int 1 \, dx,x,\log (x))\\ &=-\frac {1}{2} \coth (a+2 \log (x))+\log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 28, normalized size = 2.00 \[ -\frac {1}{2} \coth (a+2 \log (x)) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\tanh ^2(a+2 \log (x))\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Coth[a + 2*Log[x]]^2/x,x]

[Out]

-1/2*(Coth[a + 2*Log[x]]*Hypergeometric2F1[-1/2, 1, 1/2, Tanh[a + 2*Log[x]]^2])

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 28, normalized size = 2.00 \[ \frac {{\left (x^{4} e^{\left (2 \, a\right )} - 1\right )} \log \relax (x) - 1}{x^{4} e^{\left (2 \, a\right )} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 21, normalized size = 1.50 \[ -\frac {1}{x^{4} e^{\left (2 \, a\right )} - 1} + \frac {1}{4} \, \log \left (x^{4}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.01, size = 35, normalized size = 2.50 \[ -\frac {\coth \left (a +2 \ln \relax (x )\right )}{2}-\frac {\ln \left (\coth \left (a +2 \ln \relax (x )\right )-1\right )}{4}+\frac {\ln \left (\coth \left (a +2 \ln \relax (x )\right )+1\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(a+2*ln(x))^2/x,x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 19, normalized size = 1.36 \[ \frac {1}{2} \, a + \frac {1}{e^{\left (-2 \, a - 4 \, \log \relax (x)\right )} - 1} + \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.19, size = 28, normalized size = 2.00 \[ \ln \relax (x)-\frac {{\mathrm {e}}^{2\,a}\,x^4+1}{2\,\left (x^4\,{\mathrm {e}}^{2\,a}-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(a + 2*log(x))^2/x,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 7.36, size = 32, normalized size = 2.29 \[ \begin {cases} \tilde {\infty } \log {\relax (x )} & \text {for}\: a = \log {\left (- \frac {1}{x^{2}} \right )} \vee a = \log {\left (\frac {1}{x^{2}} \right )} \\\log {\relax (x )} - \frac {1}{2 \tanh {\left (a + 2 \log {\relax (x )} \right )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*log(x), Eq(a, log(x**(-2))) | Eq(a, log(-1/x**2))), (log(x) - 1/(2*tanh(a + 2*log(x))), True))

________________________________________________________________________________________