3.2.60 \(\int x \coth ^2(a+2 \log (x)) \, dx\) [160]

Optimal. Leaf size=41 \[ \frac {x^2}{2}+\frac {x^2}{1-e^{2 a} x^4}-e^{-a} \tanh ^{-1}\left (e^a x^2\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {5657, 474, 470, 281, 212} \begin {gather*} -e^{-a} \tanh ^{-1}\left (e^a x^2\right )+\frac {x^2}{1-e^{2 a} x^4}+\frac {x^2}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^2/2 + x^2/(1 - E^(2*a)*x^4) - ArcTanh[E^a*x^2]/E^a

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 281

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m + 1, n]}, Dist[1/k, Subst[Int[x^((m
 + 1)/k - 1)*(a + b*x^(n/k))^p, x], x, x^k], x] /; k != 1] /; FreeQ[{a, b, p}, x] && IGtQ[n, 0] && IntegerQ[m]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rule 474

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^2, x_Symbol] :> Simp[(-(b*c - a*
d)^2)*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*b^2*e*n*(p + 1))), x] + Dist[1/(a*b^2*n*(p + 1)), Int[(e*x)^m*(a +
 b*x^n)^(p + 1)*Simp[(b*c - a*d)^2*(m + 1) + b^2*c^2*n*(p + 1) + a*b*d^2*n*(p + 1)*x^n, x], x], x] /; FreeQ[{a
, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1]

Rule 5657

Int[Coth[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*((-1 - E^(2*a*d)*x^
(2*b*d))^p/(1 - E^(2*a*d)*x^(2*b*d))^p), x] /; FreeQ[{a, b, d, e, m, p}, x]

Rubi steps

\begin {align*} \int x \coth ^2(a+2 \log (x)) \, dx &=\int x \coth ^2(a+2 \log (x)) \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
time = 2.14, size = 163, normalized size = 3.98 \begin {gather*} \frac {e^{-4 a} \left (-375-713 e^{2 a} x^4-181 e^{4 a} x^8+61 e^{6 a} x^{12}+\frac {3 \left (125+196 e^{2 a} x^4-14 e^{4 a} x^8-52 e^{6 a} x^{12}+e^{8 a} x^{16}\right ) \tanh ^{-1}\left (\sqrt {e^{2 a} x^4}\right )}{\sqrt {e^{2 a} x^4}}\right )}{96 x^6}+\frac {2}{105} e^{2 a} x^6 \left (1+e^{2 a} x^4\right )^2 \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};e^{2 a} x^4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-375 - 713*E^(2*a)*x^4 - 181*E^(4*a)*x^8 + 61*E^(6*a)*x^12 + (3*(125 + 196*E^(2*a)*x^4 - 14*E^(4*a)*x^8 - 52*
E^(6*a)*x^12 + E^(8*a)*x^16)*ArcTanh[Sqrt[E^(2*a)*x^4]])/Sqrt[E^(2*a)*x^4])/(96*E^(4*a)*x^6) + (2*E^(2*a)*x^6*
(1 + E^(2*a)*x^4)^2*HypergeometricPFQ[{3/2, 2, 2, 2}, {1, 1, 9/2}, E^(2*a)*x^4])/105

________________________________________________________________________________________

Maple [A]
time = 0.43, size = 54, normalized size = 1.32

method result size
risch \(\frac {x^{2}}{2}-\frac {x^{2}}{-1+{\mathrm e}^{2 a} x^{4}}-\frac {{\mathrm e}^{-a} \ln \left ({\mathrm e}^{a} x^{2}+1\right )}{2}+\frac {{\mathrm e}^{-a} \ln \left ({\mathrm e}^{a} x^{2}-1\right )}{2}\) \(54\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*coth(a+2*ln(x))^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 53, normalized size = 1.29 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{2} \, e^{\left (-a\right )} \log \left (x^{2} e^{a} + 1\right ) + \frac {1}{2} \, e^{\left (-a\right )} \log \left (x^{2} e^{a} - 1\right ) - \frac {x^{2}}{x^{4} e^{\left (2 \, a\right )} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (36) = 72\).
time = 0.35, size = 74, normalized size = 1.80 \begin {gather*} \frac {x^{6} e^{\left (3 \, a\right )} - 3 \, x^{2} e^{a} - {\left (x^{4} e^{\left (2 \, a\right )} - 1\right )} \log \left (x^{2} e^{a} + 1\right ) + {\left (x^{4} e^{\left (2 \, a\right )} - 1\right )} \log \left (x^{2} e^{a} - 1\right )}{2 \, {\left (x^{4} e^{\left (3 \, a\right )} - e^{a}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \coth ^{2}{\left (a + 2 \log {\left (x \right )} \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(x*coth(a + 2*log(x))**2, x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 54, normalized size = 1.32 \begin {gather*} \frac {1}{2} \, x^{2} - \frac {1}{2} \, e^{\left (-a\right )} \log \left (x^{2} e^{a} + 1\right ) + \frac {1}{2} \, e^{\left (-a\right )} \log \left ({\left | x^{2} e^{a} - 1 \right |}\right ) - \frac {x^{2}}{x^{4} e^{\left (2 \, a\right )} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.23, size = 42, normalized size = 1.02 \begin {gather*} \frac {x^2}{2}-\frac {x^2}{x^4\,{\mathrm {e}}^{2\,a}-1}-\frac {\mathrm {atanh}\left (x^2\,\sqrt {{\mathrm {e}}^{2\,a}}\right )}{\sqrt {{\mathrm {e}}^{2\,a}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________