\(\int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx\) [497]

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

Optimal result

Integrand size = 18, antiderivative size = 30 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=-\frac {2 x \coth (2 a+2 b x)}{b}+\frac {\log (\sinh (2 a+2 b x))}{b^2} \]

[Out]

-2*x*coth(2*b*x+2*a)/b+ln(sinh(2*b*x+2*a))/b^2

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {5569, 4269, 3556} \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=\frac {\log (\sinh (2 a+2 b x))}{b^2}-\frac {2 x \coth (2 a+2 b x)}{b} \]

[In]

Int[x*Csch[a + b*x]^2*Sech[a + b*x]^2,x]

[Out]

(-2*x*Coth[2*a + 2*b*x])/b + Log[Sinh[2*a + 2*b*x]]/b^2

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5569

Int[Csch[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sech[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Dis
t[2^n, Int[(c + d*x)^m*Csch[2*a + 2*b*x]^n, x], x] /; FreeQ[{a, b, c, d}, x] && RationalQ[m] && IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = 4 \int x \text {csch}^2(2 a+2 b x) \, dx \\ & = -\frac {2 x \coth (2 a+2 b x)}{b}+\frac {2 \int \coth (2 a+2 b x) \, dx}{b} \\ & = -\frac {2 x \coth (2 a+2 b x)}{b}+\frac {\log (\sinh (2 a+2 b x))}{b^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.87 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=\frac {-2 b x \coth (2 (a+b x))+\log (\sinh (2 (a+b x)))}{b^2} \]

[In]

Integrate[x*Csch[a + b*x]^2*Sech[a + b*x]^2,x]

[Out]

(-2*b*x*Coth[2*(a + b*x)] + Log[Sinh[2*(a + b*x)]])/b^2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(61\) vs. \(2(30)=60\).

Time = 3.53 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.07

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

[In]

int(x*csch(b*x+a)^2*sech(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 292 vs. \(2 (30) = 60\).

Time = 0.27 (sec) , antiderivative size = 292, normalized size of antiderivative = 9.73 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=-\frac {4 \, b x \cosh \left (b x + a\right )^{4} + 16 \, b x \cosh \left (b x + a\right )^{3} \sinh \left (b x + a\right ) + 24 \, b x \cosh \left (b x + a\right )^{2} \sinh \left (b x + a\right )^{2} + 16 \, b x \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{3} + 4 \, b x \sinh \left (b x + a\right )^{4} - {\left (\cosh \left (b x + a\right )^{4} + 4 \, \cosh \left (b x + a\right )^{3} \sinh \left (b x + a\right ) + 6 \, \cosh \left (b x + a\right )^{2} \sinh \left (b x + a\right )^{2} + 4 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{3} + \sinh \left (b x + a\right )^{4} - 1\right )} \log \left (\frac {4 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right )}{\cosh \left (b x + a\right )^{2} - 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2}}\right )}{b^{2} \cosh \left (b x + a\right )^{4} + 4 \, b^{2} \cosh \left (b x + a\right )^{3} \sinh \left (b x + a\right ) + 6 \, b^{2} \cosh \left (b x + a\right )^{2} \sinh \left (b x + a\right )^{2} + 4 \, b^{2} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{3} + b^{2} \sinh \left (b x + a\right )^{4} - b^{2}} \]

[In]

integrate(x*csch(b*x+a)^2*sech(b*x+a)^2,x, algorithm="fricas")

[Out]

-(4*b*x*cosh(b*x + a)^4 + 16*b*x*cosh(b*x + a)^3*sinh(b*x + a) + 24*b*x*cosh(b*x + a)^2*sinh(b*x + a)^2 + 16*b
*x*cosh(b*x + a)*sinh(b*x + a)^3 + 4*b*x*sinh(b*x + a)^4 - (cosh(b*x + a)^4 + 4*cosh(b*x + a)^3*sinh(b*x + a)
+ 6*cosh(b*x + a)^2*sinh(b*x + a)^2 + 4*cosh(b*x + a)*sinh(b*x + a)^3 + sinh(b*x + a)^4 - 1)*log(4*cosh(b*x +
a)*sinh(b*x + a)/(cosh(b*x + a)^2 - 2*cosh(b*x + a)*sinh(b*x + a) + sinh(b*x + a)^2)))/(b^2*cosh(b*x + a)^4 +
4*b^2*cosh(b*x + a)^3*sinh(b*x + a) + 6*b^2*cosh(b*x + a)^2*sinh(b*x + a)^2 + 4*b^2*cosh(b*x + a)*sinh(b*x + a
)^3 + b^2*sinh(b*x + a)^4 - b^2)

Sympy [F]

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

[In]

integrate(x*csch(b*x+a)**2*sech(b*x+a)**2,x)

[Out]

Integral(x*csch(a + b*x)**2*sech(a + b*x)**2, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (30) = 60\).

Time = 0.20 (sec) , antiderivative size = 87, normalized size of antiderivative = 2.90 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=-\frac {4 \, x e^{\left (4 \, b x + 4 \, a\right )}}{b e^{\left (4 \, b x + 4 \, a\right )} - b} + \frac {\log \left ({\left (e^{\left (b x + a\right )} + 1\right )} e^{\left (-a\right )}\right )}{b^{2}} + \frac {\log \left ({\left (e^{\left (b x + a\right )} - 1\right )} e^{\left (-a\right )}\right )}{b^{2}} + \frac {\log \left ({\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )} e^{\left (-2 \, a\right )}\right )}{b^{2}} \]

[In]

integrate(x*csch(b*x+a)^2*sech(b*x+a)^2,x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (30) = 60\).

Time = 0.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.40 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=-\frac {4 \, b x e^{\left (4 \, b x + 4 \, a\right )} - e^{\left (4 \, b x + 4 \, a\right )} \log \left (e^{\left (4 \, b x + 4 \, a\right )} - 1\right ) + \log \left (e^{\left (4 \, b x + 4 \, a\right )} - 1\right )}{b^{2} e^{\left (4 \, b x + 4 \, a\right )} - b^{2}} \]

[In]

integrate(x*csch(b*x+a)^2*sech(b*x+a)^2,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.43 \[ \int x \text {csch}^2(a+b x) \text {sech}^2(a+b x) \, dx=\frac {\ln \left ({\mathrm {e}}^{4\,a}\,{\mathrm {e}}^{4\,b\,x}-1\right )}{b^2}-\frac {4\,x}{b}-\frac {4\,x}{b\,\left ({\mathrm {e}}^{4\,a+4\,b\,x}-1\right )} \]

[In]

int(x/(cosh(a + b*x)^2*sinh(a + b*x)^2),x)

[Out]

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