\(\int \sqrt {b \coth (c+d x)} \, dx\) [4]

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

Optimal result

Integrand size = 12, antiderivative size = 58 \[ \int \sqrt {b \coth (c+d x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d}+\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d} \]

[Out]

-arctan((b*coth(d*x+c))^(1/2)/b^(1/2))*b^(1/2)/d+arctanh((b*coth(d*x+c))^(1/2)/b^(1/2))*b^(1/2)/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3557, 335, 304, 209, 212} \[ \int \sqrt {b \coth (c+d x)} \, dx=\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d}-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d} \]

[In]

Int[Sqrt[b*Coth[c + d*x]],x]

[Out]

-((Sqrt[b]*ArcTan[Sqrt[b*Coth[c + d*x]]/Sqrt[b]])/d) + (Sqrt[b]*ArcTanh[Sqrt[b*Coth[c + d*x]]/Sqrt[b]])/d

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 304

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

Rule 335

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

Rule 3557

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = -\frac {b \text {Subst}\left (\int \frac {\sqrt {x}}{-b^2+x^2} \, dx,x,b \coth (c+d x)\right )}{d} \\ & = -\frac {(2 b) \text {Subst}\left (\int \frac {x^2}{-b^2+x^4} \, dx,x,\sqrt {b \coth (c+d x)}\right )}{d} \\ & = \frac {b \text {Subst}\left (\int \frac {1}{b-x^2} \, dx,x,\sqrt {b \coth (c+d x)}\right )}{d}-\frac {b \text {Subst}\left (\int \frac {1}{b+x^2} \, dx,x,\sqrt {b \coth (c+d x)}\right )}{d} \\ & = -\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d}+\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \coth (c+d x)}}{\sqrt {b}}\right )}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.90 \[ \int \sqrt {b \coth (c+d x)} \, dx=-\frac {\left (\arctan \left (\sqrt {\coth (c+d x)}\right )-\text {arctanh}\left (\sqrt {\coth (c+d x)}\right )\right ) \sqrt {b \coth (c+d x)}}{d \sqrt {\coth (c+d x)}} \]

[In]

Integrate[Sqrt[b*Coth[c + d*x]],x]

[Out]

-(((ArcTan[Sqrt[Coth[c + d*x]]] - ArcTanh[Sqrt[Coth[c + d*x]]])*Sqrt[b*Coth[c + d*x]])/(d*Sqrt[Coth[c + d*x]])
)

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.81

method result size
derivativedivides \(-\frac {\arctan \left (\frac {\sqrt {b \coth \left (d x +c \right )}}{\sqrt {b}}\right ) \sqrt {b}}{d}+\frac {\operatorname {arctanh}\left (\frac {\sqrt {b \coth \left (d x +c \right )}}{\sqrt {b}}\right ) \sqrt {b}}{d}\) \(47\)
default \(-\frac {\arctan \left (\frac {\sqrt {b \coth \left (d x +c \right )}}{\sqrt {b}}\right ) \sqrt {b}}{d}+\frac {\operatorname {arctanh}\left (\frac {\sqrt {b \coth \left (d x +c \right )}}{\sqrt {b}}\right ) \sqrt {b}}{d}\) \(47\)

[In]

int((b*coth(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-arctan((b*coth(d*x+c))^(1/2)/b^(1/2))*b^(1/2)/d+arctanh((b*coth(d*x+c))^(1/2)/b^(1/2))*b^(1/2)/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (46) = 92\).

Time = 0.28 (sec) , antiderivative size = 594, normalized size of antiderivative = 10.24 \[ \int \sqrt {b \coth (c+d x)} \, dx=\left [-\frac {2 \, \sqrt {-b} \arctan \left (\frac {{\left (\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}\right )} \sqrt {-b} \sqrt {\frac {b \cosh \left (d x + c\right )}{\sinh \left (d x + c\right )}}}{b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b}\right ) - \sqrt {-b} \log \left (-\frac {b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right )^{3} \sinh \left (d x + c\right ) + 6 \, b \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right )^{2} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} - 1\right )} \sqrt {-b} \sqrt {\frac {b \cosh \left (d x + c\right )}{\sinh \left (d x + c\right )}} - 2 \, b}{\cosh \left (d x + c\right )^{4} + 4 \, \cosh \left (d x + c\right )^{3} \sinh \left (d x + c\right ) + 6 \, \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right )^{2} + 4 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + \sinh \left (d x + c\right )^{4}}\right )}{4 \, d}, -\frac {2 \, \sqrt {b} \arctan \left (\frac {\sqrt {b} \sqrt {\frac {b \cosh \left (d x + c\right )}{\sinh \left (d x + c\right )}}}{b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b}\right ) - \sqrt {b} \log \left (2 \, b \cosh \left (d x + c\right )^{4} + 8 \, b \cosh \left (d x + c\right )^{3} \sinh \left (d x + c\right ) + 12 \, b \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right )^{2} + 8 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + 2 \, b \sinh \left (d x + c\right )^{4} + 2 \, {\left (\cosh \left (d x + c\right )^{4} + 4 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + \sinh \left (d x + c\right )^{4} + {\left (6 \, \cosh \left (d x + c\right )^{2} - 1\right )} \sinh \left (d x + c\right )^{2} - \cosh \left (d x + c\right )^{2} + 2 \, {\left (2 \, \cosh \left (d x + c\right )^{3} - \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \sqrt {b} \sqrt {\frac {b \cosh \left (d x + c\right )}{\sinh \left (d x + c\right )}} - b\right )}{4 \, d}\right ] \]

[In]

integrate((b*coth(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[-1/4*(2*sqrt(-b)*arctan((cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2)*sqrt(-b)*sqrt(b*c
osh(d*x + c)/sinh(d*x + c))/(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + b)) - s
qrt(-b)*log(-(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)^3*sinh(d*x + c) + 6*b*cosh(d*x + c)^2*sinh(d*x + c)^2 + 4*
b*cosh(d*x + c)*sinh(d*x + c)^3 + b*sinh(d*x + c)^4 + 2*(cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sin
h(d*x + c)^2 - 1)*sqrt(-b)*sqrt(b*cosh(d*x + c)/sinh(d*x + c)) - 2*b)/(cosh(d*x + c)^4 + 4*cosh(d*x + c)^3*sin
h(d*x + c) + 6*cosh(d*x + c)^2*sinh(d*x + c)^2 + 4*cosh(d*x + c)*sinh(d*x + c)^3 + sinh(d*x + c)^4)))/d, -1/4*
(2*sqrt(b)*arctan(sqrt(b)*sqrt(b*cosh(d*x + c)/sinh(d*x + c))/(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x
+ c) + b*sinh(d*x + c)^2 + b)) - sqrt(b)*log(2*b*cosh(d*x + c)^4 + 8*b*cosh(d*x + c)^3*sinh(d*x + c) + 12*b*co
sh(d*x + c)^2*sinh(d*x + c)^2 + 8*b*cosh(d*x + c)*sinh(d*x + c)^3 + 2*b*sinh(d*x + c)^4 + 2*(cosh(d*x + c)^4 +
 4*cosh(d*x + c)*sinh(d*x + c)^3 + sinh(d*x + c)^4 + (6*cosh(d*x + c)^2 - 1)*sinh(d*x + c)^2 - cosh(d*x + c)^2
 + 2*(2*cosh(d*x + c)^3 - cosh(d*x + c))*sinh(d*x + c))*sqrt(b)*sqrt(b*cosh(d*x + c)/sinh(d*x + c)) - b))/d]

Sympy [F]

\[ \int \sqrt {b \coth (c+d x)} \, dx=\int \sqrt {b \coth {\left (c + d x \right )}}\, dx \]

[In]

integrate((b*coth(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(b*coth(c + d*x)), x)

Maxima [F]

\[ \int \sqrt {b \coth (c+d x)} \, dx=\int { \sqrt {b \coth \left (d x + c\right )} \,d x } \]

[In]

integrate((b*coth(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*coth(d*x + c)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (46) = 92\).

Time = 0.33 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.74 \[ \int \sqrt {b \coth (c+d x)} \, dx=\frac {{\left (2 \, \sqrt {b} \arctan \left (-\frac {\sqrt {b} e^{\left (2 \, d x + 2 \, c\right )} - \sqrt {b e^{\left (4 \, d x + 4 \, c\right )} - b}}{\sqrt {b}}\right ) - \sqrt {b} \log \left ({\left | -\sqrt {b} e^{\left (2 \, d x + 2 \, c\right )} + \sqrt {b e^{\left (4 \, d x + 4 \, c\right )} - b} \right |}\right )\right )} \mathrm {sgn}\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}{2 \, d} \]

[In]

integrate((b*coth(d*x+c))^(1/2),x, algorithm="giac")

[Out]

1/2*(2*sqrt(b)*arctan(-(sqrt(b)*e^(2*d*x + 2*c) - sqrt(b*e^(4*d*x + 4*c) - b))/sqrt(b)) - sqrt(b)*log(abs(-sqr
t(b)*e^(2*d*x + 2*c) + sqrt(b*e^(4*d*x + 4*c) - b))))*sgn(e^(2*d*x + 2*c) - 1)/d

Mupad [B] (verification not implemented)

Time = 1.92 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.71 \[ \int \sqrt {b \coth (c+d x)} \, dx=-\frac {\sqrt {b}\,\left (\mathrm {atan}\left (\frac {\sqrt {b\,\mathrm {coth}\left (c+d\,x\right )}}{\sqrt {b}}\right )-\mathrm {atanh}\left (\frac {\sqrt {b\,\mathrm {coth}\left (c+d\,x\right )}}{\sqrt {b}}\right )\right )}{d} \]

[In]

int((b*coth(c + d*x))^(1/2),x)

[Out]

-(b^(1/2)*(atan((b*coth(c + d*x))^(1/2)/b^(1/2)) - atanh((b*coth(c + d*x))^(1/2)/b^(1/2))))/d