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

Optimal. Leaf size=118 $-\frac{\left (a^2+10 a b+13 b^2\right ) \tanh (c+d x)}{4 d}+\frac{1}{8} x \left (3 a^2+30 a b+35 b^2\right )+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{(a+b) (a+9 b) \sinh (c+d x) \cosh (c+d x)}{8 d}-\frac{b^2 \tanh ^3(c+d x)}{3 d}$

[Out]

((3*a^2 + 30*a*b + 35*b^2)*x)/8 - ((a + b)*(a + 9*b)*Cosh[c + d*x]*Sinh[c + d*x])/(8*d) - ((a^2 + 10*a*b + 13*
b^2)*Tanh[c + d*x])/(4*d) + ((a + b)^2*Sinh[c + d*x]^4*Tanh[c + d*x])/(4*d) - (b^2*Tanh[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.132579, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.217, Rules used = {3663, 463, 455, 1153, 206} $-\frac{\left (a^2+10 a b+13 b^2\right ) \tanh (c+d x)}{4 d}+\frac{1}{8} x \left (3 a^2+30 a b+35 b^2\right )+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{(a+b) (a+9 b) \sinh (c+d x) \cosh (c+d x)}{8 d}-\frac{b^2 \tanh ^3(c+d x)}{3 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((3*a^2 + 30*a*b + 35*b^2)*x)/8 - ((a + b)*(a + 9*b)*Cosh[c + d*x]*Sinh[c + d*x])/(8*d) - ((a^2 + 10*a*b + 13*
b^2)*Tanh[c + d*x])/(4*d) + ((a + b)^2*Sinh[c + d*x]^4*Tanh[c + d*x])/(4*d) - (b^2*Tanh[c + d*x]^3)/(3*d)

Rule 3663

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff^(m + 1))/f, Subst[Int[(x^m*(a + b*(ff*x)^n)^p)/(c^2 + ff^2*x^2
)^(m/2 + 1), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/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 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 1153

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 206

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

Rubi steps

\begin{align*} \int \sinh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4 \left (a+b x^2\right )^2}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \frac{x^4 \left (a^2+10 a b+5 b^2+4 b^2 x^2\right )}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 d}\\ &=-\frac{(a+b) (a+9 b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \frac{-(a+b) (a+9 b)-2 (a+b) (a+9 b) x^2-8 b^2 x^4}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=-\frac{(a+b) (a+9 b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{\operatorname{Subst}\left (\int \left (2 \left (a^2+10 a b+13 b^2\right )+8 b^2 x^2+\frac{-3 a^2-30 a b-35 b^2}{1-x^2}\right ) \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=-\frac{(a+b) (a+9 b) \cosh (c+d x) \sinh (c+d x)}{8 d}-\frac{\left (a^2+10 a b+13 b^2\right ) \tanh (c+d x)}{4 d}+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{b^2 \tanh ^3(c+d x)}{3 d}+\frac{\left (3 a^2+30 a b+35 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=\frac{1}{8} \left (3 a^2+30 a b+35 b^2\right ) x-\frac{(a+b) (a+9 b) \cosh (c+d x) \sinh (c+d x)}{8 d}-\frac{\left (a^2+10 a b+13 b^2\right ) \tanh (c+d x)}{4 d}+\frac{(a+b)^2 \sinh ^4(c+d x) \tanh (c+d x)}{4 d}-\frac{b^2 \tanh ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 1.37418, size = 94, normalized size = 0.8 $\frac{12 \left (3 a^2+30 a b+35 b^2\right ) (c+d x)-24 \left (a^2+4 a b+3 b^2\right ) \sinh (2 (c+d x))+3 (a+b)^2 \sinh (4 (c+d x))+32 b \tanh (c+d x) \left (-6 a+b \text{sech}^2(c+d x)-10 b\right )}{96 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(12*(3*a^2 + 30*a*b + 35*b^2)*(c + d*x) - 24*(a^2 + 4*a*b + 3*b^2)*Sinh[2*(c + d*x)] + 3*(a + b)^2*Sinh[4*(c +
d*x)] + 32*b*(-6*a - 10*b + b*Sech[c + d*x]^2)*Tanh[c + d*x])/(96*d)

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 166, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ({a}^{2} \left ( \left ({\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{3}}{4}}-{\frac{3\,\sinh \left ( dx+c \right ) }{8}} \right ) \cosh \left ( dx+c \right ) +{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +2\,ab \left ( 1/4\,{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{5}}{\cosh \left ( dx+c \right ) }}-5/8\,{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{3}}{\cosh \left ( dx+c \right ) }}+{\frac{15\,dx}{8}}+{\frac{15\,c}{8}}-{\frac{15\,\tanh \left ( dx+c \right ) }{8}} \right ) +{b}^{2} \left ({\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{7}}{4\, \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}-{\frac{7\, \left ( \sinh \left ( dx+c \right ) \right ) ^{5}}{8\, \left ( \cosh \left ( dx+c \right ) \right ) ^{3}}}+{\frac{35\,dx}{8}}+{\frac{35\,c}{8}}-{\frac{35\,\tanh \left ( dx+c \right ) }{8}}-{\frac{35\, \left ( \tanh \left ( dx+c \right ) \right ) ^{3}}{24}} \right ) \right ) } \end{align*}

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

[In]

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

[Out]

1/d*(a^2*((1/4*sinh(d*x+c)^3-3/8*sinh(d*x+c))*cosh(d*x+c)+3/8*d*x+3/8*c)+2*a*b*(1/4*sinh(d*x+c)^5/cosh(d*x+c)-
5/8*sinh(d*x+c)^3/cosh(d*x+c)+15/8*d*x+15/8*c-15/8*tanh(d*x+c))+b^2*(1/4*sinh(d*x+c)^7/cosh(d*x+c)^3-7/8*sinh(
d*x+c)^5/cosh(d*x+c)^3+35/8*d*x+35/8*c-35/8*tanh(d*x+c)-35/24*tanh(d*x+c)^3))

________________________________________________________________________________________

Maxima [B]  time = 1.11824, size = 398, normalized size = 3.37 \begin{align*} \frac{1}{64} \, a^{2}{\left (24 \, x + \frac{e^{\left (4 \, d x + 4 \, c\right )}}{d} - \frac{8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac{8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac{e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} + \frac{1}{192} \, b^{2}{\left (\frac{840 \,{\left (d x + c\right )}}{d} + \frac{3 \,{\left (24 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )}\right )}}{d} - \frac{63 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1487 \, e^{\left (-4 \, d x - 4 \, c\right )} + 2517 \, e^{\left (-6 \, d x - 6 \, c\right )} + 1608 \, e^{\left (-8 \, d x - 8 \, c\right )} - 3}{d{\left (e^{\left (-4 \, d x - 4 \, c\right )} + 3 \, e^{\left (-6 \, d x - 6 \, c\right )} + 3 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )}\right )}}\right )} + \frac{1}{32} \, a b{\left (\frac{120 \,{\left (d x + c\right )}}{d} + \frac{16 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )}}{d} - \frac{15 \, e^{\left (-2 \, d x - 2 \, c\right )} + 144 \, e^{\left (-4 \, d x - 4 \, c\right )} - 1}{d{\left (e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}\right )} \end{align*}

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

[In]

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

[Out]

1/64*a^2*(24*x + e^(4*d*x + 4*c)/d - 8*e^(2*d*x + 2*c)/d + 8*e^(-2*d*x - 2*c)/d - e^(-4*d*x - 4*c)/d) + 1/192*
b^2*(840*(d*x + c)/d + 3*(24*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c))/d - (63*e^(-2*d*x - 2*c) + 1487*e^(-4*d*x -
4*c) + 2517*e^(-6*d*x - 6*c) + 1608*e^(-8*d*x - 8*c) - 3)/(d*(e^(-4*d*x - 4*c) + 3*e^(-6*d*x - 6*c) + 3*e^(-8*
d*x - 8*c) + e^(-10*d*x - 10*c)))) + 1/32*a*b*(120*(d*x + c)/d + (16*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c))/d -
(15*e^(-2*d*x - 2*c) + 144*e^(-4*d*x - 4*c) - 1)/(d*(e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c))))

________________________________________________________________________________________

Fricas [B]  time = 2.06828, size = 1021, normalized size = 8.65 \begin{align*} \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{7} + 3 \,{\left (21 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} - 5 \, a^{2} - 26 \, a b - 21 \, b^{2}\right )} \sinh \left (d x + c\right )^{5} + 8 \,{\left (3 \,{\left (3 \, a^{2} + 30 \, a b + 35 \, b^{2}\right )} d x + 48 \, a b + 80 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + 24 \,{\left (3 \,{\left (3 \, a^{2} + 30 \, a b + 35 \, b^{2}\right )} d x + 48 \, a b + 80 \, b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} +{\left (105 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} - 30 \,{\left (5 \, a^{2} + 26 \, a b + 21 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} - 63 \, a^{2} - 654 \, a b - 847 \, b^{2}\right )} \sinh \left (d x + c\right )^{3} + 24 \,{\left (3 \,{\left (3 \, a^{2} + 30 \, a b + 35 \, b^{2}\right )} d x + 48 \, a b + 80 \, b^{2}\right )} \cosh \left (d x + c\right ) + 3 \,{\left (7 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{6} - 5 \,{\left (5 \, a^{2} + 26 \, a b + 21 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} -{\left (63 \, a^{2} + 654 \, a b + 847 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} - 15 \, a^{2} - 190 \, a b - 175 \, b^{2}\right )} \sinh \left (d x + c\right )}{192 \,{\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)^4*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/192*(3*(a^2 + 2*a*b + b^2)*sinh(d*x + c)^7 + 3*(21*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 - 5*a^2 - 26*a*b - 21
*b^2)*sinh(d*x + c)^5 + 8*(3*(3*a^2 + 30*a*b + 35*b^2)*d*x + 48*a*b + 80*b^2)*cosh(d*x + c)^3 + 24*(3*(3*a^2 +
30*a*b + 35*b^2)*d*x + 48*a*b + 80*b^2)*cosh(d*x + c)*sinh(d*x + c)^2 + (105*(a^2 + 2*a*b + b^2)*cosh(d*x + c
)^4 - 30*(5*a^2 + 26*a*b + 21*b^2)*cosh(d*x + c)^2 - 63*a^2 - 654*a*b - 847*b^2)*sinh(d*x + c)^3 + 24*(3*(3*a^
2 + 30*a*b + 35*b^2)*d*x + 48*a*b + 80*b^2)*cosh(d*x + c) + 3*(7*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^6 - 5*(5*a^
2 + 26*a*b + 21*b^2)*cosh(d*x + c)^4 - (63*a^2 + 654*a*b + 847*b^2)*cosh(d*x + c)^2 - 15*a^2 - 190*a*b - 175*b
^2)*sinh(d*x + c))/(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(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.72564, size = 398, normalized size = 3.37 \begin{align*} \frac{24 \,{\left (3 \, a^{2} + 30 \, a b + 35 \, b^{2}\right )} d x - 3 \,{\left (18 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 180 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 210 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} - 8 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 32 \, a b e^{\left (2 \, d x + 2 \, c\right )} - 24 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + a^{2} + 2 \, a b + b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + 3 \,{\left (a^{2} e^{\left (4 \, d x + 28 \, c\right )} + 2 \, a b e^{\left (4 \, d x + 28 \, c\right )} + b^{2} e^{\left (4 \, d x + 28 \, c\right )} - 8 \, a^{2} e^{\left (2 \, d x + 26 \, c\right )} - 32 \, a b e^{\left (2 \, d x + 26 \, c\right )} - 24 \, b^{2} e^{\left (2 \, d x + 26 \, c\right )}\right )} e^{\left (-24 \, c\right )} + \frac{256 \,{\left (3 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 6 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 9 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a b + 5 \, b^{2}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}}{192 \, d} \end{align*}

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

[In]

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

[Out]

1/192*(24*(3*a^2 + 30*a*b + 35*b^2)*d*x - 3*(18*a^2*e^(4*d*x + 4*c) + 180*a*b*e^(4*d*x + 4*c) + 210*b^2*e^(4*d
*x + 4*c) - 8*a^2*e^(2*d*x + 2*c) - 32*a*b*e^(2*d*x + 2*c) - 24*b^2*e^(2*d*x + 2*c) + a^2 + 2*a*b + b^2)*e^(-4
*d*x - 4*c) + 3*(a^2*e^(4*d*x + 28*c) + 2*a*b*e^(4*d*x + 28*c) + b^2*e^(4*d*x + 28*c) - 8*a^2*e^(2*d*x + 26*c)
- 32*a*b*e^(2*d*x + 26*c) - 24*b^2*e^(2*d*x + 26*c))*e^(-24*c) + 256*(3*a*b*e^(4*d*x + 4*c) + 6*b^2*e^(4*d*x
+ 4*c) + 6*a*b*e^(2*d*x + 2*c) + 9*b^2*e^(2*d*x + 2*c) + 3*a*b + 5*b^2)/(e^(2*d*x + 2*c) + 1)^3)/d