### 3.90 $$\int \cosh ^3(c+d x) (a+b \tanh ^2(c+d x))^2 \, dx$$

Optimal. Leaf size=54 $\frac{\left (a^2-b^2\right ) \sinh (c+d x)}{d}+\frac{(a+b)^2 \sinh ^3(c+d x)}{3 d}+\frac{b^2 \tan ^{-1}(\sinh (c+d x))}{d}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0603328, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.13, Rules used = {3676, 390, 203} $\frac{\left (a^2-b^2\right ) \sinh (c+d x)}{d}+\frac{(a+b)^2 \sinh ^3(c+d x)}{3 d}+\frac{b^2 \tan ^{-1}(\sinh (c+d x))}{d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.442775, size = 71, normalized size = 1.31 $\frac{\sinh (c+d x) \left ((a+b) ((a+b) \cosh (2 (c+d x))+5 a-7 b)+\frac{6 b^2 \tanh ^{-1}\left (\sqrt{-\sinh ^2(c+d x)}\right )}{\sqrt{-\sinh ^2(c+d x)}}\right )}{6 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sinh[c + d*x]*((a + b)*(5*a - 7*b + (a + b)*Cosh[2*(c + d*x)]) + (6*b^2*ArcTanh[Sqrt[-Sinh[c + d*x]^2]])/Sqrt
[-Sinh[c + d*x]^2]))/(6*d)

________________________________________________________________________________________

Maple [B]  time = 0.043, size = 117, normalized size = 2.2 \begin{align*}{\frac{2\,{a}^{2}\sinh \left ( dx+c \right ) }{3\,d}}+{\frac{{a}^{2}\sinh \left ( dx+c \right ) \left ( \cosh \left ( dx+c \right ) \right ) ^{2}}{3\,d}}+{\frac{2\,ab \left ( \cosh \left ( dx+c \right ) \right ) ^{2}\sinh \left ( dx+c \right ) }{3\,d}}-{\frac{2\,ab\sinh \left ( dx+c \right ) }{3\,d}}+{\frac{{b}^{2} \left ( \sinh \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-{\frac{{b}^{2}\sinh \left ( dx+c \right ) }{d}}+2\,{\frac{{b}^{2}\arctan \left ({{\rm e}^{dx+c}} \right ) }{d}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.67404, size = 217, normalized size = 4.02 \begin{align*} \frac{a b{\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3}}{12 \, d} - \frac{1}{24} \, b^{2}{\left (\frac{{\left (15 \, e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )} e^{\left (3 \, d x + 3 \, c\right )}}{d} - \frac{15 \, e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d} + \frac{48 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d}\right )} + \frac{1}{24} \, a^{2}{\left (\frac{e^{\left (3 \, d x + 3 \, c\right )}}{d} + \frac{9 \, e^{\left (d x + c\right )}}{d} - \frac{9 \, e^{\left (-d x - c\right )}}{d} - \frac{e^{\left (-3 \, d x - 3 \, c\right )}}{d}\right )} \end{align*}

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

[In]

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

[Out]

1/12*a*b*(e^(d*x + c) - e^(-d*x - c))^3/d - 1/24*b^2*((15*e^(-2*d*x - 2*c) - 1)*e^(3*d*x + 3*c)/d - (15*e^(-d*
x - c) - e^(-3*d*x - 3*c))/d + 48*arctan(e^(-d*x - c))/d) + 1/24*a^2*(e^(3*d*x + 3*c)/d + 9*e^(d*x + c)/d - 9*
e^(-d*x - c)/d - e^(-3*d*x - 3*c)/d)

________________________________________________________________________________________

Fricas [B]  time = 1.92637, size = 1314, normalized size = 24.33 \begin{align*} \frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{6} + 6 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} +{\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{6} + 3 \,{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + 3 \,{\left (5 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} + 3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \sinh \left (d x + c\right )^{4} + 4 \,{\left (5 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} + 3 \,{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} - 3 \,{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 3 \,{\left (5 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 6 \,{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} - 3 \, a^{2} + 2 \, a b + 5 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} - a^{2} - 2 \, a b - b^{2} + 48 \,{\left (b^{2} \cosh \left (d x + c\right )^{3} + 3 \, b^{2} \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right ) + 3 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{3}\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 6 \,{\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{5} + 2 \,{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} -{\left (3 \, a^{2} - 2 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{24 \,{\left (d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right ) + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + d \sinh \left (d x + c\right )^{3}\right )}} \end{align*}

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

[In]

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

[Out]

1/24*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^6 + 6*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^5 + (a^2 + 2*a*b
+ b^2)*sinh(d*x + c)^6 + 3*(3*a^2 - 2*a*b - 5*b^2)*cosh(d*x + c)^4 + 3*(5*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2
+ 3*a^2 - 2*a*b - 5*b^2)*sinh(d*x + c)^4 + 4*(5*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 + 3*(3*a^2 - 2*a*b - 5*b^
2)*cosh(d*x + c))*sinh(d*x + c)^3 - 3*(3*a^2 - 2*a*b - 5*b^2)*cosh(d*x + c)^2 + 3*(5*(a^2 + 2*a*b + b^2)*cosh(
d*x + c)^4 + 6*(3*a^2 - 2*a*b - 5*b^2)*cosh(d*x + c)^2 - 3*a^2 + 2*a*b + 5*b^2)*sinh(d*x + c)^2 - a^2 - 2*a*b
- b^2 + 48*(b^2*cosh(d*x + c)^3 + 3*b^2*cosh(d*x + c)^2*sinh(d*x + c) + 3*b^2*cosh(d*x + c)*sinh(d*x + c)^2 +
b^2*sinh(d*x + c)^3)*arctan(cosh(d*x + c) + sinh(d*x + c)) + 6*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^5 + 2*(3*a^2
- 2*a*b - 5*b^2)*cosh(d*x + c)^3 - (3*a^2 - 2*a*b - 5*b^2)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(d*x + c)^3 +
3*d*cosh(d*x + c)^2*sinh(d*x + c) + 3*d*cosh(d*x + c)*sinh(d*x + c)^2 + d*sinh(d*x + c)^3)

________________________________________________________________________________________

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(cosh(d*x+c)**3*(a+b*tanh(d*x+c)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.79093, size = 221, normalized size = 4.09 \begin{align*} \frac{48 \, b^{2} \arctan \left (e^{\left (d x + c\right )}\right ) -{\left (9 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 6 \, a b e^{\left (2 \, d x + 2 \, c\right )} - 15 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + a^{2} + 2 \, a b + b^{2}\right )} e^{\left (-3 \, d x - 3 \, c\right )} +{\left (a^{2} e^{\left (3 \, d x + 18 \, c\right )} + 2 \, a b e^{\left (3 \, d x + 18 \, c\right )} + b^{2} e^{\left (3 \, d x + 18 \, c\right )} + 9 \, a^{2} e^{\left (d x + 16 \, c\right )} - 6 \, a b e^{\left (d x + 16 \, c\right )} - 15 \, b^{2} e^{\left (d x + 16 \, c\right )}\right )} e^{\left (-15 \, c\right )}}{24 \, d} \end{align*}

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

[In]

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

[Out]

1/24*(48*b^2*arctan(e^(d*x + c)) - (9*a^2*e^(2*d*x + 2*c) - 6*a*b*e^(2*d*x + 2*c) - 15*b^2*e^(2*d*x + 2*c) + a
^2 + 2*a*b + b^2)*e^(-3*d*x - 3*c) + (a^2*e^(3*d*x + 18*c) + 2*a*b*e^(3*d*x + 18*c) + b^2*e^(3*d*x + 18*c) + 9
*a^2*e^(d*x + 16*c) - 6*a*b*e^(d*x + 16*c) - 15*b^2*e^(d*x + 16*c))*e^(-15*c))/d