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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0332959, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.158, Rules used = {3664, 388, 207} $-\frac{a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac{b \text{sech}(c+d x)}{d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Mathematica [A]  time = 0.0267322, size = 52, normalized size = 2. $\frac{a \log \left (\sinh \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{a \log \left (\cosh \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{b \text{sech}(c+d x)}{d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((a*Log[Cosh[c/2 + (d*x)/2]])/d) + (a*Log[Sinh[c/2 + (d*x)/2]])/d - (b*Sech[c + d*x])/d

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.08009, size = 54, normalized size = 2.08 \begin{align*} \frac{a \log \left (\tanh \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}{d} - \frac{2 \, b}{d{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.0839, size = 483, normalized size = 18.58 \begin{align*} -\frac{2 \, b \cosh \left (d x + c\right ) +{\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) -{\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + 2 \, b \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{2} + 2 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + d \sinh \left (d x + c\right )^{2} + d} \end{align*}

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

[In]

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

[Out]

-(2*b*cosh(d*x + c) + (a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*log(cosh(d
*x + c) + sinh(d*x + c) + 1) - (a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*l
og(cosh(d*x + c) + sinh(d*x + c) - 1) + 2*b*sinh(d*x + c))/(d*cosh(d*x + c)^2 + 2*d*cosh(d*x + c)*sinh(d*x + c
) + d*sinh(d*x + c)^2 + 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}{\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)*(a+b*tanh(d*x+c)**2),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.32969, size = 70, normalized size = 2.69 \begin{align*} -\frac{a \log \left (e^{\left (d x + c\right )} + 1\right ) - a \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right ) + \frac{2 \, b e^{\left (d x + c\right )}}{e^{\left (2 \, d x + 2 \, c\right )} + 1}}{d} \end{align*}

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

[In]

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

[Out]

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