\(\int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx\) [110]

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

Optimal result

Integrand size = 13, antiderivative size = 38 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {x}{a}-\frac {\coth (x) (3-2 \text {sech}(x))}{3 a}-\frac {\coth ^3(x) (1-\text {sech}(x))}{3 a} \]

[Out]

x/a-1/3*coth(x)*(3-2*sech(x))/a-1/3*coth(x)^3*(1-sech(x))/a

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3973, 3967, 8} \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {x}{a}-\frac {\coth ^3(x) (1-\text {sech}(x))}{3 a}-\frac {\coth (x) (3-2 \text {sech}(x))}{3 a} \]

[In]

Int[Coth[x]^2/(a + a*Sech[x]),x]

[Out]

x/a - (Coth[x]*(3 - 2*Sech[x]))/(3*a) - (Coth[x]^3*(1 - Sech[x]))/(3*a)

Rule 8

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

Rule 3967

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-(e*Cot[c
+ d*x])^(m + 1))*((a + b*Csc[c + d*x])/(d*e*(m + 1))), x] - Dist[1/(e^2*(m + 1)), Int[(e*Cot[c + d*x])^(m + 2)
*(a*(m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && LtQ[m, -1]

Rule 3973

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\int \coth ^4(x) (-a+a \text {sech}(x)) \, dx}{a^2} \\ & = -\frac {\coth ^3(x) (1-\text {sech}(x))}{3 a}+\frac {\int \coth ^2(x) (3 a-2 a \text {sech}(x)) \, dx}{3 a^2} \\ & = -\frac {\coth (x) (3-2 \text {sech}(x))}{3 a}-\frac {\coth ^3(x) (1-\text {sech}(x))}{3 a}-\frac {\int -3 a \, dx}{3 a^2} \\ & = \frac {x}{a}-\frac {\coth (x) (3-2 \text {sech}(x))}{3 a}-\frac {\coth ^3(x) (1-\text {sech}(x))}{3 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.87 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {6 x-4 \coth (x)-2 \text {csch}(x)+6 x \text {sech}(x)-4 \tanh (x)}{6 a+6 a \text {sech}(x)} \]

[In]

Integrate[Coth[x]^2/(a + a*Sech[x]),x]

[Out]

(6*x - 4*Coth[x] - 2*Csch[x] + 6*x*Sech[x] - 4*Tanh[x])/(6*a + 6*a*Sech[x])

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.95

method result size
risch \(\frac {x}{a}+\frac {2 \,{\mathrm e}^{3 x}-\frac {10 \,{\mathrm e}^{x}}{3}-\frac {8}{3}}{a \left ({\mathrm e}^{x}+1\right )^{3} \left ({\mathrm e}^{x}-1\right )}\) \(36\)
default \(\frac {-\frac {\tanh \left (\frac {x}{2}\right )^{3}}{3}-4 \tanh \left (\frac {x}{2}\right )+4 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-4 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )}}{4 a}\) \(47\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.21 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=-\frac {2 \, \cosh \left (x\right )^{2} - {\left ({\left (3 \, x + 4\right )} \cosh \left (x\right ) + 3 \, x + 4\right )} \sinh \left (x\right ) + 2 \, \sinh \left (x\right )^{2} + \cosh \left (x\right )}{3 \, {\left (a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )} \]

[In]

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

[Out]

-1/3*(2*cosh(x)^2 - ((3*x + 4)*cosh(x) + 3*x + 4)*sinh(x) + 2*sinh(x)^2 + cosh(x))/((a*cosh(x) + a)*sinh(x))

Sympy [F]

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

[In]

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

[Out]

Integral(coth(x)**2/(sech(x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.24 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {x}{a} - \frac {2 \, {\left (5 \, e^{\left (-x\right )} - 3 \, e^{\left (-3 \, x\right )} + 4\right )}}{3 \, {\left (2 \, a e^{\left (-x\right )} - 2 \, a e^{\left (-3 \, x\right )} - a e^{\left (-4 \, x\right )} + a\right )}} \]

[In]

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

[Out]

x/a - 2/3*(5*e^(-x) - 3*e^(-3*x) + 4)/(2*a*e^(-x) - 2*a*e^(-3*x) - a*e^(-4*x) + a)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.05 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {x}{a} - \frac {1}{2 \, a {\left (e^{x} - 1\right )}} + \frac {15 \, e^{\left (2 \, x\right )} + 24 \, e^{x} + 13}{6 \, a {\left (e^{x} + 1\right )}^{3}} \]

[In]

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

[Out]

x/a - 1/2/(a*(e^x - 1)) + 1/6*(15*e^(2*x) + 24*e^x + 13)/(a*(e^x + 1)^3)

Mupad [B] (verification not implemented)

Time = 1.98 (sec) , antiderivative size = 94, normalized size of antiderivative = 2.47 \[ \int \frac {\coth ^2(x)}{a+a \text {sech}(x)} \, dx=\frac {\frac {5\,{\mathrm {e}}^{2\,x}}{6\,a}+\frac {5}{6\,a}+\frac {{\mathrm {e}}^x}{a}}{3\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x+1}+\frac {\frac {1}{2\,a}+\frac {5\,{\mathrm {e}}^x}{6\,a}}{{\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1}+\frac {x}{a}-\frac {1}{2\,a\,\left ({\mathrm {e}}^x-1\right )}+\frac {5}{6\,a\,\left ({\mathrm {e}}^x+1\right )} \]

[In]

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

[Out]

((5*exp(2*x))/(6*a) + 5/(6*a) + exp(x)/a)/(3*exp(2*x) + exp(3*x) + 3*exp(x) + 1) + (1/(2*a) + (5*exp(x))/(6*a)
)/(exp(2*x) + 2*exp(x) + 1) + x/a - 1/(2*a*(exp(x) - 1)) + 5/(6*a*(exp(x) + 1))