### 3.12 $$\int \sinh (c+d x) (a+b \tanh ^2(c+d x))^2 \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0532368, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.095, Rules used = {3664, 270} $\frac{(a+b)^2 \cosh (c+d x)}{d}+\frac{2 b (a+b) \text{sech}(c+d x)}{d}-\frac{b^2 \text{sech}^3(c+d x)}{3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Rubi steps

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

Mathematica [A]  time = 0.308327, size = 46, normalized size = 0.94 $\frac{3 (a+b)^2 \cosh (c+d x)+b \text{sech}(c+d x) \left (6 (a+b)-b \text{sech}^2(c+d x)\right )}{3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 113, normalized size = 2.3 \begin{align*}{\frac{1}{d} \left ({a}^{2}\cosh \left ( dx+c \right ) +2\,ab \left ( -{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{\cosh \left ( dx+c \right ) }}+2\,\cosh \left ( dx+c \right ) \right ) +{b}^{2} \left ({\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{4}}{ \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}+{\frac{4\, \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{3\, \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}-{\frac{8\, \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{3\,\cosh \left ( dx+c \right ) }}+{\frac{8\,\cosh \left ( dx+c \right ) }{3}} \right ) \right ) } \end{align*}

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

[In]

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

[Out]

1/d*(a^2*cosh(d*x+c)+2*a*b*(-sinh(d*x+c)^2/cosh(d*x+c)+2*cosh(d*x+c))+b^2*(sinh(d*x+c)^4/cosh(d*x+c)^3+4/3*sin
h(d*x+c)^2/cosh(d*x+c)^3-8/3*sinh(d*x+c)^2/cosh(d*x+c)+8/3*cosh(d*x+c)))

________________________________________________________________________________________

Maxima [B]  time = 1.13728, size = 231, normalized size = 4.71 \begin{align*} \frac{1}{6} \, b^{2}{\left (\frac{3 \, e^{\left (-d x - c\right )}}{d} + \frac{33 \, e^{\left (-2 \, d x - 2 \, c\right )} + 41 \, e^{\left (-4 \, d x - 4 \, c\right )} + 27 \, e^{\left (-6 \, d x - 6 \, c\right )} + 3}{d{\left (e^{\left (-d x - c\right )} + 3 \, e^{\left (-3 \, d x - 3 \, c\right )} + 3 \, e^{\left (-5 \, d x - 5 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )}\right )}}\right )} + a b{\left (\frac{e^{\left (-d x - c\right )}}{d} + \frac{5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1}{d{\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}\right )} + \frac{a^{2} \cosh \left (d x + c\right )}{d} \end{align*}

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

[In]

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

[Out]

1/6*b^2*(3*e^(-d*x - c)/d + (33*e^(-2*d*x - 2*c) + 41*e^(-4*d*x - 4*c) + 27*e^(-6*d*x - 6*c) + 3)/(d*(e^(-d*x
- c) + 3*e^(-3*d*x - 3*c) + 3*e^(-5*d*x - 5*c) + e^(-7*d*x - 7*c)))) + a*b*(e^(-d*x - c)/d + (5*e^(-2*d*x - 2*
c) + 1)/(d*(e^(-d*x - c) + e^(-3*d*x - 3*c)))) + a^2*cosh(d*x + c)/d

________________________________________________________________________________________

Fricas [B]  time = 2.05838, size = 424, normalized size = 8.65 \begin{align*} \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{4} + 12 \,{\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 6 \,{\left (3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, a^{2} + 8 \, a b + 6 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} + 9 \, a^{2} + 42 \, a b + 25 \, b^{2}}{6 \,{\left (d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + 3 \, d \cosh \left (d x + c\right )\right )}} \end{align*}

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

[In]

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

[Out]

1/6*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 3*(a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 12*(a^2 + 4*a*b + 3*b^2)*
cosh(d*x + c)^2 + 6*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 + 2*a^2 + 8*a*b + 6*b^2)*sinh(d*x + c)^2 + 9*a^2 +
42*a*b + 25*b^2)/(d*cosh(d*x + c)^3 + 3*d*cosh(d*x + c)*sinh(d*x + c)^2 + 3*d*cosh(d*x + c))

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.37067, size = 219, normalized size = 4.47 \begin{align*} \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} e^{\left (-d x - c\right )} + 3 \,{\left (a^{2} e^{\left (d x + 10 \, c\right )} + 2 \, a b e^{\left (d x + 10 \, c\right )} + b^{2} e^{\left (d x + 10 \, c\right )}\right )} e^{\left (-9 \, c\right )} + \frac{8 \,{\left (3 \, a b e^{\left (5 \, d x + 5 \, c\right )} + 3 \, b^{2} e^{\left (5 \, d x + 5 \, c\right )} + 6 \, a b e^{\left (3 \, d x + 3 \, c\right )} + 4 \, b^{2} e^{\left (3 \, d x + 3 \, c\right )} + 3 \, a b e^{\left (d x + c\right )} + 3 \, b^{2} 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(sinh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")

[Out]

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