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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11943, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.217, Rules used = {3664, 463, 459, 321, 207} $-\frac{a^2 \text{csch}^2(c+d x) \text{sech}(c+d x)}{2 d}-\frac{a (a-4 b) \text{sech}(c+d x)}{2 d}+\frac{a (a-4 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}-\frac{b^2 \text{sech}^3(c+d x)}{3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(a*(a - 4*b)*ArcTanh[Cosh[c + d*x]])/(2*d) - (a*(a - 4*b)*Sech[c + d*x])/(2*d) - (a^2*Csch[c + d*x]^2*Sech[c +
d*x])/(2*d) - (b^2*Sech[c + d*x]^3)/(3*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 463

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

Rule 459

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

Rule 321

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

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 )^2 \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (a+b-b x^2\right )^2}{\left (-1+x^2\right )^2} \, dx,x,\text{sech}(c+d x)\right )}{d}\\ &=-\frac{a^2 \text{csch}^2(c+d x) \text{sech}(c+d x)}{2 d}-\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (3 a^2-2 (a+b)^2+2 b^2 x^2\right )}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{2 d}\\ &=-\frac{a^2 \text{csch}^2(c+d x) \text{sech}(c+d x)}{2 d}-\frac{b^2 \text{sech}^3(c+d x)}{3 d}-\frac{(a (a-4 b)) \operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{2 d}\\ &=-\frac{a (a-4 b) \text{sech}(c+d x)}{2 d}-\frac{a^2 \text{csch}^2(c+d x) \text{sech}(c+d x)}{2 d}-\frac{b^2 \text{sech}^3(c+d x)}{3 d}-\frac{(a (a-4 b)) \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{2 d}\\ &=\frac{a (a-4 b) \tanh ^{-1}(\cosh (c+d x))}{2 d}-\frac{a (a-4 b) \text{sech}(c+d x)}{2 d}-\frac{a^2 \text{csch}^2(c+d x) \text{sech}(c+d x)}{2 d}-\frac{b^2 \text{sech}^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 1.54012, size = 96, normalized size = 1.17 $-\frac{3 a^2 \text{csch}^2\left (\frac{1}{2} (c+d x)\right )+3 a^2 \text{sech}^2\left (\frac{1}{2} (c+d x)\right )+12 a^2 \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )-48 a b \text{sech}(c+d x)-48 a b \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )+8 b^2 \text{sech}^3(c+d x)}{24 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.062, size = 103, normalized size = 1.3 \begin{align*}{\frac{1}{d} \left ({a}^{2} \left ( -{\frac{{\rm csch} \left (dx+c\right ){\rm coth} \left (dx+c\right )}{2}}+{\it Artanh} \left ({{\rm e}^{dx+c}} \right ) \right ) +2\,ab \left ( \left ( \cosh \left ( dx+c \right ) \right ) ^{-1}-2\,{\it Artanh} \left ({{\rm e}^{dx+c}} \right ) \right ) +{b}^{2} \left ({\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{3\, \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}+{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{3\,\cosh \left ( dx+c \right ) }}-{\frac{\cosh \left ( dx+c \right ) }{3}} \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)^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.05745, size = 244, normalized size = 2.98 \begin{align*} \frac{1}{2} \, a^{2}{\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 )} - 2 \, a 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 )} - \frac{8 \, b^{2}}{3 \, d{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{3}} \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)^2,x, algorithm="maxima")

[Out]

1/2*a^2*(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))) - 2*a*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))) - 8/3*b^2/(d*(e^(d*x + c) + e^(-d*x - c))^3)

________________________________________________________________________________________

Fricas [B]  time = 2.31955, size = 6384, normalized size = 77.85 \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)^2,x, algorithm="fricas")

[Out]

-1/6*(6*(a^2 - 4*a*b)*cosh(d*x + c)^9 + 54*(a^2 - 4*a*b)*cosh(d*x + c)*sinh(d*x + c)^8 + 6*(a^2 - 4*a*b)*sinh(
d*x + c)^9 + 8*(3*a^2 + 2*b^2)*cosh(d*x + c)^7 + 8*(27*(a^2 - 4*a*b)*cosh(d*x + c)^2 + 3*a^2 + 2*b^2)*sinh(d*x
+ c)^7 + 56*(9*(a^2 - 4*a*b)*cosh(d*x + c)^3 + (3*a^2 + 2*b^2)*cosh(d*x + c))*sinh(d*x + c)^6 + 4*(9*a^2 + 12
*a*b - 8*b^2)*cosh(d*x + c)^5 + 4*(189*(a^2 - 4*a*b)*cosh(d*x + c)^4 + 42*(3*a^2 + 2*b^2)*cosh(d*x + c)^2 + 9*
a^2 + 12*a*b - 8*b^2)*sinh(d*x + c)^5 + 4*(189*(a^2 - 4*a*b)*cosh(d*x + c)^5 + 70*(3*a^2 + 2*b^2)*cosh(d*x + c
)^3 + 5*(9*a^2 + 12*a*b - 8*b^2)*cosh(d*x + c))*sinh(d*x + c)^4 + 8*(3*a^2 + 2*b^2)*cosh(d*x + c)^3 + 8*(63*(a
^2 - 4*a*b)*cosh(d*x + c)^6 + 35*(3*a^2 + 2*b^2)*cosh(d*x + c)^4 + 5*(9*a^2 + 12*a*b - 8*b^2)*cosh(d*x + c)^2
+ 3*a^2 + 2*b^2)*sinh(d*x + c)^3 + 8*(27*(a^2 - 4*a*b)*cosh(d*x + c)^7 + 21*(3*a^2 + 2*b^2)*cosh(d*x + c)^5 +
5*(9*a^2 + 12*a*b - 8*b^2)*cosh(d*x + c)^3 + 3*(3*a^2 + 2*b^2)*cosh(d*x + c))*sinh(d*x + c)^2 + 6*(a^2 - 4*a*b
)*cosh(d*x + c) - 3*((a^2 - 4*a*b)*cosh(d*x + c)^10 + 10*(a^2 - 4*a*b)*cosh(d*x + c)*sinh(d*x + c)^9 + (a^2 -
4*a*b)*sinh(d*x + c)^10 + (a^2 - 4*a*b)*cosh(d*x + c)^8 + (45*(a^2 - 4*a*b)*cosh(d*x + c)^2 + a^2 - 4*a*b)*sin
h(d*x + c)^8 + 8*(15*(a^2 - 4*a*b)*cosh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c))*sinh(d*x + c)^7 - 2*(a^2 - 4
*a*b)*cosh(d*x + c)^6 + 2*(105*(a^2 - 4*a*b)*cosh(d*x + c)^4 + 14*(a^2 - 4*a*b)*cosh(d*x + c)^2 - a^2 + 4*a*b)
*sinh(d*x + c)^6 + 4*(63*(a^2 - 4*a*b)*cosh(d*x + c)^5 + 14*(a^2 - 4*a*b)*cosh(d*x + c)^3 - 3*(a^2 - 4*a*b)*co
sh(d*x + c))*sinh(d*x + c)^5 - 2*(a^2 - 4*a*b)*cosh(d*x + c)^4 + 2*(105*(a^2 - 4*a*b)*cosh(d*x + c)^6 + 35*(a^
2 - 4*a*b)*cosh(d*x + c)^4 - 15*(a^2 - 4*a*b)*cosh(d*x + c)^2 - a^2 + 4*a*b)*sinh(d*x + c)^4 + 8*(15*(a^2 - 4*
a*b)*cosh(d*x + c)^7 + 7*(a^2 - 4*a*b)*cosh(d*x + c)^5 - 5*(a^2 - 4*a*b)*cosh(d*x + c)^3 - (a^2 - 4*a*b)*cosh(
d*x + c))*sinh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c)^2 + (45*(a^2 - 4*a*b)*cosh(d*x + c)^8 + 28*(a^2 - 4*a*
b)*cosh(d*x + c)^6 - 30*(a^2 - 4*a*b)*cosh(d*x + c)^4 - 12*(a^2 - 4*a*b)*cosh(d*x + c)^2 + a^2 - 4*a*b)*sinh(d
*x + c)^2 + a^2 - 4*a*b + 2*(5*(a^2 - 4*a*b)*cosh(d*x + c)^9 + 4*(a^2 - 4*a*b)*cosh(d*x + c)^7 - 6*(a^2 - 4*a*
b)*cosh(d*x + c)^5 - 4*(a^2 - 4*a*b)*cosh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c))*sinh(d*x + c))*log(cosh(d*
x + c) + sinh(d*x + c) + 1) + 3*((a^2 - 4*a*b)*cosh(d*x + c)^10 + 10*(a^2 - 4*a*b)*cosh(d*x + c)*sinh(d*x + c)
^9 + (a^2 - 4*a*b)*sinh(d*x + c)^10 + (a^2 - 4*a*b)*cosh(d*x + c)^8 + (45*(a^2 - 4*a*b)*cosh(d*x + c)^2 + a^2
- 4*a*b)*sinh(d*x + c)^8 + 8*(15*(a^2 - 4*a*b)*cosh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c))*sinh(d*x + c)^7
- 2*(a^2 - 4*a*b)*cosh(d*x + c)^6 + 2*(105*(a^2 - 4*a*b)*cosh(d*x + c)^4 + 14*(a^2 - 4*a*b)*cosh(d*x + c)^2 -
a^2 + 4*a*b)*sinh(d*x + c)^6 + 4*(63*(a^2 - 4*a*b)*cosh(d*x + c)^5 + 14*(a^2 - 4*a*b)*cosh(d*x + c)^3 - 3*(a^2
- 4*a*b)*cosh(d*x + c))*sinh(d*x + c)^5 - 2*(a^2 - 4*a*b)*cosh(d*x + c)^4 + 2*(105*(a^2 - 4*a*b)*cosh(d*x + c
)^6 + 35*(a^2 - 4*a*b)*cosh(d*x + c)^4 - 15*(a^2 - 4*a*b)*cosh(d*x + c)^2 - a^2 + 4*a*b)*sinh(d*x + c)^4 + 8*(
15*(a^2 - 4*a*b)*cosh(d*x + c)^7 + 7*(a^2 - 4*a*b)*cosh(d*x + c)^5 - 5*(a^2 - 4*a*b)*cosh(d*x + c)^3 - (a^2 -
4*a*b)*cosh(d*x + c))*sinh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c)^2 + (45*(a^2 - 4*a*b)*cosh(d*x + c)^8 + 28
*(a^2 - 4*a*b)*cosh(d*x + c)^6 - 30*(a^2 - 4*a*b)*cosh(d*x + c)^4 - 12*(a^2 - 4*a*b)*cosh(d*x + c)^2 + a^2 - 4
*a*b)*sinh(d*x + c)^2 + a^2 - 4*a*b + 2*(5*(a^2 - 4*a*b)*cosh(d*x + c)^9 + 4*(a^2 - 4*a*b)*cosh(d*x + c)^7 - 6
*(a^2 - 4*a*b)*cosh(d*x + c)^5 - 4*(a^2 - 4*a*b)*cosh(d*x + c)^3 + (a^2 - 4*a*b)*cosh(d*x + c))*sinh(d*x + c))
*log(cosh(d*x + c) + sinh(d*x + c) - 1) + 2*(27*(a^2 - 4*a*b)*cosh(d*x + c)^8 + 28*(3*a^2 + 2*b^2)*cosh(d*x +
c)^6 + 10*(9*a^2 + 12*a*b - 8*b^2)*cosh(d*x + c)^4 + 12*(3*a^2 + 2*b^2)*cosh(d*x + c)^2 + 3*a^2 - 12*a*b)*sinh
(d*x + c))/(d*cosh(d*x + c)^10 + 10*d*cosh(d*x + c)*sinh(d*x + c)^9 + d*sinh(d*x + c)^10 + d*cosh(d*x + c)^8 +
(45*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^8 + 8*(15*d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d*x + c)^7 - 2*d
*cosh(d*x + c)^6 + 2*(105*d*cosh(d*x + c)^4 + 14*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^6 + 4*(63*d*cosh(d*x + c
)^5 + 14*d*cosh(d*x + c)^3 - 3*d*cosh(d*x + c))*sinh(d*x + c)^5 - 2*d*cosh(d*x + c)^4 + 2*(105*d*cosh(d*x + c)
^6 + 35*d*cosh(d*x + c)^4 - 15*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^4 + 8*(15*d*cosh(d*x + c)^7 + 7*d*cosh(d*x
+ c)^5 - 5*d*cosh(d*x + c)^3 - d*cosh(d*x + c))*sinh(d*x + c)^3 + d*cosh(d*x + c)^2 + (45*d*cosh(d*x + c)^8 +
28*d*cosh(d*x + c)^6 - 30*d*cosh(d*x + c)^4 - 12*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^2 + 2*(5*d*cosh(d*x + c
)^9 + 4*d*cosh(d*x + c)^7 - 6*d*cosh(d*x + c)^5 - 4*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 )^{2} \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)**2,x)

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.373, size = 227, normalized size = 2.77 \begin{align*} \frac{3 \,{\left (a^{2} e^{c} - 4 \, a b e^{c}\right )} e^{\left (-c\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) - 3 \,{\left (a^{2} e^{c} - 4 \, a b e^{c}\right )} e^{\left (-c\right )} \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right ) - \frac{6 \,{\left (a^{2} e^{\left (3 \, d x + 3 \, c\right )} + a^{2} e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}} + \frac{8 \,{\left (3 \, a b e^{\left (5 \, d x + 5 \, c\right )} + 6 \, a b e^{\left (3 \, d x + 3 \, c\right )} - 2 \, b^{2} e^{\left (3 \, d x + 3 \, c\right )} + 3 \, a b e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}}{6 \, 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)^2,x, algorithm="giac")

[Out]

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