\(\int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx\) [113]

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

Optimal result

Integrand size = 13, antiderivative size = 21 \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\text {arctanh}\left (\sqrt {1+\coth (x)}\right )+\sqrt {1+\coth (x)} \tanh (x) \]

[Out]

arctanh((1+coth(x))^(1/2))+(1+coth(x))^(1/2)*tanh(x)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3597, 43, 65, 213} \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\text {arctanh}\left (\sqrt {\coth (x)+1}\right )+\tanh (x) \sqrt {\coth (x)+1} \]

[In]

Int[Sqrt[1 + Coth[x]]*Sech[x]^2,x]

[Out]

ArcTanh[Sqrt[1 + Coth[x]]] + Sqrt[1 + Coth[x]]*Tanh[x]

Rule 43

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

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

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

Rule 3597

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 21.23 (sec) , antiderivative size = 135, normalized size of antiderivative = 6.43 \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\frac {1}{2} \sqrt {1+\coth (x)} \left (\frac {(1-i) \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {i (1+\coth (x))}\right )}{\sqrt {i (1+\coth (x))}}+\frac {2 \left (-2 \text {arctanh}\left (\sqrt {\tanh \left (\frac {x}{2}\right )}\right )+\sqrt {2} \text {arctanh}\left (\frac {1+\tanh \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {\tanh \left (\frac {x}{2}\right )}}\right )\right ) \cosh ^2\left (\frac {x}{2}\right ) \text {csch}(x) \sqrt {\tanh \left (\frac {x}{2}\right )} \left (1+\tanh \left (\frac {x}{2}\right )\right )}{1+\coth (x)}+2 \tanh (x)\right ) \]

[In]

Integrate[Sqrt[1 + Coth[x]]*Sech[x]^2,x]

[Out]

(Sqrt[1 + Coth[x]]*(((1 - I)*ArcTan[(1/2 + I/2)*Sqrt[I*(1 + Coth[x])]])/Sqrt[I*(1 + Coth[x])] + (2*(-2*ArcTanh
[Sqrt[Tanh[x/2]]] + Sqrt[2]*ArcTanh[(1 + Tanh[x/2])/(Sqrt[2]*Sqrt[Tanh[x/2]])])*Cosh[x/2]^2*Csch[x]*Sqrt[Tanh[
x/2]]*(1 + Tanh[x/2]))/(1 + Coth[x]) + 2*Tanh[x]))/2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(47\) vs. \(2(17)=34\).

Time = 0.18 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.29

method result size
derivativedivides \(\frac {1}{2 \sqrt {1+\coth \left (x \right )}-2}-\frac {\ln \left (\sqrt {1+\coth \left (x \right )}-1\right )}{2}+\frac {1}{2 \sqrt {1+\coth \left (x \right )}+2}+\frac {\ln \left (\sqrt {1+\coth \left (x \right )}+1\right )}{2}\) \(48\)
default \(\frac {1}{2 \sqrt {1+\coth \left (x \right )}-2}-\frac {\ln \left (\sqrt {1+\coth \left (x \right )}-1\right )}{2}+\frac {1}{2 \sqrt {1+\coth \left (x \right )}+2}+\frac {\ln \left (\sqrt {1+\coth \left (x \right )}+1\right )}{2}\) \(48\)

[In]

int(sech(x)^2*(1+coth(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (17) = 34\).

Time = 0.27 (sec) , antiderivative size = 231, normalized size of antiderivative = 11.00 \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\frac {4 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} + {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (\frac {2 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} + 3 \, \cosh \left (x\right )^{2} + 6 \, \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, \sinh \left (x\right )^{2} - 1}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right ) - {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (-\frac {2 \, \sqrt {2} {\left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right )\right )} \sqrt {\frac {\sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}} - 3 \, \cosh \left (x\right )^{2} - 6 \, \cosh \left (x\right ) \sinh \left (x\right ) - 3 \, \sinh \left (x\right )^{2} + 1}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right )}{4 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )}} \]

[In]

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

[Out]

1/4*(4*sqrt(2)*(sqrt(2)*cosh(x) + sqrt(2)*sinh(x))*sqrt(sinh(x)/(cosh(x) - sinh(x))) + (cosh(x)^2 + 2*cosh(x)*
sinh(x) + sinh(x)^2 + 1)*log((2*sqrt(2)*(sqrt(2)*cosh(x) + sqrt(2)*sinh(x))*sqrt(sinh(x)/(cosh(x) - sinh(x)))
+ 3*cosh(x)^2 + 6*cosh(x)*sinh(x) + 3*sinh(x)^2 - 1)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)) - (cosh(x)^2
 + 2*cosh(x)*sinh(x) + sinh(x)^2 + 1)*log(-(2*sqrt(2)*(sqrt(2)*cosh(x) + sqrt(2)*sinh(x))*sqrt(sinh(x)/(cosh(x
) - sinh(x))) - 3*cosh(x)^2 - 6*cosh(x)*sinh(x) - 3*sinh(x)^2 + 1)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)
))/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 + 1)

Sympy [F]

\[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\int \sqrt {\coth {\left (x \right )} + 1} \operatorname {sech}^{2}{\left (x \right )}\, dx \]

[In]

integrate(sech(x)**2*(1+coth(x))**(1/2),x)

[Out]

Integral(sqrt(coth(x) + 1)*sech(x)**2, x)

Maxima [F]

\[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\int { \sqrt {\coth \left (x\right ) + 1} \operatorname {sech}\left (x\right )^{2} \,d x } \]

[In]

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

[Out]

integrate(sqrt(coth(x) + 1)*sech(x)^2, x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (17) = 34\).

Time = 0.27 (sec) , antiderivative size = 122, normalized size of antiderivative = 5.81 \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=-\frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} \log \left (\frac {{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} - 2 \, \sqrt {2} + 3}{{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 2 \, \sqrt {2} + 3}\right ) - \frac {8 \, {\left (3 \, {\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 1\right )}}{{\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{4} + 6 \, {\left (\sqrt {e^{\left (2 \, x\right )} - 1} - e^{x}\right )}^{2} + 1}\right )} \mathrm {sgn}\left (e^{\left (2 \, x\right )} - 1\right ) \]

[In]

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

[Out]

-1/4*sqrt(2)*(sqrt(2)*log(((sqrt(e^(2*x) - 1) - e^x)^2 - 2*sqrt(2) + 3)/((sqrt(e^(2*x) - 1) - e^x)^2 + 2*sqrt(
2) + 3)) - 8*(3*(sqrt(e^(2*x) - 1) - e^x)^2 + 1)/((sqrt(e^(2*x) - 1) - e^x)^4 + 6*(sqrt(e^(2*x) - 1) - e^x)^2
+ 1))*sgn(e^(2*x) - 1)

Mupad [F(-1)]

Timed out. \[ \int \sqrt {1+\coth (x)} \text {sech}^2(x) \, dx=\int \frac {\sqrt {\mathrm {coth}\left (x\right )+1}}{{\mathrm {cosh}\left (x\right )}^2} \,d x \]

[In]

int((coth(x) + 1)^(1/2)/cosh(x)^2,x)

[Out]

int((coth(x) + 1)^(1/2)/cosh(x)^2, x)