### 3.7 $$\int \text{csch}^3(c+d x) (a+b \tanh ^2(c+d x)) \, dx$$

Optimal. Leaf size=51 $\frac{(a-2 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}-\frac{a \coth (c+d x) \text{csch}(c+d x)}{2 d}+\frac{b \text{sech}(c+d x)}{d}$

[Out]

((a - 2*b)*ArcTanh[Cosh[c + d*x]])/(2*d) - (a*Coth[c + d*x]*Csch[c + d*x])/(2*d) + (b*Sech[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0588961, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.19, Rules used = {3664, 455, 388, 207} $\frac{(a-2 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}-\frac{a \coth (c+d x) \text{csch}(c+d x)}{2 d}+\frac{b \text{sech}(c+d x)}{d}$

Antiderivative was successfully veriﬁed.

[In]

Int[Csch[c + d*x]^3*(a + b*Tanh[c + d*x]^2),x]

[Out]

((a - 2*b)*ArcTanh[Cosh[c + d*x]])/(2*d) - (a*Coth[c + d*x]*Csch[c + d*x])/(2*d) + (b*Sech[c + d*x])/d

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 455

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[(a + b*x^2)^(p + 1)*E
xpandToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)]
- (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[
m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 388

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 207

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

Rubi steps

\begin{align*} \int \text{csch}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (a+b-b x^2\right )}{\left (-1+x^2\right )^2} \, dx,x,\text{sech}(c+d x)\right )}{d}\\ &=-\frac{a \coth (c+d x) \text{csch}(c+d x)}{2 d}+\frac{\operatorname{Subst}\left (\int \frac{-a+2 b x^2}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{2 d}\\ &=-\frac{a \coth (c+d x) \text{csch}(c+d x)}{2 d}+\frac{b \text{sech}(c+d x)}{d}-\frac{(a-2 b) \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{2 d}\\ &=\frac{(a-2 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}-\frac{a \coth (c+d x) \text{csch}(c+d x)}{2 d}+\frac{b \text{sech}(c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0457941, size = 87, normalized size = 1.71 $-\frac{a \text{csch}^2\left (\frac{1}{2} (c+d x)\right )}{8 d}-\frac{a \text{sech}^2\left (\frac{1}{2} (c+d x)\right )}{8 d}-\frac{a \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}+\frac{b \text{sech}(c+d x)}{d}+\frac{b \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )}{d}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Csch[c + d*x]^3*(a + b*Tanh[c + d*x]^2),x]

[Out]

-(a*Csch[(c + d*x)/2]^2)/(8*d) - (a*Log[Tanh[(c + d*x)/2]])/(2*d) + (b*Log[Tanh[(c + d*x)/2]])/d - (a*Sech[(c
+ d*x)/2]^2)/(8*d) + (b*Sech[c + d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 50, normalized size = 1. \begin{align*}{\frac{1}{d} \left ( a \left ( -{\frac{{\rm csch} \left (dx+c\right ){\rm coth} \left (dx+c\right )}{2}}+{\it Artanh} \left ({{\rm e}^{dx+c}} \right ) \right ) +b \left ( \left ( \cosh \left ( dx+c \right ) \right ) ^{-1}-2\,{\it Artanh} \left ({{\rm e}^{dx+c}} \right ) \right ) \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(csch(d*x+c)^3*(a+b*tanh(d*x+c)^2),x)

[Out]

1/d*(a*(-1/2*csch(d*x+c)*coth(d*x+c)+arctanh(exp(d*x+c)))+b*(1/cosh(d*x+c)-2*arctanh(exp(d*x+c))))

________________________________________________________________________________________

Maxima [B]  time = 1.1012, size = 205, normalized size = 4.02 \begin{align*} \frac{1}{2} \, a{\left (\frac{\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} - \frac{\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac{2 \,{\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}{d{\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )}}\right )} - b{\left (\frac{\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} - \frac{\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} - \frac{2 \, e^{\left (-d x - c\right )}}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.21944, size = 2480, normalized size = 48.63 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/2*(2*(a - 2*b)*cosh(d*x + c)^5 + 10*(a - 2*b)*cosh(d*x + c)*sinh(d*x + c)^4 + 2*(a - 2*b)*sinh(d*x + c)^5 +
4*(a + 2*b)*cosh(d*x + c)^3 + 4*(5*(a - 2*b)*cosh(d*x + c)^2 + a + 2*b)*sinh(d*x + c)^3 + 4*(5*(a - 2*b)*cosh
(d*x + c)^3 + 3*(a + 2*b)*cosh(d*x + c))*sinh(d*x + c)^2 + 2*(a - 2*b)*cosh(d*x + c) - ((a - 2*b)*cosh(d*x + c
)^6 + 6*(a - 2*b)*cosh(d*x + c)*sinh(d*x + c)^5 + (a - 2*b)*sinh(d*x + c)^6 - (a - 2*b)*cosh(d*x + c)^4 + (15*
(a - 2*b)*cosh(d*x + c)^2 - a + 2*b)*sinh(d*x + c)^4 + 4*(5*(a - 2*b)*cosh(d*x + c)^3 - (a - 2*b)*cosh(d*x + c
))*sinh(d*x + c)^3 - (a - 2*b)*cosh(d*x + c)^2 + (15*(a - 2*b)*cosh(d*x + c)^4 - 6*(a - 2*b)*cosh(d*x + c)^2 -
a + 2*b)*sinh(d*x + c)^2 + 2*(3*(a - 2*b)*cosh(d*x + c)^5 - 2*(a - 2*b)*cosh(d*x + c)^3 - (a - 2*b)*cosh(d*x
+ c))*sinh(d*x + c) + a - 2*b)*log(cosh(d*x + c) + sinh(d*x + c) + 1) + ((a - 2*b)*cosh(d*x + c)^6 + 6*(a - 2*
b)*cosh(d*x + c)*sinh(d*x + c)^5 + (a - 2*b)*sinh(d*x + c)^6 - (a - 2*b)*cosh(d*x + c)^4 + (15*(a - 2*b)*cosh(
d*x + c)^2 - a + 2*b)*sinh(d*x + c)^4 + 4*(5*(a - 2*b)*cosh(d*x + c)^3 - (a - 2*b)*cosh(d*x + c))*sinh(d*x + c
)^3 - (a - 2*b)*cosh(d*x + c)^2 + (15*(a - 2*b)*cosh(d*x + c)^4 - 6*(a - 2*b)*cosh(d*x + c)^2 - a + 2*b)*sinh(
d*x + c)^2 + 2*(3*(a - 2*b)*cosh(d*x + c)^5 - 2*(a - 2*b)*cosh(d*x + c)^3 - (a - 2*b)*cosh(d*x + c))*sinh(d*x
+ c) + a - 2*b)*log(cosh(d*x + c) + sinh(d*x + c) - 1) + 2*(5*(a - 2*b)*cosh(d*x + c)^4 + 6*(a + 2*b)*cosh(d*x
+ c)^2 + a - 2*b)*sinh(d*x + c))/(d*cosh(d*x + c)^6 + 6*d*cosh(d*x + c)*sinh(d*x + c)^5 + d*sinh(d*x + c)^6 -
d*cosh(d*x + c)^4 + (15*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^4 + 4*(5*d*cosh(d*x + c)^3 - d*cosh(d*x + c))*si
nh(d*x + c)^3 - d*cosh(d*x + c)^2 + (15*d*cosh(d*x + c)^4 - 6*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^2 + 2*(3*d*
cosh(d*x + c)^5 - 2*d*cosh(d*x + c)^3 - d*cosh(d*x + c))*sinh(d*x + c) + d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \operatorname{csch}^{3}{\left (c + d x \right )}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)**3*(a+b*tanh(d*x+c)**2),x)

[Out]

Integral((a + b*tanh(c + d*x)**2)*csch(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.20788, size = 153, normalized size = 3. \begin{align*} \frac{{\left (a e^{c} - 2 \, b e^{c}\right )} e^{\left (-c\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) -{\left (a e^{c} - 2 \, b e^{c}\right )} e^{\left (-c\right )} \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right ) + \frac{4 \, b e^{\left (d x + c\right )}}{e^{\left (2 \, d x + 2 \, c\right )} + 1} - \frac{2 \,{\left (a e^{\left (3 \, d x + 3 \, c\right )} + a e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}}}{2 \, d} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^3*(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*((a*e^c - 2*b*e^c)*e^(-c)*log(e^(d*x + c) + 1) - (a*e^c - 2*b*e^c)*e^(-c)*log(abs(e^(d*x + c) - 1)) + 4*b*
e^(d*x + c)/(e^(2*d*x + 2*c) + 1) - 2*(a*e^(3*d*x + 3*c) + a*e^(d*x + c))/(e^(2*d*x + 2*c) - 1)^2)/d