3.2.54 \(\int \coth (a+2 \log (x)) \, dx\) [154]

Optimal. Leaf size=40 \[ x-e^{-a/2} \text {ArcTan}\left (e^{a/2} x\right )-e^{-a/2} \tanh ^{-1}\left (e^{a/2} x\right ) \]

[Out]

x-arctan(exp(1/2*a)*x)/exp(1/2*a)-arctanh(exp(1/2*a)*x)/exp(1/2*a)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {5653, 396, 218, 212, 209} \begin {gather*} -e^{-a/2} \text {ArcTan}\left (e^{a/2} x\right )-e^{-a/2} \tanh ^{-1}\left (e^{a/2} x\right )+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - ArcTan[E^(a/2)*x]/E^(a/2) - ArcTanh[E^(a/2)*x]/E^(a/2)

Rule 209

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

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 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 396

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

Rule 5653

Int[Coth[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Int[(-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, p}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.13, size = 58, normalized size = 1.45 \begin {gather*} x+\frac {1}{2} \text {RootSum}\left [-\cosh (a)+\sinh (a)+\cosh (a) \text {$\#$1}^4+\sinh (a) \text {$\#$1}^4\&,\frac {\log (x)-\log (x-\text {$\#$1})}{\text {$\#$1}^3}\&\right ] (-\cosh (2 a)+\sinh (2 a)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x + (RootSum[-Cosh[a] + Sinh[a] + Cosh[a]*#1^4 + Sinh[a]*#1^4 & , (Log[x] - Log[x - #1])/#1^3 & ]*(-Cosh[2*a]
+ Sinh[2*a]))/2

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(70\) vs. \(2(32)=64\).
time = 0.71, size = 71, normalized size = 1.78

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 45, normalized size = 1.12 \begin {gather*} -\arctan \left (x e^{\left (\frac {1}{2} \, a\right )}\right ) e^{\left (-\frac {1}{2} \, a\right )} + \frac {1}{2} \, e^{\left (-\frac {1}{2} \, a\right )} \log \left (\frac {x e^{a} - e^{\left (\frac {1}{2} \, a\right )}}{x e^{a} + e^{\left (\frac {1}{2} \, a\right )}}\right ) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (28) = 56\).
time = 0.36, size = 58, normalized size = 1.45 \begin {gather*} -\frac {1}{2} \, {\left (2 \, \arctan \left (x e^{\left (\frac {1}{2} \, a\right )}\right ) e^{\left (\frac {1}{2} \, a\right )} - 2 \, x e^{a} - e^{\left (\frac {1}{2} \, a\right )} \log \left (\frac {x^{2} e^{a} - 2 \, x e^{\left (\frac {1}{2} \, a\right )} + 1}{x^{2} e^{a} - 1}\right )\right )} e^{\left (-a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.19, size = 36, normalized size = 0.90 \begin {gather*} x-\frac {\mathrm {atan}\left (x\,{\left ({\mathrm {e}}^{2\,a}\right )}^{1/4}\right )}{{\left ({\mathrm {e}}^{2\,a}\right )}^{1/4}}-\frac {\mathrm {atanh}\left (x\,{\left ({\mathrm {e}}^{2\,a}\right )}^{1/4}\right )}{{\left ({\mathrm {e}}^{2\,a}\right )}^{1/4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________